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 validateChildrenPresence(KeyInfoType xmlObject) throws ValidationException {
        if (xmlObject.getXMLObjects().isEmpty()) {
            throw new ValidationException("No children were present in the KeyInfoType object");
        }
    }
View Full Code Here


        // 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

     * @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

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

        // 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("X509Data contains an illegal child extension element: " + childName);
            }
        }
    }
View Full Code Here

     * @throws ValidationException thrown if the given confirmation does not have a confirmation method
     */
    protected void validateSubjectConfirmationMethods(SubjectConfirmation subjectConfirmation)
            throws ValidationException {
        if (subjectConfirmation.getConfirmationMethods().size() == 0) {
            throw new ValidationException("At least Confirmation Method should be present");
        }
    }
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.