Package org.apache.slide.webdav.util.resourcekind

Examples of org.apache.slide.webdav.util.resourcekind.ResourceKind


            NodeRevisionDescriptors rNrds = content.retrieve( sToken, resourcePath );
            rNrd = content.retrieve( sToken, rNrds );
        }
        catch( ObjectNotFoundException e ) {}; // can be ignored here!
       
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, resourcePath, rNrd );
       
        if( !(rRk instanceof DeltavCompliantUnmappedUrl) ) {
            throw new PreconditionViolationException(
                new ViolatedPrecondition(C_RESOURCE_MUST_BE_NULL, WebdavStatus.SC_CONFLICT), resourcePath);
        }
        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);
View Full Code Here


                           NodeRevisionDescriptor rNrd, boolean forkOk, boolean applyToVersion, boolean isAutoVersionCheckout  )
        throws SlideException, JDOMException, IOException, PreconditionViolationException  {
       
        Iterator i;
        String rUri = getUri( rNrds, rNrd );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, rNrds, rNrd );
       
        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 );
View Full Code Here

        throws SlideException, JDOMException, IOException, PreconditionViolationException  {
       
        Iterator i;
        Enumeration j;
        String rUri = getUri( rNrds, rNrd );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, rNrds, rNrd );
       
        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 );
View Full Code Here

    public void uncheckout( NodeRevisionDescriptors rNrds, NodeRevisionDescriptor rNrd)
        throws SlideException, JDOMException, IOException, PreconditionViolationException  {
       
        Iterator i;
        String rUri = getUri( rNrds, rNrd );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, rNrds, rNrd );
       
        // check precondition C_MUST_BE_CHECKED_OUT_VERSION_CONTROLLED_RESOURCE
        if ( ! (rRk instanceof CheckedOutVersionControlled) ) {
            throw new PreconditionViolationException(new ViolatedPrecondition(C_MUST_BE_CHECKED_OUT_VERSION_CONTROLLED_RESOURCE,
                                                                              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 );
View Full Code Here

        throws SlideException, JDOMException, IOException, PreconditionViolationException {
       
        Iterator i;
        Enumeration j;
        String rUri = getUri( rNrds, rNrd );
        ResourceKind rRk = AbstractResourceKind.determineResourceKind( nsaToken, rNrds, rNrd );
       
        if( !rRk.isSupportedMethod(req.getMethod()) ) {
            // 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);
            }
View Full Code Here

        // ***************************************
        // TODO:
        // 1) Preconditions; Problem: not specified formally.
        // ***************************************
       
        ResourceKind vrResourceKind = VersionImpl.getInstance();
        ResourceKind cinvcrResourceKind = CheckedInVersionControlledImpl.getInstance();
        String vcrUri = getUri(vcrRevisionDescriptors, vcrRevisionDescriptor);
        Enumeration propertyEnum;
       
        // Remove all VCR dead properties first
        propertyEnum = vcrRevisionDescriptor.enumerateProperties();
View Full Code Here

       
        NodeRevisionDescriptors revisionDescriptors =
            content.retrieve( sToken, resourcePath );
        NodeRevisionDescriptor revisionDescriptor =
            content.retrieve( sToken, revisionDescriptors);
        ResourceKind resourceKind = AbstractResourceKind.determineResourceKind( nsaToken, resourcePath, revisionDescriptor);
       
        if ( (resourceKind instanceof VersionControlled) && (label != null) ) {
            String vrUri = getUriOfAssociatedVR(nsaToken, sToken, content, revisionDescriptors.getUri());
            UriHandler vrUriHandler = UriHandler.getUriHandler(vrUri);
            String historyUri = vrUriHandler.getAssociatedHistoryUri();
View Full Code Here

                    destinationRevisionDescriptors = content.retrieve( stoken, destinationUri);
                    destinationRevisionDescriptor = content.retrieve( stoken, destinationRevisionDescriptors);
                }
                catch( ObjectNotFoundException e ) {}; // can be ignored here!

                ResourceKind destinationResourceKind =
                    AbstractResourceKind.determineResourceKind( token, destinationUri, destinationRevisionDescriptor );

                if( !(destinationResourceKind instanceof DeltavCompliantUnmappedUrl) ) {
                    return new ViolatedPrecondition(C_RESOURCE_MUST_BE_NULL,
                                                    WebdavStatus.SC_CONFLICT);
View Full Code Here

            NodeRevisionDescriptors sourceRevisionDescriptors =
                content.retrieve( slideToken, sourceUri);
            NodeRevisionDescriptor sourceRevisionDescriptor =
                content.retrieve( slideToken, sourceRevisionDescriptors);
            ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(token,
                                                                                   sourceRevisionDescriptors,
                                                                                   sourceRevisionDescriptor);
            isCopySourceVCR = (resourceKind instanceof VersionControlled);

            // if resource being moved is a checked-out VCR or a WR,
View Full Code Here

     * @throws   SlideException
     */
    public RequestedProperties getAllPropertyNames(String resourcePath, boolean liveOnly) throws SlideException {
        NodeRevisionDescriptor nrd =
            content.retrieve(sToken, content.retrieve(sToken, resourcePath));
        ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(nsaToken, resourcePath, nrd);
        RequestedPropertiesImpl result = (RequestedPropertiesImpl)getAllPropertyNames(resourceKind);
       
        if (!liveOnly) {
            // add this resource's dead properties
            Enumeration props = nrd.enumerateProperties();
View Full Code Here

TOP

Related Classes of org.apache.slide.webdav.util.resourcekind.ResourceKind

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.