public interface DavResource
DavResource
provides standard WebDAV functionality as specified
by RFC 2518.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
METHODS
String constant representing the WebDAV 1 and 2 method set.
|
Modifier and Type | Method and Description |
---|---|
void |
addLockManager(LockManager lockmgr)
Add an external
LockManager to this resource. |
void |
addMember(DavResource resource,
InputContext inputContext)
Add the given resource as an internal member to this resource.
|
MultiStatusResponse |
alterProperties(java.util.List<? extends PropEntry> changeList)
Set/add and remove the specified properties from this resource.
|
void |
copy(DavResource destination,
boolean shallow)
Copy this DavResource to the given destination resource
|
boolean |
exists()
Returns true if this webdav resource represents an existing repository item.
|
DavResource |
getCollection()
Retrieve the resource this resource is internal member of.
|
java.lang.String |
getComplianceClass()
Returns a comma separated list of all compliance classes the given
resource is fulfilling.
|
java.lang.String |
getDisplayName()
Returns the display name of this resource.
|
DavResourceFactory |
getFactory()
Return the
DavResourceFactory that created this resource. |
java.lang.String |
getHref()
Returns the absolute href of this resource as returned in the
multistatus response body.
|
DavResourceLocator |
getLocator()
Returns the
locator object for this webdav resource,
which encapsulates the information for building the complete 'href'. |
ActiveLock |
getLock(Type type,
Scope scope)
Return the lock present on this webdav resource or
null
if the resource is either not locked or not lockable at all. |
ActiveLock[] |
getLocks()
Returns an array of all locks applied to the given resource.
|
DavResourceIterator |
getMembers()
Returns an iterator over all internal members.
|
long |
getModificationTime()
Return the time of the last modification or -1 if the modification time
could not be retrieved.
|
DavPropertySet |
getProperties()
Returns all webdav properties present on this resource that will be
return upon a
DavConstants.PROPFIND_ALL_PROP request. |
DavProperty<?> |
getProperty(DavPropertyName name)
Return the webdav property with the specified name.
|
DavPropertyName[] |
getPropertyNames()
Returns an array of all
property names available
on this resource. |
java.lang.String |
getResourcePath()
Returns the path of the hierarchy element defined by this
DavResource . |
DavSession |
getSession()
Retrieve the
DavSession associated with this resource. |
java.lang.String |
getSupportedMethods()
Returns a comma separated list of all METHODS supported by the given
resource.
|
boolean |
hasLock(Type type,
Scope scope)
Returns true if a lock applies to this resource.
|
boolean |
isCollection()
Returns true if this webdav resource has the resourcetype 'collection'.
|
boolean |
isLockable(Type type,
Scope scope)
Returns true, if the this resource allows locking.
|
ActiveLock |
lock(LockInfo reqLockInfo)
Lock this webdav resource with the information retrieve from the request
and return the resulting lockdiscovery object.
|
void |
move(DavResource destination)
Move this DavResource to the given destination resource
|
ActiveLock |
refreshLock(LockInfo reqLockInfo,
java.lang.String lockToken)
Refresh an existing lock by resetting the timeout.
|
void |
removeMember(DavResource member)
Removes the specified member from this resource.
|
void |
removeProperty(DavPropertyName propertyName)
Remove the specified property from this resource.
|
void |
setProperty(DavProperty<?> property)
Add/Set the specified property on this resource.
|
void |
spool(OutputContext outputContext)
Spools the resource properties and ev.
|
void |
unlock(java.lang.String lockToken)
Remove the lock identified by the included lock token from this resource.
|
static final java.lang.String METHODS
java.lang.String getComplianceClass()
java.lang.String getSupportedMethods()
boolean exists()
boolean isCollection()
java.lang.String getDisplayName()
DavResourceLocator getLocator()
locator
object for this webdav resource,
which encapsulates the information for building the complete 'href'.getResourcePath()
,
getHref()
java.lang.String getResourcePath()
DavResource
.
This method is a shortcut for DavResource.getLocator().getResourcePath()
.DavResource
.java.lang.String getHref()
long getModificationTime()
void spool(OutputContext outputContext) throws java.io.IOException
outputContext
- The output context.java.io.IOException
- If an error occurs.DavPropertyName[] getPropertyNames()
property names
available
on this resource.DavProperty<?> getProperty(DavPropertyName name)
name
- name of the webdav propertyDavProperty
with the given name or null
if the property does not exist.DavPropertySet getProperties()
DavConstants.PROPFIND_ALL_PROP
request. The
implementation may in addition expose other (protected or calculated)
properties which should be marked accordingly (see also
DavProperty.isInvisibleInAllprop()
.DavPropertySet
containing at least all properties
of this resource that are exposed in 'allprop' PROPFIND request.void setProperty(DavProperty<?> property) throws DavException
property
- DavException
- if an error occursvoid removeProperty(DavPropertyName propertyName) throws DavException
propertyName
- DavException
- if an error occursMultiStatusResponse alterProperties(java.util.List<? extends PropEntry> changeList) throws DavException
changeList
- list containing DavPropertyName
objects (for
properties to be removed) and DavProperty
objects (for
properties to be added/set).DavException
- if an error occurred. This may be the case if the
general state of the resource prevents any properties to be set or removed
(e.g. due to a lock).DavResource getCollection()
null
is returned.void addMember(DavResource resource, InputContext inputContext) throws DavException
resource
- DavResource
to be added as internal member.inputContext
- Context providing the properties and content for the
internal member to be created or replaced.DavException
DavResourceIterator getMembers()
DavResourceIterator
over all internal members.void removeMember(DavResource member) throws DavException
DavException
void move(DavResource destination) throws DavException
destination
- DavException
void copy(DavResource destination, boolean shallow) throws DavException
destination
- shallow
- DavException
boolean isLockable(Type type, Scope scope)
type
- scope
- boolean hasLock(Type type, Scope scope)
type
- ActiveLock getLock(Type type, Scope scope)
null
if the resource is either not locked or not lockable at all. Note, that
a resource may have a lock that is inherited by a deep lock enforced on
one of its 'parent' resources.type
- null
if this
resource has no lock applying it. If an error occurs while retrieving the
lock information null
is returned as well.ActiveLock[] getLocks()
ActiveLock lock(LockInfo reqLockInfo) throws DavException
reqLockInfo
- lock info as retrieved from the request.DavException
is thrown.DavException
- if the lock could not be obtained.ActiveLock refreshLock(LockInfo reqLockInfo, java.lang.String lockToken) throws DavException
reqLockInfo
- lock info as retrieved from the request.lockToken
- identifying the lock to be refreshed.DavException
is thrown.DavException
- if the lock could not be refreshed.void unlock(java.lang.String lockToken) throws DavException
lockToken
- identifying the lock to be removed.DavException
- if the lock could not be removed.void addLockManager(LockManager lockmgr)
LockManager
to this resource. This method may
throw UnsupportedOperationException
if the resource does handle
locking itself.lockmgr
- LockManager
DavResourceFactory getFactory()
DavResourceFactory
that created this resource.DavSession getSession()
DavSession
associated with this resource."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"