Package org.apache.slide.content

Examples of org.apache.slide.content.NodeRevisionDescriptors


        try {

            // Then we must get object contents ...

            ObjectNode object = structure.retrieve(slideToken, resourcePath);
            NodeRevisionDescriptors revisionDescriptors =
                content.retrieve(slideToken, resourcePath);

            if (revisionDescriptors.hasRevisions()) {

                // Retrieve latest revision descriptor
                NodeRevisionDescriptor revisionDescriptor =
                    content.retrieve(slideToken, revisionDescriptors);
View Full Code Here


                // a lock-null resource, we must attempt to delete it

                Enumeration locks = lock.enumerateLocks(slideToken, requestUri);
                if (!locks.hasMoreElements()) {

                    NodeRevisionDescriptors revisionDescriptors = content.retrieve(slideToken, requestUri);
                    NodeRevisionDescriptor revisionDescriptor = content.retrieve(slideToken, revisionDescriptors);
                    if (isLockNull(revisionDescriptor)) {
                        content.remove(slideToken, requestUri, revisionDescriptor);
                        content.remove(slideToken, revisionDescriptors);
                        ObjectNode node = structure.retrieve(slideToken, requestUri);
View Full Code Here

        }

        // use a non-blocking slide token.
        SlideToken stoken = readonlySlideToken();
       
        NodeRevisionDescriptors lowerNrds = null;
        NodeRevisionDescriptor lowerNrd = null;
        try {
            lowerNrds = content.retrieve(stoken, lowerNode.getUri());
            lowerNrd = content.retrieve(stoken, lowerNrds);
View Full Code Here

     */
    public NodeProperty getProperty(String propertyName, String resourcePath, String contextPath, String servletPath) throws SlideException, JDOMException {
       
        UriHandler uriHandler = UriHandler.getUriHandler(resourcePath);
        String uri = null;
        NodeRevisionDescriptors revisionDescriptors = null;
        NodeRevisionDescriptor revisionDescriptor = null;
        Content contentHelper = nsaToken.getContentHelper();
       
        if (uriHandler.isVersionUri()) {
            uri = uriHandler.getAssociatedHistoryUri();
View Full Code Here

        }
       
        if (result == null) {
            i = psUris.iterator();
            while (i.hasNext()) {
                NodeRevisionDescriptors nrds =
                    nsaToken.getContentHelper().retrieve(sToken, ((UriHandler)i.next()).getUri());
                NodeRevisionDescriptor nrd =
                    nsaToken.getContentHelper().retrieve(sToken, nrds);
                result = computeWorkspace(nrds, nrd, contextPath, servletPath);
                if (result != null) {
View Full Code Here

                                                         targetUri);
            }
           
            // if resource being removed is a checked-out VCR or a WR,
            // remove its URI in the DAV:checkout-set property of the VR
            NodeRevisionDescriptors nrds = content.retrieve(slideToken, targetUri);
            NodeRevisionDescriptor nrd = content.retrieve(slideToken, nrds);
            ResourceKind rk = AbstractResourceKind.determineResourceKind(token, nrds, nrd);
            if(rk instanceof CheckedOutVersionControlled || rk instanceof Working) {
                String vrUri =
                    VersioningHelper.getUriOfAssociatedVR(token, slideToken, content, targetUri);
                try {
                    NodeRevisionDescriptors vrNrds = content.retrieve(slideToken, vrUri);
                    NodeRevisionDescriptor vrNrd = content.retrieve(slideToken, vrNrds);
                    PropertyHelper.removeHrefFromProperty(vrNrd, P_CHECKOUT_SET, targetUri);
                    content.store(slideToken, vrNrds.getUri(), vrNrd, null);
                }
                catch( ObjectNotFoundException e ) {
                    // Nothing to do if the VR is gone, e.g. because the VHR was deleted.
                }
                catch( RevisionDescriptorNotFoundException e ) {
View Full Code Here

       
        String passwordValue = null;
       
        try {
           
            NodeRevisionDescriptors revisionDescriptors =
                contentHelper.retrieve(slideToken, usersPath + "/" + username);
            NodeRevisionDescriptor revisionDescriptor =
                contentHelper.retrieve(slideToken, revisionDescriptors);
            NodeProperty password =
                revisionDescriptor.getProperty
View Full Code Here

        try {
           
            VersioningHelper vHelp =
                VersioningHelper.getVersioningHelper(slideToken, token, req, resp, getConfig() );
            NodeRevisionDescriptors revisionDescriptors =
                content.retrieve(slideToken, resourcePath);
           
            NodeRevisionNumber revisionNumber =
                revisionDescriptors.getLatestRevision();
            NodeRevisionDescriptor revisionDescriptor = null;
            if (revisionNumber != null) {
                try {
                    revisionDescriptor = content.retrieve
                        (slideToken, revisionDescriptors);
View Full Code Here

        SearchLanguage[] languages =
            token.getSearchHelper().getSupportedLanguages ();
       
        ResourceKind resourceKind = null;
        try {
            NodeRevisionDescriptors revisionDescriptors =
                content.retrieve(slideToken, resourceUri);
            NodeRevisionDescriptor revisionDescriptor =
                content.retrieve(slideToken, revisionDescriptors);
            resourceKind = AbstractResourceKind.determineResourceKind(token, revisionDescriptors, revisionDescriptor);
            resourceExists = true;
View Full Code Here

     */
    private void performLabelOperation(String resourcePath) throws JDOMException, SlideException {
       
        String labelHeader = WebdavUtils.fixTomcatHeader(requestHeaders.getLabel(), "UTF-8");
        String labeledResourceUri = getResourceUri(resourcePath, labelHeader);
        NodeRevisionDescriptors revisionDescriptors =
            content.retrieve( slideToken, labeledResourceUri);
        NodeRevisionDescriptor revisionDescriptor =
            content.retrieve( slideToken, revisionDescriptors);
        ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(token, revisionDescriptors, revisionDescriptor);
        if (resourceKind instanceof Version) {
           
            if (DeltavConstants.E_REMOVE.equals(operation)) {
                PropertyHelper.removeElementFromProperty(revisionDescriptor,
                                                         P_LABEL_NAME_SET,
                                                         E_LABEL_NAME,
                                                         label);
                content.store(slideToken, revisionDescriptors.getUri(), revisionDescriptor, null);
            }
           
            if (DeltavConstants.E_SET.equals(operation)) {
                try {
                    NodeRevisionDescriptor alreadyLabeledDescriptor =
                        versioningHelper.retrieveLabeledRevision(revisionDescriptors.getUri(),
                                                                 label);
                    PropertyHelper.removeElementFromProperty(alreadyLabeledDescriptor,
                                                             P_LABEL_NAME_SET,
                                                             E_LABEL_NAME,
                                                             label);
                    content.store(slideToken, revisionDescriptors.getUri(), alreadyLabeledDescriptor, null);
                }
                catch (LabeledRevisionNotFoundException e) {
                    // there is no version with the given label so far,
                    // so we can perform the <set> operation without any preparation
                }
            }
           
            if (DeltavConstants.E_ADD.equals(operation) ||
                DeltavConstants.E_SET.equals(operation) ) {
                PropertyHelper.addElementToProperty(revisionDescriptor,
                                                    P_LABEL_NAME_SET,
                                                    E_LABEL_NAME,
                                                    label);
                content.store(slideToken, revisionDescriptors.getUri(), revisionDescriptor, null);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.slide.content.NodeRevisionDescriptors

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.