|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wvcm.store.webdav.WebdavAccessor
org.apache.wvcm.store.webdav.ResourceWebdavAccessor
public class ResourceWebdavAccessor
WebDAV-based implementation of ResourceAccessor.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wvcm.store.webdav.WebdavAccessor |
---|
WebdavAccessor.HttpClientWrapper |
Field Summary |
---|
Fields inherited from class org.apache.wvcm.store.webdav.WebdavAccessor |
---|
providerImpl |
Constructor Summary | |
---|---|
ResourceWebdavAccessor(Resource resource)
Constructor. |
Method Summary | |
---|---|
protected void |
addLockTokens(org.apache.commons.httpclient.HttpMethod method)
|
protected void |
addLockTokens(IClientMethod method)
|
protected WebdavAccessor.HttpClientWrapper |
client()
Get the HttpClient of this accessor. |
protected boolean |
containsNestedProperties(PropertyNameList pnl)
|
boolean |
doCheckExists()
Checks whether the associated resource exists at the storage where this accessor is in charge of. |
void |
doCopy(java.lang.String destination,
boolean overwrite)
Create a copy of the resource identified by the associated proxy at the location identified by the destination . |
void |
doDelete()
Deletes the resource at the location of the associated resource. |
protected void |
doLabel(java.lang.String label,
int operator)
|
LockToken |
doLock(LockToken.Timeout timeout,
boolean deep,
boolean exclusive,
java.lang.String owner)
NOT YET STANDARD Locks this resource. |
void |
doMove(java.lang.String destination,
boolean overwrite)
Moves the resource identified by associated proxy to the location identified by the destination . |
java.util.List |
doReadAccessControlList(boolean includeInherited)
Return the list of AccessControlElement instances (ACL) defined
on the associated resource. |
ResourceImpl |
doReadAllAttributes(PropertyNameList wantedPropertyList)
|
Resource |
doReadContent(PropertyNameList wantedPropertyList,
java.io.OutputStream content)
Return a new resource proxy at the location of the associated resource containing the wanted properties. |
Resource |
doReadProperties(PropertyNameList wantedPropertyList)
Return a new resource proxy at the location of the associated resource containing the wanted properties. |
java.util.List |
doSearch(PropertyNameList wantedPropertyList,
SearchToken searchToken)
Return a list of Resource objects containing the wanted properties
according to the conditions of the specified search token from the scope
defined by the associated resource. |
void |
doUnlock(LockToken lockToken)
NOT YET STANDARD Releases the specified lock of this resource. |
void |
doWriteAccessControlList(java.util.List acl)
Modifies the access control list (ACL) of the associated resource. |
void |
doWriteContent(java.io.InputStream content,
java.lang.String contentIdentifier)
Persists content changes to a resource. |
void |
doWriteProperties()
Deletes the resource at the location of the associated resource. |
protected java.lang.Exception[] |
getNestedExceptions(java.util.List rsL)
|
Resource |
resource()
Get the resource proxy this accessor works for. |
protected void |
setHttpMethod(org.apache.commons.httpclient.HttpMethod method)
Set the HTTP method in the resource. |
protected void |
setHttpMethod(IClientMethod method)
Set the HTTP method in the resource. |
Methods inherited from class org.apache.wvcm.store.webdav.WebdavAccessor |
---|
defaultContextPath, getHttpClient, getHttpClientWrapper, initialize, serverWorkspaceFolderList |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.wvcm.store.Accessor |
---|
serverWorkspaceFolderList |
Constructor Detail |
---|
public ResourceWebdavAccessor(Resource resource)
Method Detail |
---|
public Resource resource()
resource
in interface ResourceAccessor
protected WebdavAccessor.HttpClientWrapper client() throws WvcmException
client
in class WebdavAccessor
WvcmException
public Resource doReadContent(PropertyNameList wantedPropertyList, java.io.OutputStream content) throws WvcmException
content
and content
is closed.
doReadContent
in interface ResourceAccessor
wantedPropertyList
- the wanted propertiescontent
- an OutputStream
WvcmException
public Resource doReadProperties(PropertyNameList wantedPropertyList) throws WvcmException
doReadProperties
in interface ResourceAccessor
wantedPropertyList
- the wanted properties
WvcmException
protected boolean containsNestedProperties(PropertyNameList pnl)
public void doWriteContent(java.io.InputStream content, java.lang.String contentIdentifier) throws WvcmException
contentIdentifier
matches the current
state identifier of the persistent resource,
the content of the resource is replaced with the
bytes read from content
, and content
is then closed.
If reading from the stream throws a java.io.IOException
,
then no further data will be read from the stream,
and after attempting to close the stream, a WvcmException
wrapping the IOException
will be thrown,
possibly leading to incomplete data being stored on the resource.
doWriteContent
in interface ResourceAccessor
content
- the content input streamcontentIdentifier
- the content identifier to match the current identifier
WvcmException
- if the resource identified by this Resource
does not exist.
WvcmException
public void doWriteProperties() throws WvcmException
doWriteProperties
in interface ResourceAccessor
WvcmException
public void doDelete() throws WvcmException
ResourceAccessor
doDelete
in interface ResourceAccessor
WvcmException
protected java.lang.Exception[] getNestedExceptions(java.util.List rsL)
public void doMove(java.lang.String destination, boolean overwrite) throws WvcmException
destination
.
doMove
in interface ResourceAccessor
destination
- The new location of the resource.overwrite
- If false
the existence of a resource
at the destination will cause doMove to fail; otherwise,
doMove will replace the destination resource.
WvcmException
public void doCopy(java.lang.String destination, boolean overwrite) throws WvcmException
destination
.
doCopy
in interface ResourceAccessor
destination
- The location of the new resource created by doCopy.overwrite
- If false
the existence of a resource
at the destination will cause the copy to fail; otherwise,
doCopy will replace the destination resource.
WvcmException
public boolean doCheckExists() throws WvcmException
doCheckExists
in interface ResourceAccessor
WvcmException
public java.util.List doSearch(PropertyNameList wantedPropertyList, SearchToken searchToken) throws WvcmException
Resource
objects containing the wanted properties
according to the conditions of the specified search token from the scope
defined by the associated resource.
A requested property named XXX can be retrieved from
the resource with the getXxx
method.
doSearch
in interface ResourceAccessor
wantedPropertyList
- the wanted propertiessearchToken
- a SearchToken
WvcmException
public ResourceImpl doReadAllAttributes(PropertyNameList wantedPropertyList) throws WvcmException
WvcmException
protected void doLabel(java.lang.String label, int operator) throws WvcmException
WvcmException
public java.util.List doReadAccessControlList(boolean includeInherited) throws WvcmException
AccessControlElement
instances (ACL) defined
on the associated resource.
The ACL specifies the list of access control elements (ACEs), which define what principals
are to get what privileges for this resource.
Each ACE specifies the set of privileges to be either granted or denied to a single principal.
If the ACL is empty, no principal is granted any privilege.
doReadAccessControlList
in interface ResourceAccessor
includeInherited
- if false, only ACEs defined for the resource are returned;
otherwise, the ACL includes all inherited ACEs
WvcmException
public void doWriteAccessControlList(java.util.List acl) throws WvcmException
doWriteAccessControlList
in interface ResourceAccessor
acl
- a list of AccessControlElement
instances
WvcmException
protected void addLockTokens(org.apache.commons.httpclient.HttpMethod method) throws WvcmException
WvcmException
protected void addLockTokens(IClientMethod method) throws WvcmException
WvcmException
public LockToken doLock(LockToken.Timeout timeout, boolean deep, boolean exclusive, java.lang.String owner) throws WvcmException
doLock
in interface ResourceAccessor
timeout
- a Timeoutdeep
- a booleanexclusive
- a booleanowner
- a String
WvcmException
public void doUnlock(LockToken lockToken) throws WvcmException
doUnlock
in interface ResourceAccessor
lockToken
- a LockToken
WvcmException
protected void setHttpMethod(org.apache.commons.httpclient.HttpMethod method)
method
- HTTP method usedprotected void setHttpMethod(IClientMethod method)
method
- HTTP method used (from client-3 or client-4)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |