Package org.apache.jackrabbit.webdav.property

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


    /**
     * @see RepositoryService#getLockInfo(SessionInfo, NodeId)
     */
    public LockInfo getLockInfo(SessionInfo sessionInfo, NodeId nodeId) throws RepositoryException {
        // set of Dav-properties to be retrieved
        DavPropertyNameSet nameSet = new DavPropertyNameSet();
        nameSet.add(DavPropertyName.LOCKDISCOVERY);
        nameSet.add(ItemResourceConstants.JCR_PARENT);

        PropFindMethod method = null;
        try {
            String uri = getItemUri(nodeId, sessionInfo);
            method = new PropFindMethod(uri, nameSet, DEPTH_0);
View Full Code Here


            if (removeExisting) {
                Element uElem = UpdateInfo.createUpdateElement(updateSource, updateType, domFactory);
                DomUtil.addChildElement(uElem, ItemResourceConstants.XML_REMOVEEXISTING, ItemResourceConstants.NAMESPACE);
                uInfo = new UpdateInfo(uElem);
            } else {
                uInfo = new UpdateInfo(updateSource, updateType, new DavPropertyNameSet());
            }

            UpdateMethod method = new UpdateMethod(uri, uInfo);
            execute(method, sessionInfo);
        } catch (IOException e) {
View Full Code Here

        PropPatchMethod method = null;
        try {
            String uri = uriResolver.getWorkspaceUri(sessionInfo.getWorkspaceName());

            method = new PropPatchMethod(uri, setProperties, new DavPropertyNameSet());
            initMethod(method, sessionInfo, true);

            getClient(sessionInfo).executeMethod(method);
            method.checkSuccess();
        } catch (IOException e) {
View Full Code Here

public class PropFindMethod extends DavMethodBase {

    private static Logger log = LoggerFactory.getLogger(PropFindMethod.class);

    public PropFindMethod(String uri) throws IOException {
        this(uri, PROPFIND_ALL_PROP, new DavPropertyNameSet(), DEPTH_INFINITY);
    }
View Full Code Here

        this(uri, PROPFIND_BY_PROPERTY, propNameSet, depth);
    }

    public PropFindMethod(String uri, int propfindType, int depth)
        throws IOException {
        this(uri, propfindType, new DavPropertyNameSet(), depth);
    }
View Full Code Here

            response.sendError(DavServletResponse.SC_NOT_FOUND);
            return;
        }

        int depth = request.getDepth(DEPTH_INFINITY);
        DavPropertyNameSet requestProperties = request.getPropFindProperties();
        int propfindType = request.getPropFindType();

        MultiStatus mstatus = new MultiStatus();
        mstatus.addResourceProperties(resource, requestProperties, propfindType, depth);
        response.sendMultiStatus(mstatus);
View Full Code Here

            response.sendError(DavServletResponse.SC_NOT_FOUND);
            return;
        }

        int depth = request.getDepth(DEPTH_INFINITY);
        DavPropertyNameSet requestProperties = request.getPropFindProperties();
        int propfindType = request.getPropFindType();

        MultiStatus mstatus = new MultiStatus();
        mstatus.addResourceProperties(resource, requestProperties, propfindType, depth);
        response.sendMultiStatus(mstatus);
View Full Code Here

            }
            // all or a specified set of property and their values requested.
        } else {
            PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, false);
            // clone set of property, since several resources could use this again
            propNameSet = new DavPropertyNameSet(propNameSet);
            // Add requested properties or all non-protected properties, or
            // non-protected properties plus requested properties (allprop/include)
            DavPropertyIterator iter = resource.getProperties().iterator();
            while (iter.hasNext()) {
                DavProperty<?> property = iter.nextProperty();
View Full Code Here

     */
    private PropContainer getPropContainer(int status, boolean forNames) {
        PropContainer propContainer = statusMap.get(status);
        if (propContainer == null) {
            if (forNames) {
                propContainer = new DavPropertyNameSet();
            } else {
                propContainer = new DavPropertySet();
            }
            statusMap.put(status, propContainer);
        }
View Full Code Here

    public DavPropertyNameSet getPropertyNames(int status) {
        if (statusMap.containsKey(status)) {
            PropContainer mapEntry = statusMap.get(status);
            if (mapEntry != null) {
                if (mapEntry instanceof DavPropertySet) {
                    DavPropertyNameSet set = new DavPropertyNameSet();
                    for (DavPropertyName name : ((DavPropertySet) mapEntry).getPropertyNames()) {
                        set.add(name);
                    }
                    return set;
                } else {
                    // is already a DavPropertyNameSet
                    return (DavPropertyNameSet) mapEntry;
                }
            }
        }
        return new DavPropertyNameSet();
    }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.property.DavPropertyNameSet

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.