|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.xml.AbstractXMLObject
org.opensaml.xml.validation.AbstractValidatingXMLObject
public abstract class AbstractValidatingXMLObject
Extension of AbstractXMLObject that implements
ValidatingXMLObject.
| Constructor Summary | |
|---|---|
protected |
AbstractValidatingXMLObject(String namespaceURI,
String elementLocalName,
String namespacePrefix)
Constructor. |
| Method Summary | |
|---|---|
void |
deregisterValidator(Validator validator)
Deregisters a validator for this XMLObject. |
List<Validator> |
getValidators()
Gets the list of validators for this XMLObject or null if there is no list. |
void |
registerValidator(Validator validator)
Registers a validator for this XMLObject. |
void |
validate(boolean validateDescendants)
Validates this XMLObject against all registered validators. |
protected void |
validateChildren(XMLObject xmlObject)
Recursive method used to validate all the children of the given XMLObject that implement ValidatingXMLObject. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 |
|---|
protected AbstractValidatingXMLObject(String namespaceURI,
String elementLocalName,
String namespacePrefix)
namespaceURI - the namespace the element is inelementLocalName - the local name of the XML element this Object representsnamespacePrefix - the prefix for the given namespace| Method Detail |
|---|
public List<Validator> getValidators()
getValidators in interface ValidatingXMLObjectpublic void registerValidator(Validator validator)
registerValidator in interface ValidatingXMLObjectvalidator - the validatorpublic void deregisterValidator(Validator validator)
deregisterValidator in interface ValidatingXMLObjectvalidator - the validator
public void validate(boolean validateDescendants)
throws ValidationException
validate in interface ValidatingXMLObjectvalidateDescendants - true if all the descendants of this object should
be validated as well, false if not
ValidationException - thrown if the element is not valid
protected void validateChildren(XMLObject xmlObject)
throws ValidationException
ValidatingXMLObject. Note, this can be a very expensive operation.
xmlObject - xmlObject whose descendants should be validated
ValidationException - thrown if any child objects are not valid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||