Examples of ObjectValidationFailedException


Examples of org.apache.slide.common.ObjectValidationFailedException

     * Validate.
     */
    public void validate(String expectedUri) {
       
        if (uri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                 (NodeRevisionDescriptors.class.getName() + ".nullUri"));
       
        if (!(uri.equals(expectedUri) || uri.equals(expectedUri + "/"))) {
            System.out.println("Uri1 : " + uri + " Uri2 : " + expectedUri);
            //throw new ObjectValidationFailedException
            //(expectedUri, Messages.message
            //(NodeRevisionDescriptors.class.getName() + ".incorrectUri"));
        }
       
        if (workingRevisions == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                 (NodeRevisionDescriptors.class.getName()
                  + ".nullWorkingRevisions"));
       
        if (latestRevisionNumbers == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                 (NodeRevisionDescriptors.class.getName()
                  + ".nullLatestRevisionNumbers"));
       
        if (branches == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                 (NodeRevisionDescriptors.class.getName()
                  + ".nullBranches"));
       
        // FIXME : Check branches integrity. Problem : It's quite expensive.
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     */
    public void validate(String expectedUri) {
        super.validate(expectedUri);
       
        if (linkedUri == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                 (LinkNode.class.getName() + ".nullLink"));
       
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * Validate.
     */
    public void validate() {
       
        if (number == null)
            throw new ObjectValidationFailedException
                (Messages.message
                 (NodeRevisionNumber.class.getName() + ".nullNumber"));
       
        if (number.length < 2)
            throw new ObjectValidationFailedException
                (Messages.message
                 (NodeRevisionNumber.class.getName() + ".invalidNumber"));
       
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * Validate.
     */
    public void validate() {
       
        if (branchName == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeRevisionDescriptor.class.getName() + ".nullBranchName"));
       
        if (number == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeRevisionDescriptor.class.getName() + ".nullNumber"));
        number.validate();
       
        if (labels == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeRevisionDescriptor.class.getName() + ".nullLabels"));
       
        if (properties == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeRevisionDescriptor.class.getName() + ".nullProperties"));
        Enumeration propertyList = properties.elements();
        while (propertyList.hasMoreElements()) {
            Object obj = propertyList.nextElement();
            if (!(obj instanceof NodeProperty))
                throw new ObjectValidationFailedException
                    (Messages.message
                         (NodeRevisionDescriptor.class.getName()
                              + ".invalidPropertyType"));
            ((NodeProperty) obj).validate();
        }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * Validate.
     */
    public void validate() {

        if ((content == null) && (contentBytes == null) && (reader == null) && (inputStream == null))
            throw new ObjectValidationFailedException
                (Messages.message
                 (NodeRevisionContent.class.getName() + ".noContent"));

    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * @param expectedUri Uri
     */
    public void validate(String expectedUri) {
       
        if (objectUri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (NodePermission.class.getName() + ".nullObjectUri"));
       
        if (!objectUri.equals(expectedUri))  {
            // extra test to make "/files/x" == "/files/x/"
            String tmpObjectUri=objectUri;
            if (tmpObjectUri.endsWith("/"))
                tmpObjectUri=tmpObjectUri.substring(0,tmpObjectUri.length()-1);
            String tmpExpectedUri=expectedUri;
            if (tmpExpectedUri.endsWith("/"))
                tmpExpectedUri=tmpExpectedUri.substring(0,tmpExpectedUri.length()-1);
           
            if (!tmpObjectUri.equals(tmpExpectedUri))
                throw new ObjectValidationFailedException
                    (expectedUri, Messages.message
                         (NodePermission.class.getName() + ".incorrectObjectUri"));
        }
       
        if (subjectUri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (NodePermission.class.getName() + ".nullSubjectUri"));
       
        if (actionUri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (NodePermission.class.getName() + ".nullActionUri"));
       
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * Validate.
     */
    public void validate() {
       
        if (name == null)
            throw new ObjectValidationFailedException
                (Messages.message(NodeProperty.class.getName() + ".nullName"));
       
        if (namespace == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeProperty.class.getName() + ".nullNamespace"));
       
        if (value == null)
            throw new ObjectValidationFailedException
                (Messages.message
                     (NodeProperty.class.getName() + ".nullValue"));
       
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * @param expectedUri Uri
     */
    public void validate(String expectedUri) {
       
        if (uri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (ObjectNode.class.getName() + ".nullUri"));
       
        if (!uri.equals(expectedUri) && !uuri.equals(expectedUri))
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (ObjectNode.class.getName() + ".incorrectUri"));
       
        if (bindings == null || parentBindings == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                     (ObjectNode.class.getName() + ".nullBindingsVector"));
       
        if (links == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                     (ObjectNode.class.getName() + ".nullLinksVector"));
       
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     * @param expectedUri Uri
     */
    public void validate(String expectedUri) {
       
        if (uri == null)
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (ObjectNode.class.getName() + ".nullUri"));
       
        if (!uri.equals(expectedUri) && !uuri.equals(expectedUri))
            throw new ObjectValidationFailedException
                (expectedUri, Messages.message
                     (ObjectNode.class.getName() + ".incorrectUri"));
       
        if (bindings == null || parentBindings == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                     (ObjectNode.class.getName() + ".nullBindingsVector"));
               
    }
View Full Code Here

Examples of org.apache.slide.common.ObjectValidationFailedException

     */
    public void validate(String expectedUri) {
        super.validate(expectedUri);
       
        if (linkedUri == null)
            throw new ObjectValidationFailedException
                (uri, Messages.message
                 (LinkNode.class.getName() + ".nullLink"));
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.