org.opensaml.common.impl
Class AbstractSignableSAMLObject

java.lang.Object
  extended by org.opensaml.xml.AbstractXMLObject
      extended by org.opensaml.xml.signature.AbstractSignableXMLObject
          extended by org.opensaml.xml.AbstractValidatingSignableXMLObject
              extended by org.opensaml.common.impl.AbstractSignableSAMLObject
All Implemented Interfaces:
SAMLObject, SignableSAMLObject, SignableXMLObject, ValidatingXMLObject, XMLObject
Direct Known Subclasses:
AffiliationDescriptorImpl, AssertionImpl, AssertionImpl, EntitiesDescriptorImpl, EntityDescriptorImpl, RequestAbstractTypeImpl, RequestAbstractTypeImpl, ResponseAbstractTypeImpl, RoleDescriptorImpl, StatusResponseTypeImpl

public abstract class AbstractSignableSAMLObject
extends AbstractValidatingSignableXMLObject
implements SignableSAMLObject

Abstract SAMLObject implementation that also implements SignableXMLObject.


Constructor Summary
protected AbstractSignableSAMLObject(String namespaceURI, String elementLocalName, String namespacePrefix)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
          
protected  org.joda.time.DateTime prepareForAssignment(org.joda.time.DateTime oldValue, org.joda.time.DateTime newValue)
          A helper function for derived classes that checks to see if the old and new value are equal and if so releases the cached dom.
 void setSignature(Signature newSignature)
           When a signature is added, a default content reference that uses the ID of this object will be created and added to the signature at the time of signing.
 
Methods inherited from class org.opensaml.xml.AbstractValidatingSignableXMLObject
deregisterValidator, getValidators, registerValidator, validate, validateChildren
 
Methods inherited from class org.opensaml.xml.signature.AbstractSignableXMLObject
getSignature, isSigned
 
Methods inherited from class org.opensaml.xml.AbstractXMLObject
addNamespace, detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, manageQualifiedAttributeNamespace, prepareAttributeValueForAssignment, prepareElementContentForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, prepareForAssignment, registerOwnID, releaseChildrenDOM, releaseDOM, releaseParentDOM, releaseThisAndChildrenDOM, releaseThisandParentDOM, removeNamespace, resolveID, resolveIDFromRoot, setDOM, setElementNamespacePrefix, setElementQName, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation, setSchemaType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensaml.common.SignableSAMLObject
getSignatureReferenceID
 
Methods inherited from interface org.opensaml.xml.signature.SignableXMLObject
getSignature, isSigned
 
Methods inherited from interface org.opensaml.xml.validation.ValidatingXMLObject
deregisterValidator, getValidators, registerValidator, validate
 
Methods inherited from interface org.opensaml.xml.XMLObject
addNamespace, detach, getDOM, getElementQName, getIDIndex, getNamespaceManager, getNamespaces, getNoNamespaceSchemaLocation, getOrderedChildren, getParent, getSchemaLocation, getSchemaType, hasChildren, hasParent, isNil, isNilXSBoolean, releaseChildrenDOM, releaseDOM, releaseParentDOM, removeNamespace, resolveID, resolveIDFromRoot, setDOM, setNil, setNil, setNoNamespaceSchemaLocation, setParent, setSchemaLocation
 

Constructor Detail

AbstractSignableSAMLObject

protected AbstractSignableSAMLObject(String namespaceURI,
                                     String elementLocalName,
                                     String namespacePrefix)
Constructor.

Parameters:
namespaceURI - the namespace the element is in
elementLocalName - the local name of the XML element this Object represents
namespacePrefix - the prefix for the given namespace
Method Detail

equals

public final boolean equals(Object obj)

Overrides:
equals in class Object

setSignature

public void setSignature(Signature newSignature)
When a signature is added, a default content reference that uses the ID of this object will be created and added to the signature at the time of signing. See SAMLObjectContentReference for the default digest algorithm and transforms that will be used. These default values may be changed prior to marshalling this object.

Specified by:
setSignature in interface SignableXMLObject
Overrides:
setSignature in class AbstractSignableXMLObject

prepareForAssignment

protected org.joda.time.DateTime prepareForAssignment(org.joda.time.DateTime oldValue,
                                                      org.joda.time.DateTime newValue)
A helper function for derived classes that checks to see if the old and new value are equal and if so releases the cached dom. Derived classes are expected to use this thus: this.foo = prepareForAssignment(this.foo, foo); This method will do a (null) safe compare of the objects and will also invalidate the DOM if appropriate

Parameters:
oldValue - - current value
newValue - - proposed new value
Returns:
The value to assign to the saved Object


Copyright © 1999-2012. All Rights Reserved.