Search in sources :

Example 1 with MyProxyFacadeProvider

use of edu.uiuc.ncsa.myproxy.oa4mp.server.MyProxyFacadeProvider in project OA4MP by ncsa.

the class MyProxyConfigurationLoader method getMyProxyFacadeProvider.

protected LinkedList<MyProxyFacadeProvider> getMyProxyFacadeProvider() {
    if (mfp == null) {
        mfp = new LinkedList<MyProxyFacadeProvider>();
        // This is the global default for all instances. It can be overridden below.
        String defaultDN = Configurations.getFirstAttribute(cn, MYPROXY_SERVER_DN);
        if (0 < cn.getChildrenCount(OA4MPConfigTags.MYPROXY)) {
            List kids = cn.getChildren(OA4MPConfigTags.MYPROXY);
            for (int i = 0; i < kids.size(); i++) {
                ConfigurationNode currentNode = (ConfigurationNode) kids.get(i);
                // Fix for CIL-196.
                String currentDN = getFirstAttribute(currentNode, MYPROXY_SERVER_DN);
                mfp.add(new MyProxyFacadeProvider(((ConfigurationNode) kids.get(i)), (currentDN == null ? defaultDN : currentDN)));
            }
        } else {
            // set up with defaults
            mfp.add(new MyProxyFacadeProvider());
        }
    }
    return mfp;
}
Also used : ConfigurationNode(org.apache.commons.configuration.tree.ConfigurationNode) MyProxyFacadeProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.MyProxyFacadeProvider) List(java.util.List) LinkedList(java.util.LinkedList)

Aggregations

MyProxyFacadeProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.MyProxyFacadeProvider)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 ConfigurationNode (org.apache.commons.configuration.tree.ConfigurationNode)1