Examples of PropContainer


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

                               int propFindType) {
        this(resource.getHref(), null, TYPE_PROPSTAT);

        // only property names requested
        if (propFindType == PROPFIND_PROPERTY_NAMES) {
            PropContainer status200 = getPropContainer(DavServletResponse.SC_OK, true);
            DavPropertyName[] propNames = resource.getPropertyNames();
            for (int i = 0; i < propNames.length; i++) {
                status200.addContent(propNames[i]);
            }
            // 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();
                boolean allDeadPlusRfc4918LiveProperties =
                    propFindType == PROPFIND_ALL_PROP || propFindType == PROPFIND_ALL_PROP_INCLUDE;
                boolean wasRequested = propNameSet.remove(property.getName());
               
                if ((allDeadPlusRfc4918LiveProperties && !property.isInvisibleInAllprop()) || wasRequested) {
                    status200.addContent(property);
                }
            }

            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
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.