|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceAccessor
Persistent resource state accessor. There can be various implementations of this interface for server-side as well as for client-side persistent state.
Method Summary | |
---|---|
boolean |
doCheckExists()
Checks whether the 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. |
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. |
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()
Persists property changes to associated resource. |
Resource |
resource()
Get the resource proxy this accessor is assigned to. |
Methods inherited from interface org.apache.wvcm.store.Accessor |
---|
serverWorkspaceFolderList |
Method Detail |
---|
Resource resource()
Resource doReadContent(PropertyNameList wantedPropertyList, java.io.OutputStream content) throws WvcmException
content
and content
is closed.
wantedPropertyList
- the wanted propertiescontent
- an OutputStream
WvcmException
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.
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
Resource doReadProperties(PropertyNameList wantedPropertyList) throws WvcmException
wantedPropertyList
- the wanted properties
WvcmException
void doWriteProperties() throws WvcmException
WvcmException
void doDelete() throws WvcmException
WvcmException
void doCopy(java.lang.String destination, boolean overwrite) throws WvcmException
destination
.
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
void doMove(java.lang.String destination, boolean overwrite) throws WvcmException
destination
.
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
boolean doCheckExists() throws WvcmException
WvcmException
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.
wantedPropertyList
- the wanted propertiessearchToken
- a SearchToken
WvcmException
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.
includeInherited
- if false, only ACEs defined for the resource are returned;
otherwise, the ACL includes all inherited ACEs
WvcmException
void doWriteAccessControlList(java.util.List acl) throws WvcmException
acl
- a list of AccessControlElement
instances
WvcmException
LockToken doLock(LockToken.Timeout timeout, boolean deep, boolean exclusive, java.lang.String owner) throws WvcmException
timeout
- a Timeoutdeep
- a booleanexclusive
- a booleanowner
- a String
WvcmException
void doUnlock(LockToken lockToken) throws WvcmException
lockToken
- a LockToken
WvcmException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |