Package org.apache.slide.content

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


     *
     */
    public int contains (String literal) {
        int result = Literals.UNKNOWN;
       
        NodeProperty property = getProperty("getcontenttype");
       
        if (property != null) {
            String contentType = (String) property.getValue();
            if (!containsForbiddenOn.contains (contentType)) {
               
                try {
                    NodeRevisionContent revisionContent = contentHelper.retrieve (slideToken, revisionDescriptors, revisionDescriptor);
                   
View Full Code Here


                    versioningHelper.setWorkspaceProperty( resourcePath, revisionDescriptor );
                }
                // Added for DeltaV --end--
               
                if (isMsProprietarySupport()) {
                    NodeProperty property = null;
                    // Is hidden
                    property = new NodeProperty("ishidden", "0", "MICROSOFT");
                    revisionDescriptor.setProperty(property);
                   
                    // Is collection
                    property = new NodeProperty("iscollection", "0",
                                                "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

    }
   
    private String getHistoryUriOfVCR(NodeRevisionDescriptor revisionDescriptor) {
       
        String historyUri = null;
        NodeProperty property = revisionDescriptor.getProperty(P_CHECKED_IN);
        if (property == null) {
            property = revisionDescriptor.getProperty(P_CHECKED_OUT);
        }
        if ( (property != null) && (property.getValue() != null) ) {
            try {
                XMLValue xmlValue = new XMLValue(property.getValue().toString());
                Iterator iterator = xmlValue.iterator();
                if (iterator.hasNext()) {
                    String vrUri = ((Element)iterator.next()).getText();
                    UriHandler uriHandler = UriHandler.getUriHandler(vrUri);
                    if (uriHandler.isVersionUri()) {
View Full Code Here

            || principalNode == SubjectNode.UNAUTHENTICATED
           )  {
            return null;
        }
        else if (principalNode == SubjectNode.OWNER) {
            NodeProperty ownerProp = nrd.getProperty(P_OWNER);
            if (ownerProp != null) {
                return token.getNamespaceConfig().getUsersPath()+"/"+ownerProp.getValue();
            }
            else {
                return null;
            }
        }
View Full Code Here

                (Configuration) propertyDefinitions.nextElement();
            String propertyName = propertyDefinition.getAttribute("name");
            String propertyValue = propertyDefinition.getValue();
            String propertyNamespace = propertyDefinition.getAttribute
                ("namespace", NodeProperty.DEFAULT_NAMESPACE);
            NodeProperty property = revisionDescriptor.getProperty
                (propertyName, propertyNamespace);
            if (property == null)
                revisionDescriptor.setProperty(propertyName, propertyNamespace,
                                               propertyValue);
        }
View Full Code Here

     */
    private Set getActionAggregates(ActionNode aNode) throws SlideException, JDOMException {
        Set result = new HashSet();
        Uri aNodeUri = namespace.getUri(aNode.getUri());
        NodeRevisionDescriptor aNrd = aNodeUri.getStore().retrieveRevisionDescriptor(aNodeUri, new NodeRevisionNumber());
        NodeProperty membersProp = aNrd.getProperty("privilege-member-set");
        if (membersProp != null && membersProp.getValue() != null) {
            XMLValue membersVal;
            if (membersProp.getValue() instanceof XMLValue) {
                membersVal = (XMLValue)membersProp.getValue();
            }
            else {
                membersVal = new XMLValue((String)membersProp.getValue());
            }
            Iterator mUris = membersVal.getHrefStrings().iterator();
            while (mUris.hasNext()) {
                result.add(ActionNode.getActionNode((String)mUris.next()));
            }
View Full Code Here

        else {
            Uri groupUri = namespace.getUri(token, matchSubject.getUri());
            try {
                NodeRevisionDescriptor nrd =
                    groupUri.getStore().retrieveRevisionDescriptor(groupUri, new NodeRevisionNumber());
                NodeProperty membersetProp = nrd.getProperty("group-member-set");
                if (membersetProp != null && membersetProp.getValue() != null) {
                    XMLValue xmlVal = new XMLValue((String)membersetProp.getValue());
                    List memberNodes = xmlVal.getHrefNodes();
                    if (memberNodes.contains(checkSubject)) {
                        return true;
                    }
                    else if (level > 0) {
View Full Code Here

                    String role = b.getName();
                    Uri roleUri = namespace.getUri(token, namespaceConfig.getRolesPath()+"/"+role);
                    try {
                        NodeRevisionDescriptor nrd =
                            roleUri.getStore().retrieveRevisionDescriptor(roleUri, new NodeRevisionNumber());
                        NodeProperty membersetProp = nrd.getProperty("group-member-set");
                        if (membersetProp != null && membersetProp.getValue() != null) {
                            XMLValue xmlVal = new XMLValue((String)membersetProp.getValue());
                            List memberNodes = xmlVal.getHrefNodes();
                            if (memberNodes.contains(subjectNode)) {
                                result.add(roleUri.toString());
                            }
                        }
                    } catch (RevisionDescriptorNotFoundException e) {
                    } catch (JDOMException e) {}
                }
            }
        }
        Uri groupsUri = null;
        ObjectNode groupsNode = null;
        if (namespaceConfig.getGroupsPath() != null && namespaceConfig.getGroupsPath().length() != 0) {
            groupsUri = namespace.getUri(token, namespaceConfig.getGroupsPath());
            try {
                groupsNode = groupsUri.getStore().retrieveObject(groupsUri);
            } catch (ObjectNotFoundException e) {}
            if (groupsNode != null) {
                Enumeration rolesEnum = groupsNode.enumerateBindings();
                while (rolesEnum.hasMoreElements()) {
                    ObjectNode.Binding b = (ObjectNode.Binding)rolesEnum.nextElement();
                    String group = b.getName();
                    Uri roleUri = namespace.getUri(token, namespaceConfig.getGroupsPath()+"/"+group);
                    try {
                        NodeRevisionDescriptor nrd =
                            roleUri.getStore().retrieveRevisionDescriptor(roleUri, new NodeRevisionNumber());
                        NodeProperty membersetProp = nrd.getProperty("group-member-set");
                        if (membersetProp != null && membersetProp.getValue() != null) {
                            XMLValue xmlVal = new XMLValue((String)membersetProp.getValue());
                            List memberNodes = xmlVal.getHrefNodes();
                            if (memberNodes.contains(subjectNode)) {
                                result.add(roleUri.toString());
                            }
                        }
View Full Code Here

    private boolean matchOwner(SlideToken token, ObjectNode objectNode, SubjectNode checkSubject) throws ServiceAccessException {
        Uri objectUri = namespace.getUri(token, objectNode.getUri());
        try {
            NodeRevisionDescriptor nrd =
                objectUri.getStore().retrieveRevisionDescriptor(objectUri, new NodeRevisionNumber());
            NodeProperty ownerProp = nrd.getProperty("owner");
            if (ownerProp != null && ownerProp.getValue() != null) {
                String usersPath = namespace.getConfig().getUsersPath();
                SubjectNode ownerSubject = SubjectNode.getSubjectNode(usersPath+"/"+ownerProp.getValue());
                return ownerSubject.equals(checkSubject);
            }
            else {
                return false;
            }
View Full Code Here

            if (currentDefaultProperties == null) {
                currentDefaultProperties = new Vector();
                defaultProperties.put(role, currentDefaultProperties);
            }
            currentDefaultProperties.addElement
                (new NodeProperty(name, value, namespace));
        }
    }
View Full Code Here

TOP

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

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.