Package org.apache.slide.webdav.util

Examples of org.apache.slide.webdav.util.UriHandler


   
    /**
     * Factory method.
     */
    static public ResourceKind determineResourceKind( NamespaceAccessToken nsaToken, NodeRevisionDescriptors nrds, NodeRevisionDescriptor nrd ) {
        UriHandler uh = UriHandler.getUriHandler( nrds, nrd );
        return determineResourceKind( nsaToken, uh.toString(), nrd );
    }
View Full Code Here


   
    /**
     * Factory method.
     */
    static public ResourceKind determineResourceKind( NamespaceAccessToken nsaToken, String resourcePath, NodeRevisionDescriptor nrd ) {
        UriHandler uh = UriHandler.getUriHandler( resourcePath );
        NamespaceConfig config = nsaToken.getNamespaceConfig();
       
        if( nrd == null ) {
            return DeltavCompliantUnmappedUrlImpl.getInstance();
        }
        else if( uh.isHistoryUri() ) {
            return VersionHistoryImpl.getInstance();
        }
        else if( uh.isVersionUri() ) {
            return VersionImpl.getInstance();
        }
        else if( uh.isWorkspaceUri() ) {
            return WorkspaceImpl.getInstance();
        }
        else if( uh.isWorkingresourceUri() ) {
            return WorkingImpl.getInstance();
        }
        else if( nrd.exists(P_CHECKED_IN) ) {
            return CheckedInVersionControlledImpl.getInstance();
        }
View Full Code Here

       
        // Prevent dirty reads
        slideToken.setForceStoreEnlistment(true);
       
        // check destination URI
        UriHandler destUh = UriHandler.getUriHandler(resourcePath);
        if( VersionControlMethod.VERSIONCONTROL_EXCLUDEPATH != null && VersionControlMethod.VERSIONCONTROL_EXCLUDEPATH.length() > 0 ) {
            UriHandler exUh = UriHandler.getUriHandler( VersionControlMethod.VERSIONCONTROL_EXCLUDEPATH );
            if( exUh.isAncestorOf(destUh) )
                isInVersioncontrolExcludePath = true;
        }
       
        if (destUh.isRestrictedUri()) {
            boolean sendError = true;
View Full Code Here

                                                    WebdavStatus.SC_FORBIDDEN);
                }
            }
           
            // check precondition DAV:cannot-modify-version
            UriHandler uriHandler = UriHandler.getUriHandler(resourcePath);
            if (uriHandler.isVersionUri()) {
                return new ViolatedPrecondition(C_CANNOT_MODIFY_VERSION,
                                                WebdavStatus.SC_FORBIDDEN);
            }
        }
        return null;
View Full Code Here

            slideToken = new SlideTokenWrapper(slideToken, false); // check only, no enlistment
        }
       
        // Added for DeltaV --start--
        if( Configuration.useVersionControl() ) {
            UriHandler uh = UriHandler.getUriHandler( path );
            if( uh.isWorkspaceUri() )
                return true;
            if( uh.isHistoryUri() )
                return true;
            if( uh.isVersionUri() )
                return false;
        }
        // Added for DeltaV --end--
       
        try {
View Full Code Here

                throw new SlideException("Could not parse DAV:version-set: "+nrds.getUri());
            }
            Iterator hrefIterator = xmlValue.iterator();
           
            NodeRevisionNumber currentNrn= null;
            UriHandler currentUh = null;
            String currentPath = null;
           
            while (hrefIterator.hasNext()) {
                currentPath = ((Element)hrefIterator.next()).getText();
                currentUh = UriHandler.getUriHandler(currentPath);
                currentNrn = new NodeRevisionNumber(currentUh.getVersionName());
                multistatusElm.addContent(getResponseElement(slideToken, currentPath, currentNrn, getRequestedVersionTreeProperties()));
            }
        }
    }
View Full Code Here

            slideToken = new SlideTokenWrapper(slideToken, false); // check only, no enlistment
        }
       
        // Added for DeltaV --start--
        if( Configuration.useVersionControl() ) {
            UriHandler uh = UriHandler.getUriHandler( path );
            if( uh.isWorkspaceUri() )
                return true;
            if( uh.isHistoryUri() )
                return true;
            if( uh.isVersionUri() )
                return false;
        }
        // Added for DeltaV --end--
       
        try {
View Full Code Here

TOP

Related Classes of org.apache.slide.webdav.util.UriHandler

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.