Package org.apache.slide.content

Examples of org.apache.slide.content.NodeProperty$Kind


        }
        // Added for DeltaV --end--
       
        if (isMsProprietarySupport()) {
           
            NodeProperty property = null;
           
            // Name
            /*
             property = new NodeProperty("name", colName, "ms", "MICROSOFT");
             properties.setProperty(property);
             */
           
            // ParentName
            // TODO : Fix this
            /*
             property = new NodeProperty("parentname", colName, "ms",
             "MICROSOFT");
             properties.setProperty(property);
             */
           
            // Href
            /*
             property = new NodeProperty("href", colName, "ms", "MICROSOFT");
             properties.setProperty(property);
             */
           
            // Is hidden
            property = new NodeProperty("ishidden", "0", "MICROSOFT");
            revisionDescriptor.setProperty(property);
           
            // Is collection
            property = new NodeProperty("iscollection", "1", "MICROSOFT");
            revisionDescriptor.setProperty(property);
           
            // Is read only
            property = new NodeProperty("isreadonly", "0", "MICROSOFT");
            revisionDescriptor.setProperty(property);
           
            // Last accessed
            property = new NodeProperty("lastaccessed",
                                            (new Date()).toString(), "MICROSOFT");
            revisionDescriptor.setProperty(property);
           
        }
       
