[java-identity-provider COMMIT] in /trunk: idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttri...

noreply at shibboleth.net noreply at shibboleth.net
Sat Sep 17 00:45:03 BST 2011


Author: lajoie
Date: Sat Sep 17 00:45:03 2011
New Revision: 4071

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4071&view=rev
Log:
Makes classes extend AbstractInitializableComponent where it makes sense
Fix up initialization logic where classes for not extends the aforementioned abstract class
other minor code cleanups

Modified:
    trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttributeDecoder.java
    trunk/idp-attribute-filter-api/src/main/java/net/shibboleth/idp/attribute/filtering/AttributeValueFilterPolicy.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/AndMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/BaseRegexMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/BaseStringMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/NotMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/OrMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/ScriptedMatcher.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/AndCriterion.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/BaseRegexCompare.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/BaseStringCompare.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/BaseTargetedRegexCompare.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/BaseTargetedStringCompare.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/NotCriterion.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/OrCriterion.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/policy/ScriptedCriterion.java
    trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlAttributeEncoder.java

Modified: trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttributeDecoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttributeDecoder.java?rev=4071&r1=4070&r2=4071&view=diff
==============================================================================
--- trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttributeDecoder.java (original)
+++ trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/AbstractAttributeDecoder.java Sat Sep 17 00:45:03 2011
@@ -24,8 +24,8 @@
 import java.util.Map.Entry;
 
 import org.opensaml.util.StringSupport;
+import org.opensaml.util.component.AbstractIdentifiableInitializableComponent;
 import org.opensaml.util.component.ComponentInitializationException;
-import org.opensaml.util.component.InitializableComponent;
 import org.opensaml.util.component.UnmodifiableComponent;
 import org.opensaml.util.component.UnmodifiableComponentException;
 import org.slf4j.Logger;
@@ -37,45 +37,17 @@
  * @param <DecodedType> type of data decoded
  * @param <ValueType> data type of attribute values
  */
-public abstract class AbstractAttributeDecoder<DecodedType, ValueType> implements AttributeDecoder<DecodedType>,
-        UnmodifiableComponent, InitializableComponent {
+public abstract class AbstractAttributeDecoder<DecodedType, ValueType> extends
+        AbstractIdentifiableInitializableComponent implements AttributeDecoder<DecodedType>, UnmodifiableComponent {
 
     /** Class logger. */
     private Logger log = LoggerFactory.getLogger(AbstractAttributeDecoder.class);
 
-    /** Whether this encoder has been initialized. */
-    private boolean initialized;
-
-    /** The ID of the IdP attribute. */
-    private String id;
-
     /** Localized human intelligible attribute names. */
     private Map<Locale, String> displayNames;
 
     /** Localized human readable descriptions of attribute. */
     private Map<Locale, String> displayDescriptions;
-
-    /**
-     * Gets the ID of the generated {@link Attribute}.
-     * 
-     * @return the ID of the generated IdP attribute
-     */
-    public final String getId() {
-        return id;
-    }
-
-    /**
-     * Sets the ID of the generated {@link Attribute}.
-     * 
-     * @param attributeId the ID of the generated IdP attribute
-     */
-    public final synchronized void setId(final String attributeId) {
-        if (isInitialized()) {
-            throw new UnmodifiableComponentException(
-                    "Attribute ID can not be changed after decoder has been initialized");
-        }

[... 1555 lines stripped ...]


More information about the commits mailing list