Package org.opensaml.xml.validation

Examples of org.opensaml.xml.validation.ValidationException


     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateAlgorithm(Transform xmlObject) throws ValidationException {
        if (DatatypeHelper.isEmpty(xmlObject.getAlgorithm())) {
            throw new ValidationException("Transform algorithm URI was empty");
        }
    }
View Full Code Here


     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateChildrenPresence(X509IssuerSerial xmlObject) throws ValidationException {
        if (xmlObject.getX509IssuerName() == null) {
            throw new ValidationException("X509IssuerSerial does not contain an X509IssuerName");
        }
        if (xmlObject.getX509SerialNumber() == null) {
            throw new ValidationException("X509IssuerSerial does not contain an X509SerialNumber");
        }
    }
View Full Code Here

     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateContent(X509SerialNumber xmlObject) throws ValidationException {
        if (xmlObject.getValue() == null) {
            throw new ValidationException("X509SerialNumber did not contain a value");
        }
    }
View Full Code Here

     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateURI(RetrievalMethod xmlObject) throws ValidationException {
        if (DatatypeHelper.isEmpty(xmlObject.getURI())) {
            throw new ValidationException("RetrievalMethod URI was empty");
        }
    }
View Full Code Here

     * @param xmlObject the object to be validated
     * @throws ValidationException thrown if object is invalid
     */
    protected void validateCanonicalizationMethod(Signature xmlObject) throws ValidationException {
        if (DatatypeHelper.isEmpty(xmlObject.getCanonicalizationAlgorithm())) {
            throw new ValidationException("The CanonicalizationMethod value was empty");
        }
    }
View Full Code Here

     * @param xmlObject the object to be validated
     * @throws ValidationException thrown if object is invalid
     */
    protected void validateSignatureMethod(Signature xmlObject) throws ValidationException {
        if (DatatypeHelper.isEmpty(xmlObject.getSignatureAlgorithm())) {
            throw new ValidationException("The SignatureMethod value was empty");
        }
    }
View Full Code Here

     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateChildrenPresence(KeyValue xmlObject) throws ValidationException {
        List<XMLObject> children = xmlObject.getOrderedChildren();
        if (children == null || children.isEmpty()) {
            throw new ValidationException("No children were present in the KeyValue object");
        }
        if (children.size() > 1) {
            throw new ValidationException("Invalid number of children were present in the KeyValue object");
        }
    }
View Full Code Here

        if (unknownChild == null) {
            return;
        }
        QName childName = unknownChild.getElementQName();
        if (XMLConstants.XMLSIG_NS.equals(childName.getNamespaceURI())) {
            throw new ValidationException("KeyValue contains an illegal child extension element: " + childName);
        }
    }
View Full Code Here

     * @throws ValidationException thrown if the content of the Base64Binary object is invalid
     */
    protected void validateIntegerContent(T xmlObject) throws ValidationException {
        if (! isAllowEmptyContent()) {
            if (xmlObject.getValue() == null) {
                throw new ValidationException("Integer content may not be empty");
            }
        }
    }
View Full Code Here

     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateChildrenPresence(KeyInfoType xmlObject) throws ValidationException {
        if (xmlObject.getXMLObjects().isEmpty()) {
            throw new ValidationException("No children were present in the KeyInfoType object");
        }
    }
View Full Code Here

TOP

Related Classes of org.opensaml.xml.validation.ValidationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.