[java-opensaml2 COMMIT] in /branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl: SourceIDImpl.java SourceI...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Jan 28 13:08:51 EST 2013
Author: scantor
Date: Mon Jan 28 13:08:51 2013
New Revision: 1619
URL: http://svn.shibboleth.net/view/java-opensaml2?rev=1619&view=rev
Log:
Convert to XSString base classes.
Modified:
branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDImpl.java
branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDMarshaller.java
branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDUnmarshaller.java
Modified: branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDImpl.java
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDImpl.java?rev=1619&r1=1618&r2=1619&view=diff
==============================================================================
--- branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDImpl.java (original)
+++ branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDImpl.java Mon Jan 28 13:08:51 2013
@@ -17,19 +17,16 @@
package org.opensaml.samlext.saml1md.impl;
-import java.util.List;
+import org.opensaml.samlext.saml1md.SourceID;
+import org.opensaml.xml.schema.impl.XSStringImpl;
-import org.opensaml.common.impl.AbstractSAMLObject;
-import org.opensaml.samlext.saml1md.SourceID;
-import org.opensaml.xml.XMLObject;
+/**
+ * Concrete implementation of {@link SourceID}.
+ */
+public class SourceIDImpl extends XSStringImpl implements SourceID {
-public class SourceIDImpl extends AbstractSAMLObject implements SourceID {
-
- /** Source ID */
- private String sourceID;
-
/**
- * Constructor
+ * Constructor.
*
* @param namespaceURI the namespace the element is in
* @param elementLocalName the local name of the XML element this Object represents
@@ -38,20 +35,4 @@
protected SourceIDImpl(String namespaceURI, String elementLocalName, String namespacePrefix) {
super(namespaceURI, elementLocalName, namespacePrefix);
}
-
- /** {@inheritDoc} */
- public String getValue() {
- return sourceID;
- }
-
- /** {@inheritDoc} */
- public void setValue(String newSourceID) {
- sourceID = prepareForAssignment(sourceID, newSourceID);
- }
-
- /** {@inheritDoc} */
- public List<XMLObject> getOrderedChildren() {
- // no children
- return null;
- }
}
Modified: branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDMarshaller.java
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDMarshaller.java?rev=1619&r1=1618&r2=1619&view=diff
==============================================================================
--- branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDMarshaller.java (original)
+++ branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDMarshaller.java Mon Jan 28 13:08:51 2013
@@ -17,25 +17,12 @@
package org.opensaml.samlext.saml1md.impl;
-import org.opensaml.common.impl.AbstractSAMLObjectMarshaller;
import org.opensaml.samlext.saml1md.SourceID;
-import org.opensaml.xml.XMLObject;
-import org.opensaml.xml.io.MarshallingException;
-import org.opensaml.xml.util.DatatypeHelper;
-import org.opensaml.xml.util.XMLHelper;
-import org.w3c.dom.Element;
+import org.opensaml.xml.schema.impl.XSStringMarshaller;
/**
* Marshaller of {@link SourceID} objects.
*/
-public class SourceIDMarshaller extends AbstractSAMLObjectMarshaller {
+public class SourceIDMarshaller extends XSStringMarshaller {
- /** {@inheritDoc} */
- protected void marshallElementContent(XMLObject xmlObject, Element domElement) throws MarshallingException {
- SourceID sourceID = (SourceID) xmlObject;
-
- if (!DatatypeHelper.isEmpty(sourceID.getValue())) {
- XMLHelper.appendTextContent(domElement, sourceID.getValue());
- }
- }
}
Modified: branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDUnmarshaller.java
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDUnmarshaller.java?rev=1619&r1=1618&r2=1619&view=diff
==============================================================================
--- branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDUnmarshaller.java (original)
+++ branches/REL_2/src/main/java/org/opensaml/samlext/saml1md/impl/SourceIDUnmarshaller.java Mon Jan 28 13:08:51 2013
@@ -17,19 +17,12 @@
package org.opensaml.samlext.saml1md.impl;
-import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller;
import org.opensaml.samlext.saml1md.SourceID;
-import org.opensaml.xml.XMLObject;
+import org.opensaml.xml.schema.impl.XSStringUnmarshaller;
/**
* Unmarshaller for {@link SourceID} objects.
*/
-public class SourceIDUnmarshaller extends AbstractSAMLObjectUnmarshaller {
+public class SourceIDUnmarshaller extends XSStringUnmarshaller {
- /** {@inheritDoc} */
- protected void processElementContent(XMLObject samlObject, String elementContent) {
[... 6 lines stripped ...]
More information about the commits
mailing list