Removed some old "origin" naming.
authorwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 6 May 2005 19:55:17 +0000 (19:55 +0000)
committerwassa <wassa@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Fri, 6 May 2005 19:55:17 +0000 (19:55 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1450 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/common/ServiceProviderMapper.java
src/edu/internet2/middleware/shibboleth/idp/IdPResponder.java
src/edu/internet2/middleware/shibboleth/log/LoggingContextListener.java
src/edu/internet2/middleware/shibboleth/utils/ResolverTest.java

index 2d22268..dfcc0a4 100644 (file)
@@ -79,7 +79,7 @@ public class ServiceProviderMapper {
                this.metaData = metadata;
        }
 
-       private IdPConfig getOriginConfig() {
+       private IdPConfig getIdPConfig() {
 
                return configuration;
        }
@@ -158,7 +158,7 @@ public class ServiceProviderMapper {
 
                // If there is no explicit default, pick the single configured Relying
                // Party
-               String defaultParty = getOriginConfig().getDefaultRelyingPartyName();
+               String defaultParty = getIdPConfig().getDefaultRelyingPartyName();
                if (defaultParty == null || defaultParty.equals("")) { return (RelyingParty) relyingParties.values().iterator()
                                .next(); }
 
@@ -216,7 +216,7 @@ public class ServiceProviderMapper {
 
                private RelyingPartyIdentityProvider identityProvider;
                private String name;
-               private String overridenOriginProviderId;
+               private String overridenIdPProviderId;
                private URL overridenAAUrl;
                private URI overridenDefaultAuthMethod;
                private String hsNameFormatId;
@@ -248,7 +248,7 @@ public class ServiceProviderMapper {
                        String attribute = ((Element) partyConfig).getAttribute("providerId");
                        if (attribute != null && !attribute.equals("")) {
                                log.debug("Overriding providerId for Relying Pary (" + name + ") with (" + attribute + ").");
-                               overridenOriginProviderId = attribute;
+                               overridenIdPProviderId = attribute;
                        }
 
                        attribute = ((Element) partyConfig).getAttribute("AAUrl");
@@ -389,8 +389,8 @@ public class ServiceProviderMapper {
                        }
 
                        // Initialize and Identity Provider object for this use by this relying party
-                       identityProvider = new RelyingPartyIdentityProvider(overridenOriginProviderId != null
-                                       ? overridenOriginProviderId
+                       identityProvider = new RelyingPartyIdentityProvider(overridenIdPProviderId != null
+                                       ? overridenIdPProviderId
                                        : configuration.getProviderId(), signingCredential);
 
                }
index 49df477..64eb26c 100644 (file)
@@ -98,14 +98,14 @@ public class IdPResponder extends HttpServlet {
                try {
                        binding = SAMLBindingFactory.getInstance(SAMLBinding.SOAP);
 
-                       Document originConfig = IdPConfigLoader.getIdPConfig(this.getServletContext());
+                       Document idPConfig = IdPConfigLoader.getIdPConfig(this.getServletContext());
 
                        // Load global configuration properties
-                       configuration = new IdPConfig(originConfig.getDocumentElement());
+                       configuration = new IdPConfig(idPConfig.getDocumentElement());
 
                        // Load name mappings
                        NameMapper nameMapper = new NameMapper();
-                       NodeList itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(
+                       NodeList itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(
                                        NameIdentifierMapping.mappingNamespace, "NameMapping");
 
                        for (int i = 0; i < itemElements.getLength(); i++) {
@@ -117,7 +117,7 @@ public class IdPResponder extends HttpServlet {
                        }
 
                        // Load signing credentials
-                       itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(Credentials.credentialsNamespace,
+                       itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(Credentials.credentialsNamespace,
                                        "Credentials");
                        if (itemElements.getLength() < 1) {
                                log.error("No credentials specified.");
@@ -130,7 +130,7 @@ public class IdPResponder extends HttpServlet {
                        // Load relying party config
                        ServiceProviderMapper spMapper;
                        try {
-                               spMapper = new ServiceProviderMapper(originConfig.getDocumentElement(), configuration, credentials,
+                               spMapper = new ServiceProviderMapper(idPConfig.getDocumentElement(), configuration, credentials,
                                                nameMapper);
                        } catch (ServiceProviderMapperException e) {
                                log.error("Could not load Identity Provider configuration: " + e);
@@ -143,7 +143,7 @@ public class IdPResponder extends HttpServlet {
                        try {
                                resolver = new AttributeResolver(configuration);
 
-                               itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
+                               itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
                                                "ReleasePolicyEngine");
 
                                if (itemElements.getLength() > 1) {
@@ -167,7 +167,7 @@ public class IdPResponder extends HttpServlet {
 
                        // Load artifact mapping implementation
                        ArtifactMapper artifactMapper = null;
-                       itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
+                       itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
                                        "ArtifactMapper");
                        if (itemElements.getLength() > 1) {
                                log.warn("Encountered multiple <ArtifactMapper/> configuration elements.  Using first...");
@@ -182,7 +182,7 @@ public class IdPResponder extends HttpServlet {
                        // Load protocol handlers and support library
                        protocolSupport = new IdPProtocolSupport(configuration, transactionLog, nameMapper, spMapper, arpEngine,
                                        resolver, artifactMapper);
-                       itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
+                       itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
                                        "ProtocolHandler");
 
                        // Default if no handlers are specified
@@ -211,7 +211,7 @@ public class IdPResponder extends HttpServlet {
                        }
 
                        // Load metadata
-                       itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
+                       itemElements = idPConfig.getDocumentElement().getElementsByTagNameNS(IdPConfig.configNameSpace,
                                        "MetadataProvider");
                        for (int i = 0; i < itemElements.getLength(); i++) {
                                protocolSupport.addMetadataProvider((Element) itemElements.item(i));
index 15d7070..48c87c1 100644 (file)
@@ -78,8 +78,8 @@ public class LoggingContextListener implements ServletContextListener {
                rootAppender.setLayout(new PatternLayout("%d{ISO8601} %-5p %-41X{serviceId} - %m%n"));
 
                try {
-                       Document originConfig = IdPConfigLoader.getIdPConfig(sce.getServletContext());
-                       loadConfiguration(originConfig);
+                       Document idpConfig = IdPConfigLoader.getIdPConfig(sce.getServletContext());
+                       loadConfiguration(idpConfig);
                } catch (ShibbolethConfigurationException e) {
                        sce.getServletContext().log("Problem setting up logging.", e);
                        log.fatal("Problem setting up logging: " + e);
@@ -94,8 +94,8 @@ public class LoggingContextListener implements ServletContextListener {
                LogManager.shutdown();
        }
 
-       protected void loadConfiguration(Document originConfig) throws ShibbolethConfigurationException {
-               NodeList itemElements = originConfig.getDocumentElement().getElementsByTagNameNS(
+       protected void loadConfiguration(Document idpConfig) throws ShibbolethConfigurationException {
+               NodeList itemElements = idpConfig.getDocumentElement().getElementsByTagNameNS(
                                IdPConfig.configNameSpace, "Logging");
                Node errorLogNode = null;
                boolean encounteredLog4JConfig = false;
index 33e3d28..1201f4f 100644 (file)
@@ -92,7 +92,7 @@ public class ResolverTest
 {
        private static boolean debug = false;
        private static String resolverxml = null;
-       private static String originxml = null;
+       private static String idpXml = null;
        private static String requester = null;
        private static String user = null;
        private static String resource = null;
@@ -135,7 +135,7 @@ public class ResolverTest
 
                CmdLineParser.Option helpOption = parser.addBooleanOption('h', "help");
                CmdLineParser.Option debugOption = parser.addBooleanOption('d', "debug");
-               CmdLineParser.Option originxmlOption = parser.addStringOption('\u0000', "originxml");
+               CmdLineParser.Option idpXmlOption = parser.addStringOption('\u0000', "idpXml");
                CmdLineParser.Option userOption = parser.addStringOption('u', "user");
                CmdLineParser.Option requesterOption = parser.addStringOption('r', "requester");
                CmdLineParser.Option resolverxmlOption = parser.addStringOption('\u0000', "resolverxml");
@@ -168,7 +168,7 @@ public class ResolverTest
                        resolverxml = (String) parser.getOptionValue(fileOption);
                }
 
-               originxml = (String) parser.getOptionValue(originxmlOption); 
+               idpXml = (String) parser.getOptionValue(idpXmlOption); 
 
                user = (String) parser.getOptionValue(userOption);
                requester = (String) parser.getOptionValue(requesterOption);
@@ -189,8 +189,8 @@ public class ResolverTest
                        printUsage(System.out);
                        System.exit(1);
                }
-               if ((resolverxml == null && originxml == null) || (resolverxml != null && originxml != null)) {
-                       System.out.println("Exactly one of --originxml and --resolverxml is required.");
+               if ((resolverxml == null && idpXml == null) || (resolverxml != null && idpXml != null)) {
+                       System.out.println("Exactly one of --idpXml and --resolverxml is required.");
                        System.out.println();
                        printUsage(System.out);
                        System.exit(1);
@@ -217,20 +217,20 @@ public class ResolverTest
 
        private static void initializeResolver()
        {
-               if (originxml != null) {
+               if (idpXml != null) {
                        try {
-                               Document originConfig = IdPConfigLoader.getIdPConfig(originxml);
-                               IdPConfig configuration = new IdPConfig(originConfig.getDocumentElement());
+                               Document idpConfig = IdPConfigLoader.getIdPConfig(idpXml);
+                               IdPConfig configuration = new IdPConfig(idpConfig.getDocumentElement());
 
                                resolver = new AttributeResolver(configuration);
 
                                NodeList itemElements =
-                                       originConfig.getDocumentElement().getElementsByTagNameNS(
+                                       idpConfig.getDocumentElement().getElementsByTagNameNS(
                                                        IdPConfig.configNameSpace,
                                                        "ReleasePolicyEngine");
 
                                if (itemElements.getLength() > 1) {
-                                       System.err.println("Warning: encountered multiple <ReleasePolicyEngine> configuration elements in (" + originxml + "). Using first...");
+                                       System.err.println("Warning: encountered multiple <ReleasePolicyEngine> configuration elements in (" + idpXml + "). Using first...");
                                }
 
                                if (itemElements.getLength() < 1) {
@@ -244,7 +244,7 @@ public class ResolverTest
                                }
                        } 
                        catch (ShibbolethConfigurationException e) {
-                               System.err.println("Error loading origin configuration file (" + originxml + "): " + e.getMessage());
+                               System.err.println("Error loading IdP configuration file (" + idpXml + "): " + e.getMessage());
                                System.exit(1);
                        }
                        catch (AttributeResolverException e) {
@@ -316,12 +316,12 @@ public class ResolverTest
        private static void printUsage(PrintStream out) 
        {
                // out.println("Tests an AA Attribute Resolver configuration.");
-               out.println("Usage: resolvertest --user=USER {--originxml=URL|--resolverxml=URL} [OPTION...]");
+               out.println("Usage: resolvertest --user=USER {--idpXml=URL|--resolverxml=URL} [OPTION...]");
                out.println();
                out.println("Options:");
                out.println("  -h, --help                Print usage information");
                out.println("  -d, --debug               Run in debug mode");
-               out.println("  --originxml=FILEURL       URL of the origin configuration file. Attributes");
+               out.println("  --idpXml=FILEURL       URL of the IdP configuration file. Attributes");
                out.println("                            will be filtered according to the Attribute Release");
                out.println("                            Policy (ARP) specified in the configuration file");
                out.println("  --resolverxml=FILEURL     URL of the resolver configuration file. No ARP");