org.eclipse.webdav.client
Class ResourceHandle

java.lang.Object
  extended by org.eclipse.webdav.client.AbstractResourceHandle
      extended by org.eclipse.webdav.client.ResourceHandle
All Implemented Interfaces:
WebDAVConstants, WebDAVPropertyNames, WebDAVPropertyValues

public class ResourceHandle
extends AbstractResourceHandle

The ResourceHandle class represents an ordinary resource in the system. It subclasses AbstractResourceHandle and overrides some of its methods in order to provide specific behaviour for this resource type.

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.WebDAVPropertyNames
DAV_ACTIVITY_CHECKOUT_SET, DAV_ACTIVITY_VERSION_SET, DAV_AUTO_CHECKIN, DAV_AUTO_CHECKOUT, DAV_AUTO_MERGE_SET, DAV_BASELINE_COLLECTION, DAV_BASELINE_CONTROLLED_COLLECTION, DAV_BASELINE_CONTROLLED_COLLECTION_SET, DAV_BASELINE_SELECTOR, DAV_CHECKED_IN, DAV_CHECKED_OUT, DAV_CHECKIN_DATE, DAV_CHECKIN_FORK, DAV_CHECKOUT_FORK, DAV_CHECKOUT_SET, DAV_COMMENT, DAV_CREATION_DATE, DAV_CREATOR_DISPLAYNAME, DAV_CURRENT_ACTIVITY_SET, DAV_CURRENT_WORKSPACE_SET, DAV_DISPLAY_NAME, DAV_GET_CONTENT_LANGUAGE, DAV_GET_CONTENT_LENGTH, DAV_GET_CONTENT_TYPE, DAV_GET_E_TAG, DAV_GET_LAST_MODIFIED, DAV_HREF, DAV_LABEL_NAME_SET, DAV_LATEST_VERSION, DAV_LOCK_DISCOVERY, DAV_MERGE_SET, DAV_MUTABLE, DAV_PRECURSOR_SET, DAV_PREDECESSOR_SET, DAV_RESOURCE_ID, DAV_RESOURCE_TYPE, DAV_ROOT_VERSION, DAV_SOURCE, DAV_SUBACTIVITY_SET, DAV_SUBBASELINE_SET, DAV_SUCCESSOR_SET, DAV_SUPPORTED_LIVE_PROPERTY_SET, DAV_SUPPORTED_LOCK, DAV_SUPPORTED_METHOD_SET, DAV_SUPPORTED_REPORT_SET, DAV_UNRESERVED, DAV_VERSION_CONTROLLED_CONFIGURATION, DAV_VERSION_HISTORY, DAV_VERSION_NAME, DAV_VERSION_SET, DAV_WORKING_RESOURCE, DAV_WORKSPACE, DAV_WORKSPACE_CHECKOUT_SET, DAV_WORKSPACE_COLLECTION_SET
 
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
ResourceHandle(DAVClient davClient, ILocator locator)
          Creates a new ResourceHandle from the given DAVClient and Locator.
 
Method Summary
 AbstractResourceHandle checkOut()
          Check out this resource.
 void create()
          Persistently create this resource instance in the repository.
 boolean isActivity()
          Check to see if the resource is an activity resource.
 boolean isBaseline()
          Check to see if the resource is a baseline resource.
 boolean isVersionControlledConfiguration()
          Check to see if the resource is a version-controlled configuration resource.
 boolean isVersionHistory()
          Check to see if the resource is a version history resource.
 
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

ResourceHandle

public ResourceHandle(DAVClient davClient,
                      ILocator locator)
Creates a new ResourceHandle from the given DAVClient and Locator.

Parameters:
davClient -
locator -
Method Detail

checkOut

public AbstractResourceHandle checkOut()
                                throws DAVException
Check out this resource. Returns a resource handle on the checked out version selector, or the working resource if a version is checked out.

Specified by:
checkOut in class AbstractResourceHandle
Throws:
DAVException - if a problem occurs checking out the resource.

create

public void create()
            throws DAVException
Persistently create this resource instance in the repository.

Note that the usual method for creating an instance of a non-collection resource would be setContent(InputStream).

Specified by:
create in class AbstractResourceHandle
Throws:
DAVException - if there was a problem creating this resource
See Also:
AbstractResourceHandle.setContent(InputStream)

isActivity

public boolean isActivity()
                   throws DAVException
Check to see if the resource is an activity resource.

The resource is an activity resource if it has <DAV:subactivity-set> in the <DAV:supported-live-properties-set>.

Returns:
true if the resource is an activity and false otherwise.
Throws:
DAVException - if a problem occurs determining the state of the resource.

isBaseline

public boolean isBaseline()
                   throws DAVException
Check to see if the resource is a baseline resource.

The resource is a baseline resource if it has <DAV:baseline-collection> in the <DAV:supported-live-properties-set>.

Returns:
true if the resource is a baseline and false otherwise.
Throws:
DAVException - if a problem occurs determining the state of the resource.

isVersionControlledConfiguration

public boolean isVersionControlledConfiguration()
                                         throws DAVException
Check to see if the resource is a version-controlled configuration resource.

The resource is a version-controlled configuration resource if it has <DAV:baseline-controlled-collection> in the <DAV:supported-live-properties-set>.

Returns:
true if the resource is a version-controlled configuration and false otherwise.
Throws:
DAVException - if a problem occurs determining the state of the resource.

isVersionHistory

public boolean isVersionHistory()
                         throws DAVException
Check to see if the resource is a version history resource.

The resource is a version history resource if it has <DAV:root-version> in the <DAV:supported-live-properties-set>.

Returns:
true if the resource is a version history and false otherwise.
Throws:
DAVException - if a problem occurs determining the state of the resource.


Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.