Examples of DavPropertyNameSet


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

        PropPatchMethod method = null;
       try {
             DavPropertySet setProperties = new DavPropertySet();
             setProperties.add(createRegisterNodeTypesProperty(sessionInfo, nodeTypeDefinitions, allowUpdate));
             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) {
             throw new RepositoryException(e);
View Full Code Here

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

        PropPatchMethod method = null;
       try {
             DavPropertySet setProperties = new DavPropertySet();
             setProperties.add(createUnRegisterNodeTypesProperty(sessionInfo, nodeTypeNames));
             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) {
             throw new RepositoryException(e);
View Full Code Here

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

     * and the set of requested property.
     * NOTE: An empty 'propfind' request body will be treated as request for all
     * property according to the specification.
     */
    private void parsePropFindRequest() throws DavException {
        propfindProps = new DavPropertyNameSet();
        Document requestDocument = getRequestDocument();
        // propfind httpRequest with empty body >> retrieve all property
        if (requestDocument == null) {
            return;
        }

        // propfind httpRequest with invalid body
        Element root = requestDocument.getDocumentElement();
        if (!XML_PROPFIND.equals(root.getLocalName())) {
            log.info("PropFind-Request has no <propfind> tag.");
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "PropFind-Request has no <propfind> tag.");
        }
       
        DavPropertyNameSet include = null;

        ElementIterator it = DomUtil.getChildren(root);
        int propfindTypeFound = 0;
       
        while (it.hasNext()) {
            Element child = it.nextElement();
            String nodeName = child.getLocalName();
            if (NAMESPACE.getURI().equals(child.getNamespaceURI())) {
                if (XML_PROP.equals(nodeName)) {
                    propfindType = PROPFIND_BY_PROPERTY;
                    propfindProps = new DavPropertyNameSet(child);
                    propfindTypeFound += 1;
                }
                else if (XML_PROPNAME.equals(nodeName)) {
                    propfindType = PROPFIND_PROPERTY_NAMES;
                    propfindTypeFound += 1;
                }
                else if (XML_ALLPROP.equals(nodeName)) {
                    propfindType = PROPFIND_ALL_PROP;
                    propfindTypeFound += 1;
                }
                else if (XML_INCLUDE.equals(nodeName)) {
                    include = new DavPropertyNameSet();
                    ElementIterator pit = DomUtil.getChildren(child);
                    while (pit.hasNext()) {
                        include.add(DavPropertyName.createFromXml(pit.nextElement()));
                    }
                }
            }
        }
       
View Full Code Here

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

     * and the set of requested property.
     * NOTE: An empty 'propfind' request body will be treated as request for all
     * property according to the specification.
     */
    private void parsePropFindRequest() throws DavException {
        propfindProps = new DavPropertyNameSet();
        Document requestDocument = getRequestDocument();
        // propfind httpRequest with empty body or invalid Xml >> retrieve all property
        // TODO: invalid XML -> spec requires a 'BAD REQUEST' error code
        if (requestDocument == null) {
            return;
        }

        // propfind httpRequest with invalid body
        Element root = requestDocument.getDocumentElement();
        if (!XML_PROPFIND.equals(root.getLocalName())) {
            log.info("PropFind-Request has no <profind> tag.");
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "PropFind-Request has no <profind> tag.");
        }

        ElementIterator it = DomUtil.getChildren(root);
        while (it.hasNext()) {
            Element child = it.nextElement();
            String nodeName = child.getLocalName();
            if (XML_PROP.equals(nodeName)) {
                propfindType = PROPFIND_BY_PROPERTY;
                propfindProps = new DavPropertyNameSet(child);
                break;
            } else if (XML_PROPNAME.equals(nodeName)) {
                propfindType = PROPFIND_PROPERTY_NAMES;
                break;
            } else if (XML_ALLPROP.equals(nodeName)) {
View Full Code Here

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

     * Parse the PROPPATCH request body.
     */
    private void parsePropPatchRequest() throws DavException {

        proppatchSet = new DavPropertySet();
        proppatchRemove = new DavPropertyNameSet();
        Document requestDocument = getRequestDocument();

        if (requestDocument == null) {
            throw new DavException(DavServletResponse.SC_BAD_REQUEST, "Invalid request body.");
        }
View Full Code Here

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

            }
            // 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
            DavPropertyIterator iter = resource.getProperties().iterator();
            while (iter.hasNext()) {
                DavProperty property = iter.nextProperty();
                if ((propFindType == PROPFIND_ALL_PROP && !property.isProtected()) || propNameSet.remove(property.getName())) {
View Full Code Here

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

        Integer statusKey = new Integer(status);
        PropContainer propContainer;
        Object entry = statusMap.get(statusKey);
        if (entry == null) {
            if (forNames) {
                propContainer = new DavPropertyNameSet();
            } else {
                propContainer = new DavPropertySet();
            }
            statusMap.put(statusKey, propContainer);
        } else {
View Full Code Here

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

            Object mapEntry = statusMap.get(key);
            if (mapEntry != null && mapEntry instanceof DavPropertyNameSet) {
                return (DavPropertyNameSet)mapEntry;
        }
                    }
        return new DavPropertyNameSet();
    }
View Full Code Here

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

        }

        // if property name set if present
        Element propElem = DomUtil.getChildElement(mergeElement, DavConstants.XML_PROP, DavConstants.NAMESPACE);
        if (propElem != null) {
            propertyNameSet = new DavPropertyNameSet(propElem);
            mergeElement.removeChild(propElem);
        } else {
            propertyNameSet = new DavPropertyNameSet();
        }
        this.mergeElement = mergeElement;
    }
View Full Code Here

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

    public ReportInfo(ReportType type, int depth, DavPropertyNameSet propertyNames) {
        this.typeLocalName = type.getLocalName();
        this.typeNamespace = type.getNamespace();
        this.depth = depth;
        if (propertyNames != null) {
            this.propertyNames = new DavPropertyNameSet(propertyNames);
        } else {
            this.propertyNames = new DavPropertyNameSet();
        }
    }
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.