| java.lang.Object com.ibm.webdav.impl.ResourceImpl com.ibm.webdav.impl.CollectionImpl
CollectionImpl | public class CollectionImpl extends ResourceImpl implements IRCollection(Code) | | A CollectionImpl is a ResourceImpl that contains other
resources including other CollectionImpls. It provides a
concrete, server side implementation of Collection.
CollectionImpl should inherit from ResourceImpl and CollectionP.
However, Java doesn't support multiple inheritance, so CollectionImpl
must re-implement all of CollectionP's methods. Many of these methods
are overridden anyway for server-side behavior.
|
Method Summary | |
public MultiStatus | copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy) Copy this resource to the destination URL.
Partial results are possible, check the returned status for details.
Parameters: destinationURL - the destination Parameters: overwrite - true implies overrite the destination if it exists Parameters: propertiesToCopy - a collection of properties that must be copied orthe method will fail. | public MultiStatus | copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy, String depth) Copy this resource to the destination URL.
Partial results are possible, check the returned status for details.
Parameters: destinationURL - the destination Parameters: overwrite - true implies overrite the destination if it exists Parameters: propertiesToCopy - a collection of properties that must be copied orthe method will fail. | public MultiStatus | createCollection(ResourceContext context, Document contents) Actually create the collection in the repository. | public MultiStatus | delete(ResourceContext context) Delete this resouce collection and all its members from the server.
The actual effect of the delete operation is determined by the underlying
repository manager. | protected MultiStatus | doUnlock(String lockToken) Unlock the lock identified by the lockToken on this resource. | public URL | getChildURL(String childName) | public InputStream | getContentsInputStream() The WebDAV spec does not explicitly define the contents of a collection.
Rather it obtains the members of a collection by doing a PROPFIND with
depth="infinity" and gets the href elements from the response elements
to determine the members of a collection. | public OutputStream | getContentsOutputStream() WebDAV does not allow PUT to collections. | public Vector | getMembers() Get the members of this Collection. | public MultiStatus | getProperties(ResourceContext context, PropertyName names, String depth) Get the named properties for this resource and (potentially) its children. | public MultiStatus | getProperties(ResourceContext context, String depth) Get all the properties for this resource and (potentially) its children. | public MultiStatus | getPropertyNames(ResourceContext context, String depth) Get the names of all properties for this resource and (potentially) its children. | public boolean | isCollection() Returns true if this Resource is a collection. | protected MultiStatus | lock(ActiveLock activeLock) Lock this resource with the information contained in the given active lock. | public MultiStatus | lock(ResourceContext context, String scope, String type, int timeout, Element owner) Lock this resource collection and potentially all its members
based on the given parameters. | public MultiStatus | lock(ResourceContext context, String scope, String type, int timeout, Element owner, String depth) Lock this resource collection and potentially all its members
based on the given parameters. | public MultiStatus | refreshLock(ResourceContext context, String lockToken, int timeout) Refresh the lock on this resource collection and all its members locked
by the same lock token by resetting the lock timeout.
The context must contain the proper authorization for the requesting
principal.
Parameters: lockToken - the lock token identifying the lock. Parameters: timeout - the new timeout in seconds. | public MultiStatus | setOrdering(ResourceContext context, Document orderPatch) |
CollectionImpl | public CollectionImpl()(Code) | | |
CollectionImpl | public CollectionImpl(URL url, String localName, TargetSelector targetSelector) throws WebDAVException(Code) | | Construct a CollectionImpl for the given URL.
Parameters: url - the URL of the resource Parameters: localName - a translation of the URL (filePortion) intoa name that has local meaning to a server. Parameters: targetSelector - the revision target selector for this Collection exception: com.ibm.webdav.WebDAVException - |
copy | public MultiStatus copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy) throws WebDAVException(Code) | | Copy this resource to the destination URL.
Partial results are possible, check the returned status for details.
Parameters: destinationURL - the destination Parameters: overwrite - true implies overrite the destination if it exists Parameters: propertiesToCopy - a collection of properties that must be copied orthe method will fail. propertiesToCopy may have one of the following values:- null - ignore properties that cannot be copied
- empty collection - all properties must be copied or the method will fail
- a collection of URIs - a list of the properties that must be copiedor the method will fail
the status of the copy operation for each resource copied exception: com.ibm.webdav.WebDAVException - |
copy | public MultiStatus copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy, String depth) throws WebDAVException(Code) | | Copy this resource to the destination URL.
Partial results are possible, check the returned status for details.
Parameters: destinationURL - the destination Parameters: overwrite - true implies overrite the destination if it exists Parameters: propertiesToCopy - a collection of properties that must be copied orthe method will fail. propertiesToCopy may have one of the following values:- null - ignore properties that cannot be copied
- empty collection - all properties must be copied or the method will fail
- a collection of URIs - a list of the properties that must be copiedor the method will fail
Parameters: depth - an indicator for immediate members or recursively all children.- shallow: copy only this resource
- deep: copy this resource and recursively all of its children
the status of the copy operation for each resource copied exception: com.ibm.webdav.WebDAVException - |
createCollection | public MultiStatus createCollection(ResourceContext context, Document contents) throws WebDAVException(Code) | | Actually create the collection in the repository. The resource indicated
by the URL must not already exist. All ancestors of this URL must already
exist.
Parameters: contents - an XML Document describing the members of this collection, bodiesof members, and properties on the collections or members. Not completely defined inversion 10 of the WebDAV specification Multistatus describing the resultof the operation exception: com.ibm.webdav.WebDAVException - |
delete | public MultiStatus delete(ResourceContext context) throws WebDAVException(Code) | | Delete this resouce collection and all its members from the server.
The actual effect of the delete operation is determined by the underlying
repository manager. The visible effect to WebDAV is that the resource
is no longer available.
a MultiStatus containing the status of the delete method on eacheffected resource. exception: com.ibm.webdav.WebDAVException - |
doUnlock | protected MultiStatus doUnlock(String lockToken) throws WebDAVException(Code) | | Unlock the lock identified by the lockToken on this resource. This method
is used internally to unlock resources copied or moved as well as unlocked.
For a resource collection, unlock all the members that are locked with the
same lock token.
Parameters: lockToken - the lock token obtained from the ActiveLock of a previous lock() or getLocks() . a MultiStatus containing any responses on resources that could notbe unlocked. exception: com.ibm.webdav.WebDAVException - |
getContentsInputStream | public InputStream getContentsInputStream() throws WebDAVException(Code) | | The WebDAV spec does not explicitly define the contents of a collection.
Rather it obtains the members of a collection by doing a PROPFIND with
depth="infinity" and gets the href elements from the response elements
to determine the members of a collection. This implementation returns
and XML document containing the URLs of the members of the collection.
an InputStream on an XML document containing the members of this collection exception: com.ibm.webdav.WebDAVException - |
getProperties | public MultiStatus getProperties(ResourceContext context, PropertyName names, String depth) throws WebDAVException(Code) | | Get the named properties for this resource and (potentially) its children.
Parameters: names - an array of PropertyNames to retrieve. Parameters: depth - an indicator for immediate members or recursively all children.- immediateMembers: propeprties of this resource and its immediate children
- allMembers: properties of this resource and recursively all its children
a MultiStatus of PropertyResponses exception: com.ibm.webdav.WebDAVException - |
getProperties | public MultiStatus getProperties(ResourceContext context, String depth) throws WebDAVException(Code) | | Get all the properties for this resource and (potentially) its children.
Parameters: depth - an indicator for immediate members or recursively all children.- thisResource: propeprties of this resource
- immediateMembers: propeprties of this resource and its immediate children
- allMembers: properties of this resource and recursively all its children
a MultiStatus of PropertyResponses exception: com.ibm.webdav.WebDAVException - |
getPropertyNames | public MultiStatus getPropertyNames(ResourceContext context, String depth) throws WebDAVException(Code) | | Get the names of all properties for this resource and (potentially) its children.
Parameters: depth - an indicator for immediate members or recursively all children.- thisResource: propeprties of this resource
- immediateMembers: propeprties of this resource and its immediate children
- allMembers: properties of this resource and recursively all its children
a MultiStatus of PropertyResponses(PropertyValue.value is always null, PropertyValue.status contains the status) exception: com.ibm.webdav.WebDAVException - |
lock | public MultiStatus lock(ResourceContext context, String scope, String type, int timeout, Element owner) throws WebDAVException(Code) | | Lock this resource collection and potentially all its members
based on the given parameters. This allows control of the lock
scope (exclusive or shared) the lock type (write), owner information, etc.
Parameters: scope - the scope of the lock, exclusive or shared Parameters: type - the type of the lock, currently only write Parameters: timeout - the number of seconds before the lock times out or0 for infinite timeout. Parameters: owner - an XML element containing useful information that can beused to identify the owner of the lock. An href to a home page, anemail address, phone number, etc. Can be null if no owner informationis provided. a MultiStatus containing a lockdiscovery property indicatingthe results of the lock operation. exception: com.ibm.webdav.WebDAVException - |
lock | public MultiStatus lock(ResourceContext context, String scope, String type, int timeout, Element owner, String depth) throws WebDAVException(Code) | | Lock this resource collection and potentially all its members
based on the given parameters. This allows control of the lock
scope (exclusive or shared) the lock type (write), owner information, etc.
Parameters: scope - the scope of the lock, exclusive or shared Parameters: type - the type of the lock, currently only write Parameters: timeout - the number of seconds before the lock times out or0 for infinite timeout. Parameters: owner - an XML element containing useful information that can beused to identify the owner of the lock. An href to a home page, anemail address, phone number, etc. Can be null if no owner informationis provided. Parameters: depth - - shallow lock only this resource
- deep lock this resource and all its children
a MultiStatus containing a lockdiscovery property indicatingthe results of the lock operation. exception: com.ibm.webdav.WebDAVException - |
refreshLock | public MultiStatus refreshLock(ResourceContext context, String lockToken, int timeout) throws WebDAVException(Code) | | Refresh the lock on this resource collection and all its members locked
by the same lock token by resetting the lock timeout.
The context must contain the proper authorization for the requesting
principal.
Parameters: lockToken - the lock token identifying the lock. Parameters: timeout - the new timeout in seconds. -1 means infinite timeout. updated information about the lock status of this resource exception: com.ibm.webdav.WebDAVException - |
Methods inherited from com.ibm.webdav.impl.ResourceImpl | public MultiStatus atomicMove(ResourceContext context, String destinationURL, boolean overwrite) throws WebDAVException(Code)(Java Doc) public boolean authenticateUser(String user, String pwd) throws WebDAVException(Code)(Java Doc) public void checkin() throws WebDAVException(Code)(Java Doc) public void checkout() throws WebDAVException(Code)(Java Doc) public void closeContentsOutputStream(ResourceContext context) throws WebDAVException(Code)(Java Doc) public void closeContentsOutputStream(ResourceContext context, String sContentType) throws WebDAVException(Code)(Java Doc) public MultiStatus copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy) throws WebDAVException(Code)(Java Doc) protected MultiStatus copyProperties(Resource destination, Vector propertiesToCopy) throws WebDAVException(Code)(Java Doc) public static ResourceImpl create(URL url, String localName) throws WebDAVException(Code)(Java Doc) public MultiStatus createBinding(ResourceContext context, String bindName, String resourceURI) throws WebDAVException(Code)(Java Doc) public MultiStatus createPropPatchMultiStatus(WebDAVException exc, Document updates) throws WebDAVException(Code)(Java Doc) public MultiStatus delete(ResourceContext context) throws WebDAVException(Code)(Java Doc) protected MultiStatus doUnlock(String lockToken) throws WebDAVException(Code)(Java Doc) public MultiStatus executeSearch(ResourceContext context, SearchRequest searchReq) throws WebDAVException(Code)(Java Doc) public boolean exists() throws WebDAVException(Code)(Java Doc) protected ActiveLock getActiveLockFor(String scope, String type, int timeout, Element owner) throws WebDAVException(Code)(Java Doc) public List getAllowedMethods() throws WebDAVException(Code)(Java Doc) public InputStream getContentsInputStream(ResourceContext context) throws WebDAVException(Code)(Java Doc) public OutputStream getContentsOutputStream(ResourceContext context) throws WebDAVException(Code)(Java Doc) public com.ibm.webdav.ResourceContext getContext()(Code)(Java Doc) public LockManager getLockManager()(Code)(Java Doc) public Vector getLocks() throws WebDAVException(Code)(Java Doc) public void getMetaInformation(ResourceContext context) throws WebDAVException(Code)(Java Doc) public String getName() throws WebDAVException(Code)(Java Doc) public IRCollection getParentCollection() throws WebDAVException(Code)(Java Doc) public URL getParentURL() throws WebDAVException(Code)(Java Doc) public MultiStatus getProperties(ResourceContext context) throws WebDAVException(Code)(Java Doc) public MultiStatus getProperties(ResourceContext context, PropertyName[] names) throws WebDAVException(Code)(Java Doc) public PropertyValue getProperty(PropertyName name) throws WebDAVException(Code)(Java Doc) public MultiStatus getPropertyNames(ResourceContext context) throws WebDAVException(Code)(Java Doc) public HTTPHeaders getRequestContext() throws WebDAVException(Code)(Java Doc) public HTTPHeaders getResponseContext() throws WebDAVException(Code)(Java Doc) public MultiStatus getSearchSchema(ResourceContext context, SearchRequest searchReq) throws WebDAVException(Code)(Java Doc) public com.ibm.webdav.WebDAVStatus getStatusCode()(Code)(Java Doc) public URL getURL() throws WebDAVException(Code)(Java Doc) public UserAuthenticator getUserAuthenticator()(Code)(Java Doc) public MultiStatus getVersionTreeReport(ResourceContext context, PropertyName[] names) throws WebDAVException(Code)(Java Doc) public MultiStatus getVersionTreeReport(ResourceContext context) throws WebDAVException(Code)(Java Doc) protected boolean hasLock(String lockToken) throws WebDAVException(Code)(Java Doc) public boolean hasValidURI() throws WebDAVException(Code)(Java Doc) protected void inheritParentDeepLocks() throws WebDAVException(Code)(Java Doc) public boolean isCollection() throws WebDAVException(Code)(Java Doc) public boolean isLocked() throws WebDAVException(Code)(Java Doc) public boolean isLockedByMe() throws WebDAVException(Code)(Java Doc) public boolean isSameServerAs(URL target)(Code)(Java Doc) public Document loadProperties() throws WebDAVException(Code)(Java Doc) protected MultiStatus lock(ActiveLock activeLock) throws WebDAVException(Code)(Java Doc) public MultiStatus lock(ResourceContext context, String scope, String type, int timeout, Element owner) throws WebDAVException(Code)(Java Doc) public static void main(String[] args)(Code)(Java Doc) public MultiStatus move(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToMove) throws WebDAVException(Code)(Java Doc) public boolean parentIsLockedWith(String lockToken) throws WebDAVException(Code)(Java Doc) public byte[] performWith(ResourceContext context, String args) throws WebDAVException(Code)(Java Doc) public MultiStatus refreshLock(ResourceContext context, String lockToken, int timeout) throws WebDAVException(Code)(Java Doc) public void removeLiveProperties(Document propertiesDocument)(Code)(Java Doc) public void saveProperties(Document propertiesDocument) throws WebDAVException(Code)(Java Doc) public void setContents(byte[] value) throws WebDAVException(Code)(Java Doc) void setContext(com.ibm.webdav.ResourceContext newContext)(Code)(Java Doc) public MultiStatus setProperties(ResourceContext context, Document updates) throws WebDAVException(Code)(Java Doc) public void setRequestContext(ResourceContext newRequestContext)(Code)(Java Doc) public void setResponseContext(com.ibm.webdav.ResourceContext newResponseContext)(Code)(Java Doc) void setStatusCode(int newStatusCode)(Code)(Java Doc) void setStatusCode(com.ibm.webdav.WebDAVStatus newStatusCode)(Code)(Java Doc) public String translatePathRelativeToMe(String target) throws WebDAVException(Code)(Java Doc) public void uncheckout() throws WebDAVException(Code)(Java Doc) public MultiStatus unlock(ResourceContext context, String lockToken) throws WebDAVException(Code)(Java Doc) public void updateLiveProperties(Document document) throws WebDAVException(Code)(Java Doc) public void versionControl() throws WebDAVException(Code)(Java Doc)
|
|
|