[java-identity-provider COMMIT] in /trunk: idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/Abst...
noreply at shibboleth.net
noreply at shibboleth.net
Thu May 2 09:42:43 EDT 2013
Author: rdw
Date: Thu May 2 09:42:43 2013
New Revision: 4449
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4449&view=rev
Log:
IDP-205 Tidy the NameID encoders priot to implementing the (discouraged from use in V3) StringNameId encoders
Modified:
trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoder.java
trunk/idp-saml-api/src/test/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoderTest.java
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml1XmlObjectSubjectNameIdentifierEncoder.java
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml2XmlObjectSubjectNameIDEncoder.java
Modified: trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoder.java?rev=4449&r1=4448&r2=4449&view=diff
==============================================================================
--- trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoder.java (original)
+++ trunk/idp-saml-api/src/main/java/net/shibboleth/idp/saml/attribute/encoding/AbstractSamlNameIdentifierEncoder.java Thu May 2 09:42:43 2013
@@ -17,14 +17,9 @@
package net.shibboleth.idp.saml.attribute.encoding;
-import javax.annotation.Nullable;
+import net.shibboleth.idp.attribute.AttributeEncoder;
import org.opensaml.saml.common.SAMLObject;
-
-import com.google.common.base.Objects;
-
-import net.shibboleth.idp.attribute.AttributeEncoder;
-import net.shibboleth.utilities.java.support.primitive.StringSupport;
/**
* Base class for attribute encoders that produce SAML name identifiers.
@@ -34,72 +29,4 @@
public abstract class AbstractSamlNameIdentifierEncoder<NameIdType extends SAMLObject> implements
AttributeEncoder<NameIdType> {
- /** The format of the name identifier. */
- private String format;
-
- /** The security or administrative domain that qualifies the name identifier. */
- private String qualifier;
-
- /**
- * Gets the format of the name identifier.
- *
- * @return format of the name identifier
- */
- @Nullable public final String getNameFormat() {
- return format;
- }
-
- /**
- * Sets the format of the name identifier.
- *
- * @param nameFormat format of the name identifier
- */
- public final void setNameFormat(@Nullable final String nameFormat) {
- format = StringSupport.trimOrNull(nameFormat);
- }
-
- /**
- * Gets the security or administrative domain that qualifies the name identifier.
- *
- * @return security or administrative domain that qualifies the name identifier
- */
- @Nullable public final String getNameQualifier() {
- return qualifier;
- }
-
- /**
- * Sets the security or administrative domain that qualifies the name identifier.
- *
- * @param nameQualifier security or administrative domain that qualifies the name identifier
- */
- @Nullable public final void setNameQualifier(final String nameQualifier) {
- qualifier = StringSupport.trimOrNull(nameQualifier);
- }
-
- /** {@inheritDoc} */
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
-
- if (obj == this) {
- return true;
- }
-
- if (!(obj instanceof AbstractSamlNameIdentifierEncoder)) {
- return false;
- }
-
- AbstractSamlNameIdentifierEncoder other = (AbstractSamlNameIdentifierEncoder) obj;
-
- return Objects.equal(getNameFormat(), other.getNameFormat()) &&
- Objects.equal(getNameQualifier(), other.getNameQualifier()) &&
- Objects.equal(getProtocol(), other.getProtocol());
- }
-
- /** {@inheritDoc} */
- public int hashCode() {
- return Objects.hashCode(getNameFormat(), getNameQualifier(), getProtocol());
- }
-
}
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml1XmlObjectSubjectNameIdentifierEncoder.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml1XmlObjectSubjectNameIdentifierEncoder.java?rev=4449&r1=4448&r2=4449&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml1XmlObjectSubjectNameIdentifierEncoder.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/attribute/encoding/Saml1XmlObjectSubjectNameIdentifierEncoder.java Thu May 2 09:42:43 2013
@@ -28,6 +28,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.base.Objects;
+
/**
[... 86 lines stripped ...]
More information about the commits
mailing list