Package org.apache.jackrabbit.webdav.property

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


     */
    private void internalSetProperty(DavProperty<?> property) throws DavException {
        if (!exists()) {
            throw new DavException(DavServletResponse.SC_NOT_FOUND);
        }
        DavPropertyName propName = property.getName();
        if (JCR_MIXINNODETYPES.equals(propName)) {
            Node n = (Node) item;
            try {
                NodeTypeProperty mix = new NodeTypeProperty(property);
                Set<String> mixins = mix.getNodeTypeNames();
View Full Code Here


    @Override
    public MultiStatusResponse alterProperties(List<? extends PropEntry> changeList) throws DavException {
        for (PropEntry propEntry : changeList) {
            if (propEntry instanceof DavPropertyName) {
                // use the internal remove method in order to prevent premature 'save'
                DavPropertyName propName = (DavPropertyName) propEntry;
                internalRemoveProperty(propName);
            } else if (propEntry instanceof DavProperty) {
                // use the internal set method in order to prevent premature 'save'
                DavProperty<?> prop = (DavProperty<?>) propEntry;
                internalSetProperty(prop);
View Full Code Here

                PropertyDefinition def = p.getDefinition();
                if (def.isMultiple() || isFilteredItem(p)) {
                    log.debug("Property '" + pName + "' not added to webdav property set (either multivalue or filtered).");
                    continue;
                }
                DavPropertyName name = getDavName(pName, node.getSession());
                String value = p.getValue().getString();
                properties.add(new DefaultDavProperty(name, value, def.isProtected()));
            }
        } catch (RepositoryException e) {
            log.error("Unexpected error while retrieving properties: " + e.getMessage());
View Full Code Here

            }
        }

        Iterator remNameIter = removePropertyNames.iterator();
        while (remNameIter.hasNext()) {
            DavPropertyName propName = (DavPropertyName) remNameIter.next();
            try {
                removeJcrProperty(propName);
                successList.add(propName);
            } catch (RepositoryException e) {
                msr.add(propName, new JcrDavException(e).getErrorCode());
View Full Code Here

        // check for conflicts with reserved webdav-namespaces
        if (reservedNamespaces.containsKey(prefix) && !reservedNamespaces.get(prefix).equals(uri)) {
            prefix = prefix + "0";
        }
        Namespace namespace = Namespace.getNamespace(prefix, uri);
        DavPropertyName name = DavPropertyName.create(localName, namespace);
        return name;
    }
View Full Code Here

            }
        }

        public void setProperty(Object propertyName, Object propertyValue) {
            if (propertyName instanceof DavPropertyName) {
                DavPropertyName pName = (DavPropertyName)propertyName;
                properties.add(new DefaultDavProperty(pName, propertyValue));
            }
        }
View Full Code Here

            // retrieve the namespace present in the "namespace" attribute
            // NOTE: if this attribute is missing the DAV: namespace represents the default.
            String namespaceAttr = propertyElem.getAttribute(ATTR_NAMESPACE);
            Namespace namespace = (namespaceAttr != null) ? Namespace.getNamespace(namespaceAttr) : NAMESPACE;

            DavPropertyName propName = DavPropertyName.create(nameAttr, namespace);
            DavProperty p = res.getProperty(propName);
            if (p != null) {
                if (p instanceof HrefProperty && res instanceof DeltaVResource) {
                    ElementIterator it = DomUtil.getChildren(propertyElem, XML_PROPERTY, NAMESPACE);
                    resp.add(new ExpandProperty((DeltaVResource)res, (HrefProperty)p, it));
View Full Code Here

            if (!propNameSet.isEmpty() && propFindType != PROPFIND_ALL_PROP) {
                PropContainer status404 = getPropContainer(DavServletResponse.SC_NOT_FOUND, true);
                DavPropertyNameIterator iter1 = propNameSet.iterator();
                while (iter1.hasNext()) {
                    DavPropertyName propName = iter1.nextPropertyName();
                    status404.addContent(propName);
                }
            }
        }
    }
View Full Code Here

                            // property
                            DavProperty property = DefaultDavProperty.createFromXml(el);
                            response.add(property, statusCode);
                        } else {
                            // property-name only
                            DavPropertyName propName = DavPropertyName.createFromXml(el);
                            response.add(propName, statusCode);
                        }
                    }
                }
            }
View Full Code Here

            // use the internal set method in order to prevent premature 'save'
            internalSetProperty(prop);
        }
        Iterator remNameIter = removePropertyNames.iterator();
        while (remNameIter.hasNext()) {
            DavPropertyName propName = (DavPropertyName) remNameIter.next();
            // use the internal set method in order to prevent premature 'save'
            internalRemoveProperty(propName);
        }
        // TODO: missing undo of successful set/remove if subsequent operation fails
        // NOTE, that this is relevant with transactions only.
View Full Code Here

TOP

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

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.