| java.lang.Object com.ibm.webdav.Resource com.ibm.webdav.Collection
All known Subclasses: com.ibm.webdav.Workspace,
Collection | public class Collection extends Resource (Code) | | A Collection is a Resource that contains other
resources including other Collections. It provides a
concrete, client side implementation of Collection.
author: Jim Amsden <jamsden@us.ibm.com> |
Field Summary | |
final public static String | allMembers allMembers means get properties on this resource and recursively
all its members. | final public static String | deep deep means copy this resource and recursively all its members. | final public static String | immediateMembers immediateMembers means get properties on this resource and its
immediate members. | final public static String | shallow shallow means copy just this resource. | final public static String | thisResource thisResource means get properties on this resource only. |
Constructor Summary | |
public | Collection() | public | Collection(String url) Construct a Collection with the given URL. | public | Collection(String url, TargetSelector targetSelector) Construct a Collection with the given URL. | public | Collection(String protocol, String host, int port, String file) Create a Collection from the given URL components.
Parameters: protocol - the protocol to use, http:, rmi:, or iiop: Parameters: host - the name or IP addres of the server host. | public | Collection(String protocol, String host, String file) Create a Collection from the given URL components. | public | Collection(URL url) Construct a Collection with the given URL. | public | Collection(URL url, TargetSelector targetSelector) Construct a Collection with the given URL. | public | Collection(URL context, String spec) Construct a Collection with the given URL specification in the given context.
The resource having
the url may not exist as this constructor does not access the resource from
the server. |
Method Summary | |
public void | baseline() Put this collection under baseline control. | public MultiStatus | copy(String destinationURL) Deep copy this resource to the destination URL overwriting any existing contents. | public MultiStatus | copy(String destinationURL, boolean overwrite, Vector propertiesToCopy) Deep 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 overwrite the destination if it exists Parameters: propertiesToCopy - a collection of properties that must be copied orthe method will fail. | public MultiStatus | copy(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 void | createCollection() Actually create the collection in the repository. | public MultiStatus | createCollection(Document contents) Actually create the collection in the repository. | public Collection | createSubCollection(String collectionName) Create a sub-collection of this collection. | public void | flushCaches() Flush any caches so that subsequent methods obtain fresh data from the server. | public Vector | getMembers() Get the members of this Collection. | public MultiStatus | getProperties(PropertyName names, String depth) Get the named properties for this resource and (potentially) its children.
Parameters: names - an arrary of property names to retrieve. | public MultiStatus | getProperties(String depth) Get all the properties for this resource and (potentially) its children. | public MultiStatus | getProperty(PropertyName name, String depth) Get the named property for this resource and (potentially) its children. | public MultiStatus | getPropertyNames(String depth) Get the names of all properties for this resource and (potentially) its children. | protected void | initialize(URL url, TargetSelector targetSelector) Initialize this collection instance. | public MultiStatus | lock(String scope, String type, int timeout, Element owner) Lock this resource collection and recursively all its members based
on the given parameters. | public MultiStatus | lock(String scope, String type, int timeout, Element owner, String depth) Lock this resource based on the given parameters. |
allMembers | final public static String allMembers(Code) | | allMembers means get properties on this resource and recursively
all its members.
|
deep | final public static String deep(Code) | | deep means copy this resource and recursively all its members.
|
immediateMembers | final public static String immediateMembers(Code) | | immediateMembers means get properties on this resource and its
immediate members.
|
shallow | final public static String shallow(Code) | | shallow means copy just this resource.
|
thisResource | final public static String thisResource(Code) | | thisResource means get properties on this resource only.
|
Collection | public Collection()(Code) | | |
Collection | public Collection(String url) throws WebDAVException(Code) | | Construct a Collection with the given URL. This is the constructor most clients
will use to construct and access collections using WebDAV. The collection having
the url may not exist as this constructor does not access the resource from
the server. Use exists() or attmept to get the members of the collection to
see if it exists. Other constructors are provided using parameters for the
various parts of the URL. See java.net.URLConnection.
Parameters: url - the URL of the resource. exception: com.ibm.webdav.WebDAVException - |
Collection | public Collection(String url, TargetSelector targetSelector) throws WebDAVException(Code) | | Construct a Collection with the given URL. The resource having
the url may not exist as this constructor does not access the resource from
the server. Use exists() or attmept to get the contents of the resource to
see if it exists. Other constructors are provided using parameters for the
various parts of the URL. See java.net.URLConnection for details. A ResourceFactory
may also be used to construct instances of a Resource.
Parameters: url - the URL of the resource. Parameters: targetSelector - the revision target selector for this Collection exception: com.ibm.webdav.WebDAVException - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
Collection | public Collection(String protocol, String host, int port, String file) throws WebDAVException(Code) | | Create a Collection from the given URL components.
Parameters: protocol - the protocol to use, http:, rmi:, or iiop: Parameters: host - the name or IP addres of the server host. Using the client host name,or 'localhost' without a port uses local access with no RPC or server required. Parameters: port - the TCP port to use. HTTP uses 80 by default. Parameters: file - the resource URL relative to the server including any query string, etc. exception: com.ibm.webdav.WebDAVException - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
Collection | public Collection(String protocol, String host, String file) throws WebDAVException(Code) | | Create a Collection from the given URL components. This constructor uses the default
HTTP port.
Parameters: protocol - the protocol to use, http:, rmi:, or iiop: Parameters: host - the name or IP addres of the server host. Using the client host name,or 'localhost' without a port uses local access with no RPC or server required. Parameters: file - the resource URL relative to the server including any query string, etc. exception: com.ibm.WebDAVException - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
Collection | public Collection(URL url) throws WebDAVException(Code) | | Construct a Collection with the given URL. The resource having
the url may not exist as this constructor does not access the resource from
the server. Use exists() or attmept to get the contents of the resource to
see if it exists. Other constructors are provided using parameters for the
various parts of the URL. See java.net.URLConnection for details. A ResourceFactory
may also be used to construct instances of a Resource.
Parameters: url - the URL of the resource. exception: com.ibm.webdav.WebDAVException - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
Collection | public Collection(URL url, TargetSelector targetSelector) throws WebDAVException(Code) | | Construct a Collection with the given URL. The resource having
the url may not exist as this constructor does not access the resource from
the server. Use exists() or attmept to get the contents of the resource to
see if it exists. Other constructors are provided using parameters for the
various parts of the URL. See java.net.URLConnection for details. A ResourceFactory
may also be used to construct instances of a Resource.
Parameters: url - the URL of the resource. Parameters: targetSelector - the revision target selector for this Collection exception: com.ibm.webdav.WebDAVException - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
Collection | public Collection(URL context, String spec) throws WebDAVException(Code) | | Construct a Collection with the given URL specification in the given context.
The resource having
the url may not exist as this constructor does not access the resource from
the server. Use exists() or attmept to get the contents of the resource to
see if it exists. Other constructors are provided using parameters for the
various parts of the URL. See java.net.URLConnection for details. A ResourceFactory
may also be used to construct instances of a Collection.
Parameters: context - a URL giving the context in which the spec is evaluated Parameters: spec - a URL whose missing parts are provided by the context exception: com.ibm.webdav.Exception - See Also: URLConnection See Also: com.ibm.webdav.ResourceFactory |
copy | public MultiStatus copy(String destinationURL) throws WebDAVException(Code) | | Deep copy this resource to the destination URL overwriting any existing contents.
All live properties must remain live at the destination server.
Partial results are possible, check the returned status for details.
Parameters: destinationURL - the destination the status of the copy operation for each resource copied exception: com.ibm.webdav.WebDAVException - |
copy | public MultiStatus copy(String destinationURL, boolean overwrite, Vector propertiesToCopy) throws WebDAVException(Code) | | Deep 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 overwrite 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 copied or the method will fail
the status of the copy operation for each resource copied exception: com.ibm.webdav.WebDAVException - |
copy | public MultiStatus copy(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 copied or 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 void createCollection() 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.
exception: com.ibm.webdav.WebDAVException - |
createCollection | public MultiStatus createCollection(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 in version 10 of the WebDAV specification Multistatus describing the resultof the operation exception: com.ibm.webdav.WebDAVException - |
createSubCollection | public Collection createSubCollection(String collectionName) throws WebDAVException(Code) | | Create a sub-collection of this collection. The resource indicated
by the URL must not already exist. All ancestors of this URL must already
exist.
Parameters: collectionName - the name of the collection to create relative to the URL of this resource. the newly created Collection exception: com.ibm.webdav.WebDAVException - |
flushCaches | public void flushCaches() throws WebDAVException(Code) | | Flush any caches so that subsequent methods obtain fresh data from the server. Currently,
only the contents of the resource and members of a resource collection are cached.
exception: com.ibm.webdav.WebDAVException - |
getProperties | public MultiStatus getProperties(PropertyName names, String depth) throws WebDAVException(Code) | | Get the named properties for this resource and (potentially) its children.
Parameters: names - an arrary of property names 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(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 - |
getProperty | public MultiStatus getProperty(PropertyName name, String depth) throws WebDAVException(Code) | | Get the named property for this resource and (potentially) its children.
Parameters: name - the name of the property 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 - |
getPropertyNames | public MultiStatus getPropertyNames(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(String scope, String type, int timeout, Element owner) throws WebDAVException(Code) | | Lock this resource collection and recursively 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(String scope, String type, int timeout, Element owner, String depth) throws WebDAVException(Code) | | Lock this resource 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 - |
Methods inherited from com.ibm.webdav.Resource | public void addLabel(String label) throws WebDAVException(Code)(Java Doc) public MultiStatus addProperties(PropertyName[] names, Element[] values) throws WebDAVException(Code)(Java Doc) public void addProperty(PropertyName name, Element value) throws WebDAVException(Code)(Java Doc) public void cancelCheckOut() throws WebDAVException(Code)(Java Doc) public TargetSelector checkOut() throws WebDAVException(Code)(Java Doc) public TargetSelector checkOut(Workspace workspace) throws WebDAVException(Code)(Java Doc) public void checkPoint(boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)(Java Doc) public void checkin() throws WebDAVException(Code)(Java Doc) public void checkin(Activity activity, boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)(Java Doc) public void checkin(boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)(Java Doc) public void closeContentsOutputStream() throws WebDAVException(Code)(Java Doc) public void closeContentsOutputStream(String sContentType) throws WebDAVException(Code)(Java Doc) public MultiStatus copy(String destinationURL) throws WebDAVException(Code)(Java Doc) public MultiStatus copy(String destinationURL, boolean overwrite, Vector propertiesToCopy) throws WebDAVException(Code)(Java Doc) public MultiStatus delete() throws WebDAVException(Code)(Java Doc) public Document differencesWith(Resource resource) throws WebDAVException(Code)(Java Doc) public boolean equals(Resource resource) throws WebDAVException(Code)(Java Doc) public boolean exists() throws WebDAVException(Code)(Java Doc) public void flushCaches() throws WebDAVException(Code)(Java Doc) public ActiveLock getActiveLockFor(String principal) throws WebDAVException(Code)(Java Doc) public Activity getActivity() throws WebDAVException(Code)(Java Doc) public byte[] getContents() throws WebDAVException(Code)(Java Doc) public InputStream getContentsInputStream() throws WebDAVException(Code)(Java Doc) public OutputStream getContentsOutputStream() throws WebDAVException(Code)(Java Doc) public ResourceContext getContext()(Code)(Java Doc) public Enumeration getLabels() throws WebDAVException(Code)(Java Doc) public Vector getLocks() throws WebDAVException(Code)(Java Doc) public Enumeration getMergeCandidates() throws WebDAVException(Code)(Java Doc) public Enumeration getMergePredecessors() throws WebDAVException(Code)(Java Doc) public void getMetaInformation() throws WebDAVException(Code)(Java Doc) public Enumeration getMutableProperties() throws WebDAVException(Code)(Java Doc) public Element getOptions() throws WebDAVException(Code)(Java Doc) public Collection getParentCollection() throws WebDAVException(Code)(Java Doc) public Resource getPredecessor() throws WebDAVException(Code)(Java Doc) public MultiStatus getProperties() throws WebDAVException(Code)(Java Doc) public MultiStatus getProperties(PropertyName names) throws WebDAVException(Code)(Java Doc) public PropertyValue getProperty(PropertyName name) throws WebDAVException(Code)(Java Doc) public MultiStatus getPropertyNames() throws WebDAVException(Code)(Java Doc) public HTTPHeaders getRequestContext() throws WebDAVException(Code)(Java Doc) public HTTPHeaders getResponseContext() throws WebDAVException(Code)(Java Doc) public Document getRevisionHistory() throws WebDAVException(Code)(Java Doc) public String getRevisionId() throws WebDAVException(Code)(Java Doc) public int getStatusCode() throws WebDAVException(Code)(Java Doc) public String getStatusMessage() throws WebDAVException(Code)(Java Doc) public Enumeration getSuccessors() throws WebDAVException(Code)(Java Doc) public TargetSelector getTargetSelector() throws WebDAVException(Code)(Java Doc) public URL getURL() throws WebDAVException(Code)(Java Doc) public String getWorkingResourceId() throws WebDAVException(Code)(Java Doc) public Enumeration getWorkingResources() throws WebDAVException(Code)(Java Doc) protected void initialize(URL url, TargetSelector targetSelector) throws WebDAVException(Code)(Java Doc) public boolean isAutomaticallyVersioned() throws WebDAVException(Code)(Java Doc) public boolean isCheckedOut(Activity activity) throws WebDAVException(Code)(Java Doc) public boolean isCollection() throws WebDAVException(Code)(Java Doc) public boolean isLabeledWith(String label) throws WebDAVException(Code)(Java Doc) public boolean isLocked() throws WebDAVException(Code)(Java Doc) public boolean isLockedByMe() throws WebDAVException(Code)(Java Doc) public boolean isMutable() throws WebDAVException(Code)(Java Doc) boolean isVersioned() throws WebDAVException(Code)(Java Doc) public MultiStatus lock(Document document) throws WebDAVException(Code)(Java Doc) public MultiStatus lock(String scope, String type, int timeout, Element owner) throws WebDAVException(Code)(Java Doc) public MultiStatus move(String destinationURL) throws WebDAVException(Code)(Java Doc) public MultiStatus move(String destinationURL, boolean overwrite, Vector propertiesToMove) throws WebDAVException(Code)(Java Doc) public byte[] performWith(String args) throws WebDAVException(Code)(Java Doc) public MultiStatus refreshLock(String lockToken, int timeout) throws WebDAVException(Code)(Java Doc) public void removeLabel(String label) throws WebDAVException(Code)(Java Doc) public MultiStatus removeProperties(PropertyName[] names) throws WebDAVException(Code)(Java Doc) public void removeProperty(PropertyName name) throws WebDAVException(Code)(Java Doc) public void setContents(byte[] value) throws WebDAVException(Code)(Java Doc) public void setContents(byte[] value, String mimetype) throws WebDAVException(Code)(Java Doc) public MultiStatus setProperties(PropertyName[] names, Element[] values) throws WebDAVException(Code)(Java Doc) public MultiStatus setProperties(Document updates) throws WebDAVException(Code)(Java Doc) public void setProperty(PropertyName name, Element value) throws WebDAVException(Code)(Java Doc) public void setRequestContext(HTTPHeaders value) throws WebDAVException(Code)(Java Doc) public void setResponseContext(HTTPHeaders value) throws WebDAVException(Code)(Java Doc) public void setStatusCode(int value) throws WebDAVException(Code)(Java Doc) public String toString()(Code)(Java Doc) public MultiStatus unlock(String lockToken) throws WebDAVException(Code)(Java Doc)
|
|
|