Package org.opensaml.xml.validation

Examples of org.opensaml.xml.validation.ValidationException


        // or are from another namespace.
        for (XMLObject child : xmlObject.getXMLObjects()) {
            QName childName = child.getElementQName();
            if (! getValidDSChildNames().contains(childName)
                    && XMLConstants.XMLSIG_NS.equals(childName.getNamespaceURI())) {
                throw new ValidationException("KeyInfoType 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 validateBase64BinaryContent(T xmlObject) throws ValidationException {
        if (! isAllowEmptyContent()) {
            if (DatatypeHelper.isEmpty(xmlObject.getValue())) {
                throw new ValidationException("Base64Binary content may not be empty");
            }
        }
    }
View Full Code Here

     * @throws ValidationException thrown if the content of the Base64Binary object is invalid
     */
    protected void validateStringContent(T xmlObject) throws ValidationException {
        if (! isAllowEmptyContent()) {
            if (DatatypeHelper.isEmpty(xmlObject.getValue())) {
                throw new ValidationException("String 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 validateURI(KeyInfoReference xmlObject) throws ValidationException {
        if (DatatypeHelper.isEmpty(xmlObject.getURI())) {
            throw new ValidationException("KeyInfoReference URI was empty");
        }
    }
View Full Code Here

     * @param xmlObject the object to evaluate
     * @throws ValidationException thrown if the content of the object is invalid
     */
    protected void validateDateTimeContent(T xmlObject) throws ValidationException{
        if(!allowEmptyContent && xmlObject.getValue() == null){
            throw new ValidationException("dateTime 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(PGPData xmlObject) throws ValidationException {
        if (xmlObject.getPGPKeyID() == null && xmlObject.getPGPKeyPacket() == null) {
            throw new ValidationException("PGPData must contain at least one of PGPKeyID or PGPKeyPacket");
        }
    }
View Full Code Here

        // Validate that any unknown children are from another namespace.
        for (XMLObject child : xmlObject.getUnknownXMLObjects()) {
            QName childName = child.getElementQName();
            if (! getValidDSChildNames().contains(childName)
                    && XMLConstants.XMLSIG_NS.equals(childName.getNamespaceURI())) {
                throw new ValidationException("PGPData contains an illegal child extension element: " + childName);
            }
        }
    }
View Full Code Here

     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateChildrenPresence(RSAKeyValue xmlObject) throws ValidationException {
        if (xmlObject.getModulus() == null) {
            throw new ValidationException("RSAKeyValue did not contain a required Modulus value");
        }
        if (xmlObject.getExponent() == null) {
            throw new ValidationException("RSAKeyValue did not contain a required Exponent value");
        }
    }
View Full Code Here

     * @param xmlObject the object to validate
     * @throws ValidationException  thrown if the object is invalid
     */
    protected void validateChildrenPresence(SPKIData xmlObject) throws ValidationException {
        if (xmlObject.getSPKISexps().isEmpty()) {
            throw new ValidationException("SPKIData does not contain at least one SPKISexp child");
        }
    }
View Full Code Here

        // or are from another namespace.
        for (XMLObject child : xmlObject.getXMLObjects()) {
            QName childName = child.getElementQName();
            if (! SPKISexp.DEFAULT_ELEMENT_NAME.equals(childName)
                    && XMLConstants.XMLSIG_NS.equals(childName.getNamespaceURI())) {
                throw new ValidationException("PGPData contains an illegal child extension element: " + childName);
            }
        }
    }
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.