|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.client.AbstractResourceHandle
org.eclipse.webdav.client.CollectionHandle
public class CollectionHandle
The CollectionHandle
class represents a resource on the
WebDAV server that supports collection semantics.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Field Summary |
---|
Fields inherited from class org.eclipse.webdav.client.AbstractResourceHandle |
---|
davClient, locator |
Fields inherited from interface org.eclipse.webdav.internal.kernel.WebDAVPropertyValues |
---|
DAV_ACTIVITY_RESOURCE_TYPE, DAV_BASELINE_RESOURCE_TYPE, DAV_COLLECTION_RESOURCE_TYPE, DAV_DISCOURAGED, DAV_FORBIDDEN, DAV_HISTORY_RESOURCE_TYPE, DAV_KEEP_CHECKED_OUT, DAV_LOCKED_UPDATE, DAV_NEW_VERSION, DAV_OK, DAV_OVERWRITE, DAV_UNLOCKED_UPDATE, DAV_VERSION_HISTORY_RESOURCE_TYPE, DAV_WORKSPACE_RESOURCE_TYPE |
Fields inherited from interface org.eclipse.webdav.internal.kernel.WebDAVConstants |
---|
DAV_URI |
Constructor Summary | |
---|---|
CollectionHandle(DAVClient davClient,
ILocator locator)
Creates a new CollectionHandle from the given
DAVClient and Locator . |
Method Summary | |
---|---|
void |
baselineControl()
Bring the receiver under baseline control. |
void |
baselineControl(ILocator baseline)
Create a new version-controlled configuration on the given baseline. |
void |
bind(String member,
ILocator source)
Binds the given member in this collection to the resource identified by the given source locator. |
void |
bind(String member,
ILocator source,
boolean overwrite)
Binds the given member in this collection to the resource identified by the given source locator. |
AbstractResourceHandle |
checkOut()
Check out this resource. |
void |
create()
Create this collection in the repository. |
CollectionHandle |
getCollectionHandle(String name)
Answer the given member of the receiver as a collection handle. |
ILocator |
getMember(String memberName)
Return the locator of the member of this collection, with the given name. |
Set |
getMembers()
Return a set of handles representing the members of this collection. |
ResourceHandle |
getResourceHandle(String name)
|
WorkspaceHandle |
getWorkspaceHandle(String name)
|
boolean |
isWorkspace()
Check to see if the receiver is a workspace resource. |
void |
mkdirs()
Create the receiver and any parent collections that must be created on the path to the receiver. |
protected void |
mkdirs(CollectionHandle handle)
|
Methods inherited from class org.eclipse.webdav.client.AbstractResourceHandle |
---|
asCollectionHandle, asResourceHandle, canTalkDAV, checkIn, closeResponse, copy, copy, delete, delete, equals, examineMultiStatusResponse, examineResponse, examineStatusCode, exists, extractPropStats, getContent, getDAVClient, getLocator, getLocks, getParent, getProperties, getProperties, getProperty, getPropertyNames, getVersionTree, getWorkspaceCollections, hashCode, head, isCheckedIn, isCheckedOut, isCollection, isLocked, isVersion, isVersionControlled, isWorkingResource, lock, lock, move, move, newContext, newDocument, propertyHasChild, protectedCheckIn, protectedCheckOut, refreshLock, removeProperties, removeProperty, setContent, setContent, setProperties, setProperty, supportsLiveProperty, toString, trace, unlock, update, versionControl |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectionHandle(DAVClient davClient, ILocator locator)
CollectionHandle
from the given
DAVClient
and Locator
.
A CollectionHandle is a resource handle for DAV resources with internal members.
davClient
- the client used to access the WebDAV server.locator
- the reference to the collection resource on the
server.Method Detail |
---|
public void baselineControl() throws DAVException
DAVException
- if the baseline control operation failed.IServer#baselineControl(Locator, Context, Document)
public void baselineControl(ILocator baseline) throws DAVException
DAVException
- if the baseline control operation failed.IServer#baselineControl(Locator, Context, Document)
public void bind(String member, ILocator source) throws DAVException
member
- a member in this collectionsource
- the location of a resource
DAVException
- if the binding could not be created#bind(String, Locator, boolean)
,
IServer#bind(Locator, Locator, Context)
public void bind(String member, ILocator source, boolean overwrite) throws DAVException
false
and
such a member already exists, or such a member is already bound to a
resource, it is not replaced. Otherwise, if overwrite is
true
and such a member already exists, or such a member
is already bound to a resource, it is replaced.
member
- a member in this collectionsource
- the location of a resourceoverwrite
- a boolean indicating whether or not any existing
resource or binding is replaced
DAVException
- if the binding could not be created#bind(String, Locator, boolean)
,
IServer#bind(Locator, Locator, Context)
public AbstractResourceHandle checkOut() throws DAVException
Note that a checked-out version-controlled collection has members that are themselves version-controlled resources, or unversioned resources; however, working collection members are always version history resources.
checkOut
in class AbstractResourceHandle
CollectionHandle
.
DAVException
- if there is a problem checking out the receiver.public void create() throws DAVException
This corresponds to a WebDAV MKCOL method.
create
in class AbstractResourceHandle
DAVException
- if there was a problem creating this collectionIServer#mkcol(ILocator, IContext, IElement)
public void mkdirs() throws DAVException
DAVException
- if there is a problem creating the collections.protected void mkdirs(CollectionHandle handle) throws DAVException
DAVException
public CollectionHandle getCollectionHandle(String name) throws DAVException
DAVException
- if there is a problem creating the new handle.public ILocator getMember(String memberName)
memberName
- the name of the receiver's internal member.
public Set getMembers() throws DAVException
Each member of the set will be typed to be a ResourceHandle
or a CollectionHandle
depending upon whether it implements
collection semantics. Note that workspaces will be returned as
regular collection handles and should be converted to workspace handles
if required (test using isWorkspace()).
Set
of ResourceHandle
and/or
CollectionHandle
or an empty set if the receiver has no members.
DAVException
- if there was a problem getting the members.public ResourceHandle getResourceHandle(String name) throws DAVException
DAVException
public WorkspaceHandle getWorkspaceHandle(String name) throws DAVException
DAVException
public boolean isWorkspace() throws DAVException
The resource is a workspace resource if it has <DAV:workspace-checkout-set> in the <DAV:supported-live-properties-set>.
true
if the resource is a workspace
and false
otherwise.
DAVException
- if a problem occurs determining the state
of the resource.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |