[java-identity-provider COMMIT] in /trunk: idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessa...

noreply at shibboleth.net noreply at shibboleth.net
Mon May 7 13:32:48 BST 2012


Author: lajoie
Date: Mon May  7 13:32:47 2012
New Revision: 4188

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4188&view=rev
Log:
code cleanup/simplification
have any required properties be injected in to profile actions via its constructor

Added:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AddSamlMetadataToMessageContext.java   (contents, props changed)
      - copied, changed from r4185, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AbstractAddSamlMetadataToMessageContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/InitializeRelyingPartyContextBasedOnInboundMessageIssuer.java   (contents, props changed)
      - copied, changed from r4185, trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/InitializeRelyingPartySubcontextBasedOnInboundMessageIssuer.java
Removed:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AbstractAddSamlMetadataToMessageContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AddSamlMetadataToInboundMessageContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AddSamlMetadataToOutboundMessageContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/InitializeRelyingPartySubcontextBasedOnInboundMessageIssuer.java
Modified:
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessage.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/FilterAttributes.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/ResolveAttributes.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/SchemaValidateXmlMessage.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SamlMetadataContext.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/profile/SamlProtocolContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/AddRelyingPartyConfigurationToProfileRequestContext.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/CheckRequestVersion.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/CheckRequestVersion.java

Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessage.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessage.java?rev=4188&r1=4187&r2=4188&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessage.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/impl/DecodeMessage.java Mon May  7 13:32:47 2012
@@ -27,7 +27,6 @@
 import net.shibboleth.idp.profile.ProfileException;
 import net.shibboleth.idp.profile.ProfileRequestContext;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
-import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.component.UnmodifiableComponent;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
@@ -52,27 +51,26 @@
     private final Logger log = LoggerFactory.getLogger(DecodeMessage.class);
 
     /** Factory used to create new {@link MessageDecoder} instances. */
-    private HttpServletRequestMessageDecoderFactory<InboundMessageType> decoderFactory;
+    private final HttpServletRequestMessageDecoderFactory<InboundMessageType> decoderFactory;
+    
+    /**
+     * Constructor.
+     *
+     * @param factory factory used to create new {@link MessageDecoder} instances
+     */
+    public DecodeMessage(@Nonnull final HttpServletRequestMessageDecoderFactory<InboundMessageType> factory){
+        super();
+        
+        decoderFactory = Constraint.isNotNull(factory, "Message decoder factory can not be null");
+    }
 
     /**
      * Gets the factory used to create new {@link MessageDecoder} instances.
      * 
      * @return factory used to create new {@link MessageDecoder} instances, never null after initialization
      */
-    public HttpServletRequestMessageDecoderFactory<InboundMessageType> getDecoderFactory() {
+    @Nonnull public HttpServletRequestMessageDecoderFactory<InboundMessageType> getDecoderFactory() {
         return decoderFactory;
-    }
-
-    /**
-     * Sets the factory used to create new {@link MessageDecoder} instances.
-     * 
-     * @param factory factory used to create new {@link MessageDecoder} instances
-     */
-    public synchronized void setDecoderFactory(
-            @Nonnull final HttpServletRequestMessageDecoderFactory<InboundMessageType> factory) {
-        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
-
-        decoderFactory = Constraint.isNotNull(factory, "Message decoder factory can not be null");
     }
 
     /** {@inheritDoc} */
@@ -102,15 +100,6 @@

[... 622 lines stripped ...]


More information about the commits mailing list