Package org.apache.slide.webdav.util

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


     *                                 properties should be reset.
     */
    private void resetDeltavProperties(NodeRevisionDescriptor revisionDescriptor) {
       
        // use initial values for DeltaV properties
        PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(slideToken, token, getConfig());
        ResourceKind resourceKind = VersionableImpl.getInstance();
        Iterator initialPropertyIterator =
            propertyHelper.createInitialProperties(resourceKind).iterator();
        NodeProperty property = null;
        List initialDeltavProperties = new ArrayList();
        while (initialPropertyIterator.hasNext()) {
            property = (NodeProperty)initialPropertyIterator.next();
            if (DeltavConstants.DELTAV_PROPERTY_LIST.contains(property.getName())) {
View Full Code Here


                        return new ViolatedPrecondition(C_CHECKOUT_OF_VERSION_WITH_DESCENDANT_IS_DISCOURAGED, WebdavStatus.SC_CONFLICT);
                    }
                }
               
                // check if the version is already checked out
                PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(stok, nsaToken, sConf);
               
                NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, cinNrds, cinNrd, req.getContextPath(), null);
                if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                       
                        // check precondition C_CHECKOUT_OF_CHECKED_OUT_VERSION_IS_FORBIDDEN
View Full Code Here

        NodeRevisionContent coutNrc = content.retrieve( sToken, coutNrds, coutNrd );
       
        // update its DAV:checkout-set property
        if (!PropertyHelper.removeHrefFromProperty(coutNrd, P_CHECKOUT_SET, rUri)) {
            StringBuffer b = new StringBuffer("Invalid path");
            PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(sToken, nsaToken, sConf);
            NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, coutNrds, coutNrd, req.getContextPath(), null);
            if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                if (checkoutSetValue.iterator().hasNext()) {
                    b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                }
View Full Code Here

                content.retrieve( sToken, vhrNrds, vrNrnOld ); // vrUriOld
           
            // update the old VR's DAV:checkout-set property
            if (!PropertyHelper.removeHrefFromProperty(vrNrdOld, P_CHECKOUT_SET, rUri)) {
                StringBuffer b = new StringBuffer("Invalid path");
                PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(sToken, nsaToken, sConf);
                NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, vhrNrds, vrNrdOld, req.getContextPath(), null);
                if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                        b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                    }
View Full Code Here

                        return new ViolatedPrecondition(C_CHECKOUT_OF_VERSION_WITH_DESCENDANT_IS_DISCOURAGED, WebdavStatus.SC_CONFLICT);
                    }
                }
               
                // check if the version is already checked out
                PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(stok, nsaToken, sConf);
               
                NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, cinNrds, cinNrd, req.getContextPath(), null);
                if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                       
                        // check precondition C_CHECKOUT_OF_CHECKED_OUT_VERSION_IS_FORBIDDEN
View Full Code Here

        NodeRevisionContent coutNrc = content.retrieve( sToken, coutNrds, coutNrd );
       
        // update its DAV:checkout-set property
        if (!PropertyHelper.removeHrefFromProperty(coutNrd, P_CHECKOUT_SET, rUri)) {
            StringBuffer b = new StringBuffer("Invalid path");
            PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(sToken, nsaToken, sConf);
            NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, coutNrds, coutNrd, req.getContextPath(), null);
            if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                if (checkoutSetValue.iterator().hasNext()) {
                    b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                }
View Full Code Here

                content.retrieve( sToken, vhrNrds, vrNrnOld ); // vrUriOld
           
            // update the old VR's DAV:checkout-set property
            if (!PropertyHelper.removeHrefFromProperty(vrNrdOld, P_CHECKOUT_SET, rUri)) {
                StringBuffer b = new StringBuffer("Invalid path");
                PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(sToken, nsaToken, sConf);
                NodeProperty checkoutSetProp = propertyHelper.getProperty(P_CHECKOUT_SET, vhrNrds, vrNrdOld, req.getContextPath(), null);
                if( checkoutSetProp != null && checkoutSetProp.getValue() != null ) {
                    XMLValue checkoutSetValue = new XMLValue( checkoutSetProp.getValue().toString() );
                    if (checkoutSetValue.iterator().hasNext()) {
                        b.append(" - please use "+checkoutSetValue.getTextValue()+" instead");
                    }
View Full Code Here

     *                                 properties should be reset.
     */
    private void resetDeltavProperties(NodeRevisionDescriptor revisionDescriptor) {
       
        // use initial values for DeltaV properties
        PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(slideToken, token, getConfig());
        ResourceKind resourceKind = VersionableImpl.getInstance();
        Iterator initialPropertyIterator =
            propertyHelper.createInitialProperties(resourceKind).iterator();
        NodeProperty property = null;
        List initialDeltavProperties = new ArrayList();
        while (initialPropertyIterator.hasNext()) {
            property = (NodeProperty)initialPropertyIterator.next();
            if (DeltavConstants.DELTAV_PROPERTY_LIST.contains(property.getName())) {
View Full Code Here

TOP

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

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.