[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src: main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierIm...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Aug 18 16:33:49 EDT 2014
Author: scantor
Date: Mon Aug 18 16:33:49 2014
New Revision: 4001
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4001&view=rev
Log:
Deprecate set/getNameIdentifier to preserve sanity.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierImpl.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierMarshaller.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml1/core/impl/NameIdentifierTest.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierImpl.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierImpl.java?rev=4001&r1=4000&r2=4001&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierImpl.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierImpl.java Mon Aug 18 16:33:49 2014
@@ -24,21 +24,21 @@
import org.opensaml.saml.saml1.core.NameIdentifier;
/**
- * Complete implementation of {@link org.opensaml.saml.saml1.core.impl.NameIdentifierImpl}
+ * Complete implementation of {@link org.opensaml.saml.saml1.core.NameIdentifier}.
*/
public class NameIdentifierImpl extends AbstractSAMLObject implements NameIdentifier {
- /** Contents of the NameQualifierAttribute */
- String nameQualifier;
+ /** Contents of the NameQualifierAttribute. */
+ private String nameQualifier;
- /** Contents of the Format */
- String format;
+ /** Contents of the Format. */
+ private String format;
- /** Contents of the elemen body */
- String nameIdentifier;
+ /** Contents of the element body. */
+ private String nameIdentifier;
/**
- * Constructor
+ * Constructor.
*
* @param namespaceURI the namespace the element is in
* @param elementLocalName the local name of the XML element this Object represents
@@ -59,21 +59,35 @@
}
/** {@inheritDoc} */
+ @Deprecated
public String getNameIdentifier() {
- return nameIdentifier;
+ return getValue();
}
/** {@inheritDoc} */
- public void setNameQualifier(String nameQualifier) {
- this.nameQualifier = prepareForAssignment(this.nameQualifier, nameQualifier);
+ public String getValue() {
+ return nameIdentifier;
+ }
+
+ /** {@inheritDoc} */
+ public void setNameQualifier(String qualifier) {
+ nameQualifier = prepareForAssignment(nameQualifier, qualifier);
}
- public void setFormat(String format) {
- this.format = prepareForAssignment(this.format, format);
+ /** {@inheritDoc} */
+ public void setFormat(String fmt) {
+ format = prepareForAssignment(format, fmt);
}
- public void setNameIdentifier(String nameIdentifier) {
- this.nameIdentifier = prepareForAssignment(this.nameIdentifier, nameIdentifier);
+ /** {@inheritDoc} */
+ @Deprecated
+ public void setNameIdentifier(String id) {
+ setValue(id);
+ }
+
+ /** {@inheritDoc} */
+ public void setValue(String id) {
+ nameIdentifier = prepareForAssignment(nameIdentifier, id);
}
/** {@inheritDoc} */
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierMarshaller.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierMarshaller.java?rev=4001&r1=4000&r2=4001&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierMarshaller.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierMarshaller.java Mon Aug 18 16:33:49 2014
@@ -48,8 +48,8 @@
protected void marshallElementContent(XMLObject samlObject, Element domElement) throws MarshallingException {
NameIdentifier nameIdentifier = (NameIdentifier) samlObject;
- if (nameIdentifier.getNameIdentifier() != null) {
- ElementSupport.appendTextContent(domElement, nameIdentifier.getNameIdentifier());
+ if (nameIdentifier.getValue() != null) {
+ ElementSupport.appendTextContent(domElement, nameIdentifier.getValue());
}
}
}
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml1/core/impl/NameIdentifierUnmarshaller.java?rev=4001&r1=4000&r2=4001&view=diff
==============================================================================
[... 44 lines stripped ...]
More information about the commits
mailing list