Class DavPropertySet
java.lang.Object
org.apache.jackrabbit.webdav.property.PropContainer
org.apache.jackrabbit.webdav.property.DavPropertySet
- All Implemented Interfaces:
Iterable<DavProperty<?>>,DavConstants,XmlSerializable
The
DavPropertySet class represents a set of WebDAV
property.-
Field Summary
Fields inherited from interface org.apache.jackrabbit.webdav.DavConstants
creationDateFormat, DEPTH_0, DEPTH_1, DEPTH_INFINITY, DEPTH_INFINITY_S, HEADER_AUTHORIZATION, HEADER_CONTENT_LANGUAGE, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_DAV, HEADER_DEPTH, HEADER_DESTINATION, HEADER_ETAG, HEADER_IF, HEADER_LAST_MODIFIED, HEADER_LOCK_TOKEN, HEADER_OVERWRITE, HEADER_TIMEOUT, INFINITE_TIMEOUT, modificationDateFormat, NAMESPACE, OPAQUE_LOCK_TOKEN_PREFIX, PROPERTY_CREATIONDATE, PROPERTY_DISPLAYNAME, PROPERTY_GETCONTENTLANGUAGE, PROPERTY_GETCONTENTLENGTH, PROPERTY_GETCONTENTTYPE, PROPERTY_GETETAG, PROPERTY_GETLASTMODIFIED, PROPERTY_LOCKDISCOVERY, PROPERTY_RESOURCETYPE, PROPERTY_SOURCE, PROPERTY_SUPPORTEDLOCK, PROPFIND_ALL_PROP, PROPFIND_ALL_PROP_INCLUDE, PROPFIND_BY_PROPERTY, PROPFIND_PROPERTY_NAMES, TIMEOUT_INFINITE, UNDEFINED_TIME, UNDEFINED_TIMEOUT, XML_ACTIVELOCK, XML_ALLPROP, XML_COLLECTION, XML_DEPTH, XML_DST, XML_EXCLUSIVE, XML_HREF, XML_INCLUDE, XML_KEEPALIVE, XML_LINK, XML_LOCKENTRY, XML_LOCKINFO, XML_LOCKROOT, XML_LOCKSCOPE, XML_LOCKTOKEN, XML_LOCKTYPE, XML_MULTISTATUS, XML_OMIT, XML_OWNER, XML_PROP, XML_PROPERTYBEHAVIOR, XML_PROPERTYUPDATE, XML_PROPFIND, XML_PROPNAME, XML_PROPSTAT, XML_REMOVE, XML_RESPONSE, XML_RESPONSEDESCRIPTION, XML_SET, XML_SHARED, XML_SOURCE, XML_STATUS, XML_TIMEOUT, XML_WRITE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDavProperty<?> add(DavProperty<?> property) Adds a new property to this set.voidaddAll(DavPropertySet pset) booleanaddContent(PropEntry contentEntry) Tries to add the specified entry to thePropContainerand returns a boolean indicating whether the content could be added to the internal set/map.booleancontains(DavPropertyName name) Checks if this set contains the property with the specified name.DavProperty<?> Retrieves the property with the specifiednameand the default WebDAVnamespace.DavProperty<?> Retrieves the property with the specifiednameandnamespace.DavProperty<?> get(DavPropertyName name) Retrieves the property with the specifiednameCollection<? extends PropEntry> Returns the collection that contains all the content elements of thisPropContainer.intReturns the number of property related content elements that are present in thisPropContainer.Return the names of all properties present in this set.booleanisEmpty()Returns true if the PropContainer does not yet contain any content elements.iterator()Returns an iterator over all property in this set.Returns an iterator over all those property in this set, that have the indicatednamespace.DavProperty<?> Removes the property with the specifiednameand the default WebDAVnamespace.DavProperty<?> Removes the property with the specifiednameandnamespacefrom this set.DavProperty<?> remove(DavPropertyName name) Removes the indicated property from this set.Methods inherited from class org.apache.jackrabbit.webdav.property.PropContainer
addContent, toXmlMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DavPropertySet
public DavPropertySet()
-
-
Method Details
-
add
Adds a new property to this set.- Parameters:
property- The property to add- Returns:
- The previously assigned property or
null.
-
addAll
- Parameters:
pset- Properties to add
-
get
Retrieves the property with the specifiednameand the default WebDAVnamespace.- Parameters:
name- The name of the property to retrieve- Returns:
- The desired property or
null
-
get
Retrieves the property with the specifiednameandnamespace.- Parameters:
name- The name of the property to retrievenamespace- The namespace of the property to retrieve- Returns:
- The desired property or
null
-
get
Retrieves the property with the specifiedname- Parameters:
name- The webdav property name of the property to retrieve- Returns:
- The desired property or
null
-
remove
Removes the indicated property from this set.- Parameters:
name- The webdav property name to remove- Returns:
- The removed property or
null
-
remove
Removes the property with the specifiednameand the default WebDAVnamespace.- Parameters:
name- The name of the property to remove- Returns:
- The removed property or
null
-
remove
Removes the property with the specifiednameandnamespacefrom this set.- Parameters:
name- The name of the property to removenamespace- The namespace of the property to remove- Returns:
- The removed property or
null
-
iterator
Returns an iterator over all property in this set.- Specified by:
iteratorin interfaceIterable<DavProperty<?>>- Returns:
- An iterator over
DavProperty.
-
iterator
Returns an iterator over all those property in this set, that have the indicatednamespace.- Parameters:
namespace- The namespace of the property in the iteration.- Returns:
- An iterator over
DavProperty.
-
getPropertyNames
Return the names of all properties present in this set.- Returns:
- array of
property namespresent in this set.
-
contains
Checks if this set contains the property with the specified name.- Specified by:
containsin classPropContainer- Parameters:
name- The name of the property- Returns:
trueif this set contains the property;falseotherwise.- See Also:
-
addContent
Description copied from class:PropContainerTries to add the specified entry to thePropContainerand returns a boolean indicating whether the content could be added to the internal set/map.- Specified by:
addContentin classPropContainer- Parameters:
contentEntry- NOTE, that the given object must be an instance ofDavPropertyin order to be successfully added to this set.- Returns:
- true if the specified object is an instance of
DavPropertyand false otherwise. - See Also:
-
isEmpty
public boolean isEmpty()Description copied from class:PropContainerReturns true if the PropContainer does not yet contain any content elements.- Specified by:
isEmptyin classPropContainer- Returns:
- true if this container is empty.
- See Also:
-
getContentSize
public int getContentSize()Description copied from class:PropContainerReturns the number of property related content elements that are present in thisPropContainer.- Specified by:
getContentSizein classPropContainer- Returns:
- number of content elements
- See Also:
-
getContent
Description copied from class:PropContainerReturns the collection that contains all the content elements of thisPropContainer.- Specified by:
getContentin classPropContainer- Returns:
- collection representing the contents of this
PropContainer. - See Also:
-