Class DavPropertySet
- java.lang.Object
-
- org.apache.jackrabbit.webdav.property.PropContainer
-
- org.apache.jackrabbit.webdav.property.DavPropertySet
-
- All Implemented Interfaces:
Iterable<DavProperty<?>>,DavConstants,XmlSerializable
public class DavPropertySet extends PropContainer implements Iterable<DavProperty<?>>
TheDavPropertySetclass 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 Constructor Description DavPropertySet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DavProperty<?>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<?>get(String name)Retrieves the property with the specifiednameand the default WebDAVnamespace.DavProperty<?>get(String name, Namespace namespace)Retrieves the property with the specifiednameandnamespace.DavProperty<?>get(DavPropertyName name)Retrieves the property with the specifiednameCollection<? extends PropEntry>getContent()Returns the collection that contains all the content elements of thisPropContainer.intgetContentSize()Returns the number of property related content elements that are present in thisPropContainer.DavPropertyName[]getPropertyNames()Return the names of all properties present in this set.booleanisEmpty()Returns true if the PropContainer does not yet contain any content elements.DavPropertyIteratoriterator()Returns an iterator over all property in this set.DavPropertyIteratoriterator(Namespace namespace)Returns an iterator over all those property in this set, that have the indicatednamespace.DavProperty<?>remove(String name)Removes the property with the specifiednameand the default WebDAVnamespace.DavProperty<?>remove(String name, Namespace namespace)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, toXml
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
add
public DavProperty<?> add(DavProperty<?> property)
Adds a new property to this set.- Parameters:
property- The property to add- Returns:
- The previously assigned property or
null.
-
addAll
public void addAll(DavPropertySet pset)
- Parameters:
pset- Properties to add
-
get
public DavProperty<?> get(String name)
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
public DavProperty<?> get(String name, Namespace namespace)
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
public DavProperty<?> get(DavPropertyName name)
Retrieves the property with the specifiedname- Parameters:
name- The webdav property name of the property to retrieve- Returns:
- The desired property or
null
-
remove
public DavProperty<?> remove(DavPropertyName name)
Removes the indicated property from this set.- Parameters:
name- The webdav property name to remove- Returns:
- The removed property or
null
-
remove
public DavProperty<?> remove(String name)
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
public DavProperty<?> remove(String name, Namespace namespace)
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
public DavPropertyIterator iterator()
Returns an iterator over all property in this set.- Specified by:
iteratorin interfaceIterable<DavProperty<?>>- Returns:
- An iterator over
DavProperty.
-
iterator
public DavPropertyIterator iterator(Namespace namespace)
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
public DavPropertyName[] getPropertyNames()
Return the names of all properties present in this set.- Returns:
- array of
property namespresent in this set.
-
contains
public boolean contains(DavPropertyName name)
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:
PropContainer.contains(DavPropertyName)
-
addContent
public boolean addContent(PropEntry contentEntry)
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:
PropContainer.addContent(PropEntry)
-
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:
PropContainer.isEmpty()
-
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:
PropContainer.getContentSize()
-
getContent
public Collection<? extends PropEntry> 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:
PropContainer.getContent()
-
-