View Full Code Here


           
            NodeRevisionDescriptors revisionDescriptors =
                contentHelper.retrieve(slideToken, usersPath + "/" + username);
            NodeRevisionDescriptor revisionDescriptor =
                contentHelper.retrieve(slideToken, revisionDescriptors);
            NodeProperty password =
                revisionDescriptor.getProperty
                ("password", NodeProperty.SLIDE_NAMESPACE);
            if (password != null) {
                passwordValue = (String) password.getValue();
            }
           
        } catch (SlideException e) {
            // Whatever happens doesn't really matter
            // The stack trace is displayed for now for debug purposes
View Full Code Here

            PropPatchProperty currentProperty = null;
            while (propertyIterator.hasNext()) {
               
                currentProperty = (PropPatchProperty)propertyIterator.next();
                if (checkPropertyModification(currentProperty, revisionDescriptor, resourceKind)) {
                    NodeProperty newProperty =
                        new NodeProperty(currentProperty.getName(),
                                         currentProperty.getValue(),
                                         currentProperty.getNamespace());
                    revisionDescriptor.setProperty(newProperty);
                   
                }
View Full Code Here

        ViolatedPrecondition violatedPrecondition = getPropertySpecificPreconditionViolation(property);
        if (violatedPrecondition != null) {
            property.setViolatedPrecondition(violatedPrecondition);
        }
        else {
            NodeProperty originalProperty = rd.getProperty(property.getName(), property.getNamespace());
            if (originalProperty == null) {
                // computed properties can not be modified
                result = (!AbstractResourceKind.isComputedProperty(property.getName()));
            }
            else {
                result = !originalProperty.isProtected();
            }
           
            if ( ! result ) {
                property.setErrorMessage("Property " + property.getQualifiedNameAsElementString() + " is protected");
            }
View Full Code Here

     * @return     <code>true</code>, if the label was found.
     */
    protected boolean hasLabel(NodeRevisionDescriptor revisionDescriptor, String label) {
       
        boolean containsLabel = false;
        NodeProperty labelNameSetProperty = revisionDescriptor.getProperty(DeltavConstants.P_LABEL_NAME_SET);
        if ( (labelNameSetProperty != null) && (labelNameSetProperty.getValue() != null) ) {
            try {
                XMLValue xmlValue = new XMLValue(labelNameSetProperty.getValue().toString());
                Iterator iterator = xmlValue.iterator();
                while ( !containsLabel && iterator.hasNext()) {
                    containsLabel = label.equals(((Element)iterator.next()).getText());
                }
            }
View Full Code Here

                content.retrieve( sToken, hpath );
           
            NodeRevisionDescriptor hpathNrd =
                content.retrieve( sToken, hpathNrds );
           
            NodeProperty nextHnProp = hpathNrd.getProperty(I_NEXT_HISTORY_NAME,
                                                           NamespaceCache.SLIDE_URI);
            if (nextHnProp == null) {
                // convert to slide namespace if this property is still
                // in DAV: namespace
                nextHnProp = hpathNrd.getProperty( I_NEXT_HISTORY_NAME );
                if (nextHnProp != null) {
                    hpathNrd.removeProperty(nextHnProp);
                    nextHnProp = new NodeProperty(I_NEXT_HISTORY_NAME,
                                                  nextHnProp.getValue(),
                                                  NamespaceCache.SLIDE_URI);
                    nextHnProp.setKind( NodeProperty.Kind.PROTECTED );
                    hpathNrd.setProperty( nextHnProp );
                }
            }
            if( nextHnProp == null || nextHnProp.getValue() == null ) {
                nextHnProp =
                    new NodeProperty(I_NEXT_HISTORY_NAME,
                                     I_INITIAL_HISTORY_NAME,
                                     NamespaceCache.SLIDE_URI);
                nextHnProp.setKind( NodeProperty.Kind.PROTECTED );
                hpathNrd.setProperty( nextHnProp );
            }
           
            String nextHnStr = (String)nextHnProp.getValue();
            result = new UriHandler( hpath+"/"+nextHnStr );
           
            long nextHnLong = Long.parseLong( nextHnStr );
            nextHnProp = new NodeProperty(I_NEXT_HISTORY_NAME,
                                          String.valueOf(nextHnLong + 1),
                                          NamespaceCache.SLIDE_URI );
            hpathNrd.setProperty( nextHnProp );
           
            content.store( sToken, hpath, hpathNrd, null ); //revisionContent = null
View Full Code Here

            content.retrieve( sToken, wrpath );
       
        NodeRevisionDescriptor wrpathNrd =
            content.retrieve( sToken, wrpathNrds );
       
        NodeProperty nextWrnProp = wrpathNrd.getProperty(I_NEXT_WORKINGRESOURCE_NAME,
                                                         NamespaceCache.SLIDE_URI);
        if (nextWrnProp == null) {
            // convert to slide namespace if this property is still
            // in DAV: namespace
            nextWrnProp = wrpathNrd.getProperty( I_NEXT_WORKINGRESOURCE_NAME );
            if (nextWrnProp != null) {
                wrpathNrd.removeProperty(nextWrnProp);
                nextWrnProp = new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
                                               nextWrnProp.getValue(),
                                               NamespaceCache.SLIDE_URI);
                nextWrnProp.setKind( NodeProperty.Kind.PROTECTED );
                wrpathNrd.setProperty( nextWrnProp );
            }
        }
       
        if( nextWrnProp == null || nextWrnProp.getValue() == null ) {
            nextWrnProp =
                new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
                                 I_INITIAL_WORKINGRESOURCE_NAME,
                                 NamespaceCache.SLIDE_URI );
            nextWrnProp.setKind( NodeProperty.Kind.PROTECTED );
            wrpathNrd.setProperty( nextWrnProp );
        }
       
        String nextWrnStr = (String)nextWrnProp.getValue();
        result = new UriHandler( wrpath+"/"+nextWrnStr );
       
        long nextWrnLong = Long.parseLong( nextWrnStr );
        nextWrnProp = new NodeProperty(I_NEXT_WORKINGRESOURCE_NAME,
                                       String.valueOf(nextWrnLong + 1),
                                       NamespaceCache.SLIDE_URI );
        wrpathNrd.setProperty( nextWrnProp );
       
        content.store( sToken, wrpath, wrpathNrd, null ); //revisionContent = null
View Full Code Here

     */
    private void restoreLiveProperties(String destinationUri, NodeRevisionDescriptor destinationNrd, NodeRevisionDescriptor existingNrd) {
       
        // remove all live properties
        Enumeration propertyEnum = destinationNrd.enumerateProperties();
        NodeProperty property = null;
        while (propertyEnum.hasMoreElements()) {
            property = (NodeProperty)propertyEnum.nextElement();
            if (isLivePropertyToRestore(destinationUri, property)) {
                destinationNrd.removeProperty(property);
            }
View Full Code Here

        // 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())) {
                initialDeltavProperties.add(property);
            }
        }
       
        Enumeration propertyEnum = revisionDescriptor.enumerateProperties();
        property = null;
        int index = 0;
        while (propertyEnum.hasMoreElements()) {
            property = (NodeProperty)propertyEnum.nextElement();
            if (DeltavConstants.DELTAV_PROPERTY_LIST.contains(property.getName())) {
                index = initialDeltavProperties.indexOf(property);
                if (index >= 0) {
                    revisionDescriptor.setProperty((NodeProperty)initialDeltavProperties.get(index));
                }
                else {
View Full Code Here

        NodeRevisionDescriptor revisionDescriptor =
            content.retrieve(slideToken, revisionDescriptors);
        ResourceKind resourceKind = AbstractResourceKind.determineResourceKind(token, uri, revisionDescriptor);
        if( Configuration.useVersionControl() &&
               (resourceKind instanceof CheckedOutVersionControlled) ) {
            NodeProperty checkinLocktokenProperty =
                revisionDescriptor.getProperty(DeltavConstants.I_CHECKIN_LOCKTOKEN,
                                               NodeProperty.NamespaceCache.SLIDE_URI);
            if (checkinLocktokenProperty == null) {
                // retry with default (DAV:) namespace which was the
                // former namespace of this property
                checkinLocktokenProperty =
                    revisionDescriptor.getProperty(DeltavConstants.I_CHECKIN_LOCKTOKEN);
            }
            if ( (checkinLocktokenProperty != null) && (checkinLocktokenProperty.getValue() != null)
                // && slideToken.checkLockToken(checkinLocktokenProperty.getValue().toString())
               ) {
                VersioningHelper versionHelper = VersioningHelper.getVersioningHelper(slideToken, token, req, resp, config);
                try {
                    versionHelper.checkin(revisionDescriptors, revisionDescriptor, false, false, true);
View Full Code Here

TOP

Related Classes of org.apache.slide.content.NodeProperty$Kind

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.