Package org.apache.slide.webdav.method

Examples of org.apache.slide.webdav.method.MethodNotAllowedException


       
        NodeRevisionDescriptors rNrds = content.retrieve( sToken, resourcePath );
        NodeRevisionDescriptor rNrd = content.retrieve( sToken, rNrds );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, resourcePath, rNrd );
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            throw new MethodNotAllowedException( rRk );
        }
       
        // Check for rRk = K_VERSION_CONTROLLED*
        if( rRk instanceof VersionControlled ) {
            // nothing to do
View Full Code Here


        if( !rUh.isWorkspaceUri() ) {
            throw new PreconditionViolationException(
                new ViolatedPrecondition(C_WORKSPACE_LOCATION_OK, WebdavStatus.SC_FORBIDDEN), resourcePath);
        }
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            throw new MethodNotAllowedException( rRk );
        }
       
        // Set initial ws properties
        String wsUri = String.valueOf(rUh);
        NodeRevisionDescriptor wsNrd =
View Full Code Here

        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            // check precondition C_MUST_BE_CHECKED_IN
            if( rRk instanceof CheckedOut ) {
                throw new PreconditionViolationException(new ViolatedPrecondition(C_MUST_BE_CHECKED_IN, WebdavStatus.SC_CONFLICT), rNrds.getUri());
            }
            throw new MethodNotAllowedException( rRk );
        }
       
        if( rRk instanceof CheckedInVersionControlled ) {
            // get checked-in VR
            NodeProperty cinProp = rNrd.getProperty( P_CHECKED_IN );
View Full Code Here

        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            // check precondition C_MUST_BE_CHECKED_IN
            if( rRk instanceof CheckedOut ) {
                throw new PreconditionViolationException(new ViolatedPrecondition(C_MUST_BE_CHECKED_IN, WebdavStatus.SC_CONFLICT), rNrds.getUri());
            }
            throw new MethodNotAllowedException( rRk );
        }
       
        if( rRk instanceof Version ) {
           
            UriHandler rUh = UriHandler.getUriHandler( rUri );
View Full Code Here

                                                                              WebdavStatus.SC_CONFLICT),
                                                     rNrds.getUri());
        }
       
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            throw new MethodNotAllowedException( rRk );
        }
       
        // get checked-out VR
        NodeProperty coutProp = rNrd.getProperty( P_CHECKED_OUT );
        String coutHref = getElementValue((String)coutProp.getValue());
View Full Code Here

            // check precondition C_MUST_BE_CHECKED_OUT
            if( (rRk instanceof CheckedInVersionControlled) ) {
                throw new PreconditionViolationException(
                    new ViolatedPrecondition(C_MUST_BE_CHECKED_OUT, WebdavStatus.SC_CONFLICT), rUri);
            }
            throw new MethodNotAllowedException( rRk );
        }
       
        if( rRk instanceof CheckedOutVersionControlled || rRk instanceof Working ) {
           
            boolean isWorkingResource = (rRk instanceof Working);
View Full Code Here

       
        NodeRevisionDescriptors rNrds = content.retrieve( sToken, resourcePath );
        NodeRevisionDescriptor rNrd = content.retrieve( sToken, rNrds );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, resourcePath, rNrd );
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            throw new MethodNotAllowedException( rRk );
        }
       
        // Check for rRk = K_VERSION_CONTROLLED*
        if( rRk instanceof VersionControlled ) {
            // nothing to do
View Full Code Here

        if( !rUh.isWorkspaceUri() ) {
            throw new PreconditionViolationException(
                new ViolatedPrecondition(C_WORKSPACE_LOCATION_OK, WebdavStatus.SC_FORBIDDEN), resourcePath);
        }
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            throw new MethodNotAllowedException( rRk );
        }
       
        // Set initial ws properties
        String wsUri = String.valueOf(rUh);
        NodeRevisionDescriptor wsNrd =
View Full Code Here

        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            // check precondition C_MUST_BE_CHECKED_IN
            if( rRk instanceof CheckedOut ) {
                throw new PreconditionViolationException(new ViolatedPrecondition(C_MUST_BE_CHECKED_IN, WebdavStatus.SC_CONFLICT), rNrds.getUri());
            }
            throw new MethodNotAllowedException( rRk );
        }
       
        if( rRk instanceof CheckedInVersionControlled ) {
            // get checked-in VR
            NodeProperty cinProp = rNrd.getProperty( P_CHECKED_IN );
View Full Code Here

        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            // check precondition C_MUST_BE_CHECKED_IN
            if( rRk instanceof CheckedOut ) {
                throw new PreconditionViolationException(new ViolatedPrecondition(C_MUST_BE_CHECKED_IN, WebdavStatus.SC_CONFLICT), rNrds.getUri());
            }
            throw new MethodNotAllowedException( rRk );
        }
       
        if( rRk instanceof Version ) {
           
            UriHandler rUh = UriHandler.getUriHandler( rUri );
View Full Code Here

TOP

Related Classes of org.apache.slide.webdav.method.MethodNotAllowedException

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.