Examples of HrefProperty


Examples of org.apache.jackrabbit.webdav.property.HrefProperty

                addHrefProperty(VersionResource.PREDECESSOR_SET, v.getPredecessors(), true);
                addHrefProperty(SUCCESSOR_SET, v.getSuccessors(), true);

                // required DAV:version-history (computed) property
                String vhHref = getLocatorFromItem(getVersionHistoryItem()).getHref(true);
                properties.add(new HrefProperty(VersionResource.VERSION_HISTORY, vhHref, true));

                // required DAV:checkout-set (computed) property
                PropertyIterator it = v.getReferences();
                List nodeList = new ArrayList();
                while (it.hasNext()) {
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

        }

        // required root-version property for version-history resource
        try {
            String rootVersionHref = getLocatorFromItem(((VersionHistory)item).getRootVersion()).getHref(true);
            properties.add(new HrefProperty(VersionHistoryResource.ROOT_VERSION, rootVersionHref, true));
        } catch (RepositoryException e) {
            log.error(e.getMessage());
        }

        // required, protected version-set property for version-history resource
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

                properties.add(new DefaultDavProperty(JCR_PATH, item.getPath()));
                properties.add(new DefaultDavProperty(JCR_DEPTH, String.valueOf(item.getDepth())));
                // add href-property for the items parent unless its the root item
                if (item.getDepth() > 0) {
                    String parentHref = getLocatorFromItem(item.getParent()).getHref(true);
                    properties.add(new HrefProperty(JCR_PARENT, parentHref, false));
                }
                // protected 'definition' property revealing the item definition
                ItemDefinitionImpl val;
                if (item.isNode()) {
                    val = NodeDefinitionImpl.create(((Node)item).getDefinition());
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

  properties.add(new DefaultDavProperty(DeltaVConstants.COMMENT, null, true));

  // 'workspace' property as defined by RFC 3253
  String workspaceHref = getWorkspaceHref();
  if (workspaceHref != null) {
      properties.add(new HrefProperty(DeltaVConstants.WORKSPACE, workspaceHref, true));
  }
  // TODO: required supported-live-property-set
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

        }
        String[] pHref = new String[values.length];
        for (int i = 0; i < values.length; i++) {
            pHref[i] = getLocatorFromItem(values[i]).getHref(true);
        }
        properties.add(new HrefProperty(name, pHref, isProtected));
    }
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

    private NodeId getParentId(DavPropertySet propSet, SessionInfo sessionInfo)
        throws RepositoryException {
        NodeId parentId = null;
        if (propSet.contains(ItemResourceConstants.JCR_PARENT)) {
            HrefProperty parentProp = new HrefProperty(propSet.get(ItemResourceConstants.JCR_PARENT));
            String parentHref = parentProp.getHrefs().get(0);
            if (parentHref != null && parentHref.length() > 0) {
                parentId = uriResolver.getNodeId(parentHref, sessionInfo);
            }
        }
        return parentId;
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

                    sessionInfo = new SessionInfoImpl(credentials, wspName);
                } else if (!wspName.equals(workspaceName)) {
                    throw new LoginException("Login failed: Invalid workspace name '" + workspaceName + "'.");
                }
            } else if (props.contains(DeltaVConstants.WORKSPACE)) {
                String wspHref = new HrefProperty(props.get(DeltaVConstants.WORKSPACE)).getHrefs().get(0);
                String wspName = Text.unescape(Text.getName(wspHref, true));
                if (!wspName.equals(workspaceName)) {
                    throw new LoginException("Login failed: Invalid workspace name " + workspaceName);
                }
            } else {
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

            MultiStatusResponse[] responses = method.getResponseBodyAsMultiStatus().getResponses();
            Set<String> wspNames = new HashSet<String>();
            for (MultiStatusResponse response : responses) {
                DavPropertySet props = response.getProperties(DavServletResponse.SC_OK);
                if (props.contains(DeltaVConstants.WORKSPACE)) {
                    HrefProperty hp = new HrefProperty(props.get(DeltaVConstants.WORKSPACE));
                    String wspHref = hp.getHrefs().get(0);
                    String name = Text.unescape(Text.getName(wspHref, true));
                    wspNames.add(name);
                }
            }
            return wspNames.toArray(new String[wspNames.size()]);
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

                                       SessionInfo sessionInfo,
                                       NamePathResolver resolver) throws NameException, RepositoryException {
        NodeId id = uriResolver.buildNodeId(parentId, nodeResponse, sessionInfo.getWorkspaceName(), getNamePathResolver(sessionInfo));
        NodeInfoImpl nInfo = new NodeInfoImpl(id, propSet, resolver);
        if (propSet.contains(ItemResourceConstants.JCR_REFERENCES)) {
            HrefProperty refProp = new HrefProperty(propSet.get(ItemResourceConstants.JCR_REFERENCES));
            for (String propertyHref : refProp.getHrefs()) {
                PropertyId propertyId = uriResolver.getPropertyId(propertyHref, sessionInfo);
                nInfo.addReference(propertyId);
            }
        }
        return nInfo;
View Full Code Here

Examples of org.apache.jackrabbit.webdav.property.HrefProperty

                        p = props.get(ItemResourceConstants.JCR_REFERENCES);
                    }

                    if (p != null) {
                        refIds = new ArrayList<PropertyId>();
                        HrefProperty hp = new HrefProperty(p);
                        for (String propHref : hp.getHrefs()) {
                            PropertyId propId = uriResolver.getPropertyId(propHref, sessionInfo);
                            if (propertyName == null || propertyName.equals(propId.getName())) {
                                refIds.add(propId);
                            }
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.