Project: stp

com.ibm.rational.wvcm.stp.cc
Interface CcFile

All Superinterfaces:
CcResource, ControllableResource, Resource, StpResource
All Known Subinterfaces:
CcDirectory, CcSymlink, CcView

public interface CcFile
extends CcResource, ControllableResource

A proxy for a file, directory, or symbolic link resource in a ClearCase view. This resource is either under version control or could potentially be put under version control.


Nested Class Summary
static class CcFile.ApplyLabelFlag
          Flags for the doApplyLabel method
static class CcFile.AttributeOpFlag
          Flags for the doApplyAttribute and doRemoveAttribute methods
static class CcFile.CcCheckoutFlag
          Flags for the doCheckout method.
static class CcFile.CcVersionControlFlag
          Flags for the doCcVersionControl method.
static class CcFile.LoadState
          Values for file or directory load state
static class CcFile.RefreshFlag
          Flags for the doRefresh and doRestore methods.
static class CcFile.RemoveLabelFlag
          Flags for the doRemoveLabel method
static class CcFile.UncheckoutFlag
          Flags for the doUncheckout method
static class CcFile.UnhijackFlag
          Flags for the doUnhijack method
 
Nested classes/interfaces inherited from interface com.ibm.rational.wvcm.stp.StpResource
StpResource.UnsupportedProperty
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.CopyFlag
 
Nested classes/interfaces inherited from interface javax.wvcm.ControllableResource
ControllableResource.CheckinFlag, ControllableResource.CheckoutFlag
 
Field Summary
static PropertyNameList.PropertyName<File> CLIENT_PATH
          For client resources, identifies the file system path to the local file representing this controllable resource.
static PropertyNameList.PropertyName<CcElement> ELEMENT
          The CC element resource associated with this file.
static PropertyNameList.PropertyName<CcElementType> ELEMENT_TYPE
          For version-controlled resources, this resource's element type.
static PropertyNameList.PropertyName<Boolean> IS_DB_FILE
          Is this file a file area database file?
static PropertyNameList.PropertyName<Boolean> IS_HIJACKED
          Property which is true/false depending on whether this version-controlled resource has been hijacked.
static PropertyNameList.PropertyName<Boolean> IS_SYMLINK
          Is this file actually a symbolic link?
static PropertyNameList.PropertyName<CcVersion> LATEST_VERSION_ON_BRANCH
          The version of this file that is currently the latest on the same branch.
static PropertyNameList.PropertyName<CcFile.LoadState> LOAD_STATE
          Whether this file is loaded, partially loaded, or not loaded in the file area in which it resides.
static PropertyNameList.PropertyName<CcDirectory> PARENT
          Returns the direct parent of this file.
static PropertyNameList.PropertyName<String> SELECTION_RULE
          The config spec rule that selects this file.
static PropertyNameList.PropertyName<List<PropertyNameList.PropertyName>> SKEWED_PROPERTY_LIST
          Version controlled files and directories may have both client state - state maintained in a local file area - and server state.
static PropertyNameList.PropertyName<String> SYMLINK_TARGET_PATH
          If this file is actually a symbolic link, the path to its target file or directory.
static PropertyNameList.PropertyName<CcVersion> VERSION
          The CC version resource associated with this file.
static PropertyNameList.PropertyName<String> VERSION_OID
          The OID of the CC version resource associated with this file.
static PropertyNameList.PropertyName<String> VIEW_RELATIVE_PATH
          The view-relative path for this resource.
static PropertyNameList.PropertyName<CcVobTag> VOB_TAG
          The tag of the VOB in which this file resides.
 
Fields inherited from interface com.ibm.rational.wvcm.stp.StpResource
ALL_PROPERTIES, AUTHENTICATION_REALM, CREATOR_GROUP_NAME, CREATOR_LOGIN_NAME, EFFICIENT_LOCATION, INVALID_PROPERTIES, REPOSITORY, STABLE_LOCATION, USER_FRIENDLY_LOCATION
 
Fields inherited from interface javax.wvcm.Resource
ALL_CUSTOM_PROPERTIES, COMMENT, CONTENT_CHARACTER_SET, CONTENT_IDENTIFIER, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CREATION_DATE, CREATOR_DISPLAY_NAME, DISPLAY_NAME, IS_EXECUTABLE, LAST_MODIFIED, PARENT_LIST, PATHNAME_LOCATION, PROVIDER_LIST, RESOURCE_IDENTIFIER, WORKSPACE_FOLDER_LIST
 
Fields inherited from interface javax.wvcm.ControllableResource
ACTIVITY, AUTO_MERGE_LIST, CHECKED_IN, CHECKED_OUT, CONFIGURATION, IS_CHECKED_OUT, IS_VERSION_CONTROLLABLE, IS_VERSION_CONTROLLED, MERGE_LIST, PREDECESSOR_LIST, RESERVED, VERSION_HISTORY, WORKSPACE
 
Method Summary
 File clientResourceFile()
          Returns a File representing the location of this client-side Resource in the local file system, else null if this Resource is a server-side resource only.
 CcFile createCcFile(Feedback feedback)
          Create a new view-private file at the location specified by this resource.
 ControllableResource doApplyAttribute(CcFile.AttributeOpFlag[] flags, String comment, String attributeName, String attributeValue, String versionId, Feedback feedback)
          Apply the specified attribute to the checked-in version of this controllable resource.
 ControllableResource doApplyLabel(CcFile.ApplyLabelFlag[] flags, String label, Feedback feedback)
          Apply the specified label to the checked-in version of this controllable resource.
 CcFile doCcCheckout(CcFile.CcCheckoutFlag[] flags, Feedback feedback)
          Check out this version-controlled file or directory resource.
 ControllableResource doCcVersionControl(CcFile.CcVersionControlFlag[] flags, Feedback feedback)
          Enhanced variant of the doVersionControl that provides additional flags which modify the behaviour.
 ControllableResource doCheckin(ControllableResource.CheckinFlag[] flags, Feedback feedback)
          Check in this checked out file or directory resource.
 CcFile doLoad(Feedback feedback)
           Load this controllable resource into the view's local file area.
 CcFile doRefresh(CcFile.RefreshFlag[] flags, Feedback feedback)
           Refresh this file or directory.
 ControllableResource doRemoveAttribute(CcFile.AttributeOpFlag[] flags, String comment, String attributeName, String versionId, Feedback feedback)
          Remove the specified attribute from the checked-in version of this controllable resource.
 ControllableResource doRemoveLabel(CcFile.RemoveLabelFlag[] flags, String label, Feedback feedback)
          Remove the specified label from the checked-in version of this controllable resource.
 CcFile doRestore(CcFile.RefreshFlag[] flags, Feedback feedback)
           Restore this file or directory.
 CcFile doUncheckout(CcFile.UncheckoutFlag[] flags, Feedback feedback)
          Cancel the checkout of this version-controlled resource, and restore its content to the state of its CHECKED_IN version.
 CcFile doUnhijack(CcFile.UnhijackFlag[] flags, Feedback feedback)
          Undo a hijack on this hijacked controllable resource.
 ControllableResource doVersionControl(Feedback feedback)
          Places the view-private file specified by this proxy under version control.
 File getClientPath()
          Returns the value of this proxy's CLIENT_PATH property.
 CcElement getElement()
          Get the value of this resource's ELEMENT property.
 CcElementType getElementType()
          Returns the value of this proxy's ELEMENT_TYPE property.
 boolean getIsDbFile()
          Get the value of this files IS_DB_FILE property.
 boolean getIsHijacked()
          Get the value of this file's IS_HIJACKED property.
 boolean getIsSymlink()
          Get the value of the IS_SYMLINK property.
 CcVersion getLatestVersionOnBranch()
          Get the value of this resource's LATEST_VERSION_ON_BRANCH property.
 CcFile.LoadState getLoadState()
          Get the value of this resource's LOAD_STATE property.
 CcDirectory getParent()
          Get the value of the PARENT property.
 String getSelectionRule()
          Get the value of this resource's SELECTION_RULE property.
 List<PropertyNameList.PropertyName> getSkewedPropertyList()
          Get the value of this file's SKEWED_PROPERTY_LIST property.
 String getSymlinkTargetPath()
          Get the value of this resource's SYMLINK_TARGET_PATH property.
 CcVersion getVersion()
          Get the value of this resource's VERSION property.
 String getVersionOid()
          Get the value of this resource's VERSION_OID property.
 String getViewRelativePath()
          Get the value of this resource's VIEW_RELATIVE_PATH property.
 CcVobTag getVobTag()
          Get the value of this resource's VOB_TAG property.
 CcFile hijack(Feedback feedback)
          Hijack this controllable resource.
 CcFile readContent(OutputStream content, Feedback feedback)
          Reads the file's content, if it is available locally on the client machine.
 CcFile readProperties(Feedback feedback)
          Reads the file's properties, if they are available locally on the client machine.
 CcFile resolve()
          Resolve this file resource, but do not consult the ClearCase server.
 void setElementType(CcElementType eltype)
          Set the value of this file or directory's ELEMENT_TYPE property.
 
Methods inherited from interface CcResource
ccProvider, doResolve, isResolved
 
Methods inherited from interface com.ibm.rational.wvcm.stp.StpResource
doReadProperties, equals, getAllProperties, getAuthenticationRealm, getCreatorGroupName, getCreatorLoginName, getCustomProperties, getEfficientLocation, getInvalidProperties, getMetaProperties, getPropertyException, getRepository, getResourceError, getResourceIdentifier, getStableLocation, getUserFriendlyLocation, hashCode, hasProperties, initMetaProperty, proxyType, stpLocation, stpProvider
 
Methods inherited from interface javax.wvcm.Resource
doCopy, doFind, doFindAll, doGetPropertyNameList, doGetPropertyNameList, doReadContent, doReadProperties, doUnbindAll, doWriteContent, doWriteProperties, forgetProperty, getComment, getContentCharacterSet, getContentIdentifier, getContentLanguage, getContentLength, getContentType, getCreationDate, getCreatorDisplayName, getDisplayName, getIsExecutable, getLastModified, getParentList, getPathnameLocation, getProperty, getProviderList, getWorkspaceFolderList, initProperty, location, lookupProperty, modifyLocation, propertyNameList, provider, removeProperty, setComment, setContentCharacterSet, setContentLanguage, setContentType, setCreatorDisplayName, setDisplayName, setIsExecutable, setProperty, setProperty, updatedPropertyNameList
 
Methods inherited from interface javax.wvcm.ControllableResource
doAddLabel, doCheckout, doCreateResource, doCreateVersionControlledResource, doReadLabelledVersionProperties, doRemoveLabel, doSetLabel, doUncheckout, getActivity, getAutoMergeList, getCheckedIn, getCheckedOut, getConfiguration, getIsCheckedOut, getIsVersionControllable, getIsVersionControlled, getMergeList, getPredecessorList, getReserved, getVersionHistory, getWorkspace, setActivity, setAutoMergeList, setMergeList, setPredecessorList, setReserved, workspaceProvider
 

Field Detail

CLIENT_PATH

static final PropertyNameList.PropertyName<File> CLIENT_PATH
For client resources, identifies the file system path to the local file representing this controllable resource.


ELEMENT

static final PropertyNameList.PropertyName<CcElement> ELEMENT
The CC element resource associated with this file. The value of this property will be null if this is not a version- controlled resource.

See Also:
ControllableResource.VERSION_HISTORY

ELEMENT_TYPE

static final PropertyNameList.PropertyName<CcElementType> ELEMENT_TYPE
For version-controlled resources, this resource's element type.


IS_DB_FILE

static final PropertyNameList.PropertyName<Boolean> IS_DB_FILE
Is this file a file area database file? File area DB files require special treatment. For instance, they cannot be source controlled. For this reason, applications may choose to hide these files from the end user.


IS_HIJACKED

static final PropertyNameList.PropertyName<Boolean> IS_HIJACKED
Property which is true/false depending on whether this version-controlled resource has been hijacked.


IS_SYMLINK

static final PropertyNameList.PropertyName<Boolean> IS_SYMLINK
Is this file actually a symbolic link?


LATEST_VERSION_ON_BRANCH

static final PropertyNameList.PropertyName<CcVersion> LATEST_VERSION_ON_BRANCH
The version of this file that is currently the latest on the same branch.


LOAD_STATE

static final PropertyNameList.PropertyName<CcFile.LoadState> LOAD_STATE
Whether this file is loaded, partially loaded, or not loaded in the file area in which it resides.


PARENT

static final PropertyNameList.PropertyName<CcDirectory> PARENT
Returns the direct parent of this file. The value will be null if the file has no parent (e.g. VOB root). Does not find parents of hard-linked names for the file.


SELECTION_RULE

static final PropertyNameList.PropertyName<String> SELECTION_RULE
The config spec rule that selects this file.


SKEWED_PROPERTY_LIST

static final PropertyNameList.PropertyName<List<PropertyNameList.PropertyName>> SKEWED_PROPERTY_LIST

Version controlled files and directories may have both client state - state maintained in a local file area - and server state. When the client state and server state get out of sync, we call this skew.

The caller can detect skew by including the SKEWED_PROPERTY_LIST property in property requests to doReadProperties() and other do methods that accept property requests. The resulting value of this property is the list of property names in the request that differed between the client and the server for this particular file or directory.

Note that only certain properties are checked for skew - properties where skew can cause significant problems. For example, ControllableResource.IS_CHECKED_OUT, ControllableResource.IS_VERSION_CONTROLLED, and VERSION_OID. Note that skew can also be caused by elementness skew (file vs dir) and loadness skew (loaded vs unloaded).

Note also that only properties in the current property request are checked for skew.

NOTE: This should be used only as a trigger to do a real discordance scan of the directory. These values are not reliable enough to use for icon decoration or user messages. This is a quick and easy way to automatically detect skew, but it does not cover all edge cases (symlinks, aliases, and others) or discordance types.


SYMLINK_TARGET_PATH

static final PropertyNameList.PropertyName<String> SYMLINK_TARGET_PATH

If this file is actually a symbolic link, the path to its target file or directory. The path is interpreted relative to this file's parent directory.

If this file is not a symbolic link, this value will be null.


VERSION

static final PropertyNameList.PropertyName<CcVersion> VERSION
The CC version resource associated with this file. The value of this property will be null if this is not a version- controlled resource.

See Also:
and javax.wvcm.ControllableResource#CHECKED_OUT

VERSION_OID

static final PropertyNameList.PropertyName<String> VERSION_OID
The OID of the CC version resource associated with this file. The value of this property will be null if this is not a version- controlled resource.


VIEW_RELATIVE_PATH

static final PropertyNameList.PropertyName<String> VIEW_RELATIVE_PATH
The view-relative path for this resource.


VOB_TAG

static final PropertyNameList.PropertyName<CcVobTag> VOB_TAG
The tag of the VOB in which this file resides.

Method Detail

clientResourceFile

File clientResourceFile()
                        throws WvcmException
Returns a File representing the location of this client-side Resource in the local file system, else null if this Resource is a server-side resource only.

Returns:
The location of this Resource in the local file system, else null if this is a proxy to a server-side resource only.
Throws:
WvcmException - Thrown if there was an error in determining the path for this client-side Resource.

createCcFile

CcFile createCcFile(Feedback feedback)
                    throws WvcmException
Create a new view-private file at the location specified by this resource. The request will fail if a resource already exists at that location.

Parameters:
feedback -
Returns:
a CcFile proxy for the new file
Throws:
WvcmException
See Also:
ControllableResource.doCreateResource(Feedback)

doApplyAttribute

ControllableResource doApplyAttribute(CcFile.AttributeOpFlag[] flags,
                                      String comment,
                                      String attributeName,
                                      String attributeValue,
                                      String versionId,
                                      Feedback feedback)
                                      throws WvcmException
Apply the specified attribute to the checked-in version of this controllable resource.

Parameters:
flags - array of flags which specify the behavior of the operation
comment - Comment (if any) to be used for operation. Empty string if none.
attributeName - Name of an existing attribute type to be used to create an instance will to be applied to this resource.
attributeValue - Value of attribute instance. If the vtype of the attribute type is a string, it must be enclosed in additional quotes within the string. For example, if specified as a constant it would appear as "\"string value\"". If the vtype is not a string, this should be a string representation of the given value (e.g. "3.1415", "0xa413", etc.).
versionId - Applies the attribute to the explicitly specified version, overriding the version selected by the view. This string must only represent the version suffix (e.g. /main/314).
feedback -
Returns:
A new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException

doApplyLabel

ControllableResource doApplyLabel(CcFile.ApplyLabelFlag[] flags,
                                  String label,
                                  Feedback feedback)
                                  throws WvcmException
Apply the specified label to the checked-in version of this controllable resource.

Parameters:
flags - array of flags which specify the behavior of the operation
label - the label to be added to this version
feedback -
Returns:
A new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException

doCcCheckout

CcFile doCcCheckout(CcFile.CcCheckoutFlag[] flags,
                    Feedback feedback)
                    throws WvcmException

Check out this version-controlled file or directory resource. The resource is checked out to the ClearCase view implied by its location.

If the view is a UCM view, the caller must insure there is a Workspace.CURRENT_ACTIVITY for this operation. The checked out file will be added to the current activity's change set. The caller may explicitly specify an activity using this resource's ControllableResource.setActivity(javax.wvcm.Activity) method. In that case, the specified activity will become the new current activity. Otherwise, the existing current activity will be used. If the view is a UCM view and there is no current activity, the operation will fail.

The caller may optionally specify a checkout comment using this resource's Resource.setComment(java.lang.String) method.

Parameters:
flags - array of flags which specify the behavior of the operation
feedback -
Returns:
new CcFile proxy representing the checked out file.
Throws:
WvcmException

doCcVersionControl

ControllableResource doCcVersionControl(CcFile.CcVersionControlFlag[] flags,
                                        Feedback feedback)
                                        throws WvcmException
Enhanced variant of the doVersionControl that provides additional flags which modify the behaviour.

This method has two main difference from doVersionControl:

  1. It does not automatically checkout the version controlled parent directory. The caller must do this explicitly unless the CcVersionControlFlag.MAKE_PATH flag is specified.
  2. The newly version controlled file will be left in a checked-out state. To have the resulting file checked-in, specify the CcVersionControlFlag.CHECKIN flag.

Parameters:
flags - array of flags which specify the behavior of the operation
feedback -
Returns:
A new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException
See Also:
doVersionControl(javax.wvcm.Feedback)

doCheckin

ControllableResource doCheckin(ControllableResource.CheckinFlag[] flags,
                               Feedback feedback)
                               throws WvcmException

Check in this checked out file or directory resource.

If this resource is in a UCM view, it was added to an activity's change set at checkout time. The caller may specify an alternate change set using this resource's ControllableResource.setActivity(javax.wvcm.Activity) method just before calling doCheckin.

The caller may also specify a checkin comment using this resource's Resource.setComment(java.lang.String) method. This will override the comment specified at checkout time, if any.

Specified by:
doCheckin in interface ControllableResource
Parameters:
flags - array of flags which specify the behavior of the operation
feedback -
Returns:
new ControllableResource proxy representing the checked in file.
Throws:
WvcmException
See Also:
ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback), ControllableResource.doCheckout(javax.wvcm.ControllableResource.CheckoutFlag[], javax.wvcm.Feedback)

doLoad

CcFile doLoad(Feedback feedback)
              throws WvcmException

Load this controllable resource into the view's local file area. If this is a controllable folder, loads the tree of controllable resources under this folder. Also updates the view's load rules if necessary to include this file or folder.

If this resource was already loaded, doLoad is a no-op.

Preconditions: This must be a version-controlled file or folder in a web view.

Postconditions: This file, or the tree of files under this folder, is loaded into the web view. Thus, the file(s) appear, and the view's load rules are updated to include this file or folder.

Parameters:
feedback - (optional) feedback's notifyIsModified() method will be called for each file or directory as it is loaded
Returns:
a new CcFile proxy for the file that has been loaded
Throws:
WvcmException

doRefresh

CcFile doRefresh(CcFile.RefreshFlag[] flags,
                 Feedback feedback)
                 throws WvcmException

Refresh this file or directory. Re-evaluate the view's config spec and update resources on the client to be whatever is currently selected by the config spec. If this is a directory, recursively refresh its contents.

Example: The config spec says "element * /main/LATEST", and you have version "/main/7" of this resource loaded. Someone else checks in a new version, thus creating a "/main/8". In that case, doRefresh() will cause version "/main/8" of this resource to be loaded into your view.

Preconditions: This resource must be a version-controlled file or directory.

Postconditions: This resource (and its descendants if this is a directory) are updated to be what is currently selected by the view's config spec.

Parameters:
flags - array of flags which specify the behavior of the operation
feedback - a list of properties to fetch on the updated resources. The resources returned by the iterator returned by doRefresh will have these properties filled in.
Returns:
a new CcFile proxy representing the refreshed file
Throws:
WvcmException - if the precondition is not met or if an error

doRemoveAttribute

ControllableResource doRemoveAttribute(CcFile.AttributeOpFlag[] flags,
                                       String comment,
                                       String attributeName,
                                       String versionId,
                                       Feedback feedback)
                                       throws WvcmException
Remove the specified attribute from the checked-in version of this controllable resource.

Parameters:
flags - array of flags which specify the behavior of the operation
comment - Comment (if any) to be used for operation. Empty string if none.
attributeName - Name of the attribute to be removed from this resource
versionId - Removes the attribute from the explicitly specified version, overriding the version selected by the view.
feedback -
Returns:
A new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException

doRemoveLabel

ControllableResource doRemoveLabel(CcFile.RemoveLabelFlag[] flags,
                                   String label,
                                   Feedback feedback)
                                   throws WvcmException
Remove the specified label from the checked-in version of this controllable resource.

Parameters:
flags - array of flags which specify the behavior of the operation
label - the label to be removed from this version
feedback -
Returns:
A new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException

doRestore

CcFile doRestore(CcFile.RefreshFlag[] flags,
                 Feedback feedback)
                 throws WvcmException

Restore this file or directory. If this is a directory, recursively restore its contents. This repairs any damage to the portion of the file area database specified by this resource.

Parameters:
flags - array of flags which specify the behavior of the operation
feedback -
Returns:
a new CcFile proxy representing the restored file
Throws:
WvcmException

doUncheckout

CcFile doUncheckout(CcFile.UncheckoutFlag[] flags,
                    Feedback feedback)
                    throws WvcmException
Cancel the checkout of this version-controlled resource, and restore its content to the state of its CHECKED_IN version.

Parameters:
flags - array of flags which specify the behavior of the operation
feedback -
Returns:
new CcFile proxy representing the file whose checkout has been canceled
Throws:
WvcmException
See Also:
ControllableResource.doUncheckout(javax.wvcm.Feedback)

doUnhijack

CcFile doUnhijack(CcFile.UnhijackFlag[] flags,
                  Feedback feedback)
                  throws WvcmException
Undo a hijack on this hijacked controllable resource. Reload the file's contents from the appropriate version on the server.

Parameters:
flags - Specify KEEP to save a copy of the hijacked file's contents in a ".keep" file before undoing the hijack.
feedback -
Returns:
a new CcFile proxy for the unhijacked file
Throws:
WvcmException

doVersionControl

ControllableResource doVersionControl(Feedback feedback)
                                      throws WvcmException
Places the view-private file specified by this proxy under version control.

If the view is a UCM view, the caller must insure there is a Workspace.CURRENT_ACTIVITY for this operation. The newly version controlled file will be added to the current activity's change set and left in a checked-in state. The caller may explicitly specify an activity using this resource's ControllableResource.setActivity(javax.wvcm.Activity) method. In that case, the specified activity will become the new current activity. Otherwise, the existing current activity will be used. If the view is a UCM view and there is no current activity, the operation will fail.

The caller may optionally specify a creation comment using this resource's Resource.setComment(java.lang.String) method.

The caller may optionally specify the type of element to be created using this resource's setElementType(com.ibm.rational.wvcm.stp.cc.CcElementType) method.

Specified by:
doVersionControl in interface ControllableResource
Parameters:
feedback -
Returns:
new ControllableResource proxy representing the version controlled file.
Throws:
WvcmException
See Also:
ControllableResource.doVersionControl(javax.wvcm.Feedback)

getClientPath

File getClientPath()
                   throws WvcmException
Returns the value of this proxy's CLIENT_PATH property.

Returns:
The path to this ControllableResource in the local file area. Will never be null.
Throws:
WvcmException - if requested of a ControllableResource without client state

getElement

CcElement getElement()
                     throws WvcmException
Get the value of this resource's ELEMENT property.

Returns:
this file's element, or null if this file is not version controlled
Throws:
WvcmException - if property was not requested

getElementType

CcElementType getElementType()
                             throws WvcmException
Returns the value of this proxy's ELEMENT_TYPE property.

Returns:
This resource's element type. Will be null if resource is not version-controlled.
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getIsDbFile

boolean getIsDbFile()
                    throws WvcmException
Get the value of this files IS_DB_FILE property.

Returns:
true if this file is a file area database file, else false
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getIsHijacked

boolean getIsHijacked()
                      throws WvcmException
Get the value of this file's IS_HIJACKED property.

Returns:
true if the file is hijacked, false otherwise
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getIsSymlink

boolean getIsSymlink()
                     throws WvcmException
Get the value of the IS_SYMLINK property.

Returns:
true if this resource is a symbolic link, false otherwise.
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getLatestVersionOnBranch

CcVersion getLatestVersionOnBranch()
                                   throws WvcmException
Get the value of this resource's LATEST_VERSION_ON_BRANCH property.

Returns:
the version of this file that is the latest on the same branch as the version in the view.
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getLoadState

CcFile.LoadState getLoadState()
                              throws WvcmException
Get the value of this resource's LOAD_STATE property.

Returns:
LoadState.LOADED, LoadState.PARTIALLY_LOADED or LoadState.NOT_LOADED
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getParent

CcDirectory getParent()
                      throws WvcmException
Get the value of the PARENT property.

Returns:
A CcDirectory proxy for the parent, null if no parent
Throws:
WvcmException

getSelectionRule

String getSelectionRule()
                        throws WvcmException
Get the value of this resource's SELECTION_RULE property.

Returns:
this file's config spec rule, as a string.
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getSkewedPropertyList

List<PropertyNameList.PropertyName> getSkewedPropertyList()
                                                          throws WvcmException
Get the value of this file's SKEWED_PROPERTY_LIST property. NOTE: This should be used only as a trigger to do a real discordance scan of the directory. These values are not reliable enough to use for icon decoration or user messages. This is a quick and easy way to automatically detect skew, but it does not cover all edge cases (symlinks, aliases, and others) or discordance types.

Returns:
a list of property names in the current property request whose values differed between the client and the server for this file or directory.
Throws:
WvcmException - if this proxy doesn't define a value for this property.

getSymlinkTargetPath

String getSymlinkTargetPath()
                            throws WvcmException
Get the value of this resource's SYMLINK_TARGET_PATH property.

Returns:
path to symlink's target file or directory, or null if this file is not a symbolic link.
Throws:
WvcmException - if property was not requested

getVersion

CcVersion getVersion()
                     throws WvcmException
Get the value of this resource's VERSION property.

Returns:
this file's version, or null if this file is not version controlled
Throws:
WvcmException - if property was not requested

getVersionOid

String getVersionOid()
                     throws WvcmException
Get the value of this resource's VERSION_OID property.

Returns:
this file's version oid, or null if this file is not version controlled
Throws:
WvcmException - if property was not requested

getViewRelativePath

String getViewRelativePath()
                           throws WvcmException
Get the value of this resource's VIEW_RELATIVE_PATH property.

Returns:
view-relative path
Throws:
WvcmException - if property was not requested

getVobTag

CcVobTag getVobTag()
                   throws WvcmException
Get the value of this resource's VOB_TAG property.

Returns:
the VOB tag for this file's VOB as a CcVobTag proxy, or null if this file is not version controlled
Throws:
WvcmException - if property was not requested

hijack

CcFile hijack(Feedback feedback)
              throws WvcmException
Hijack this controllable resource. Make the resource writable and set its "last modified" time to the current time. This operation does not contact the server.

Parameters:
feedback -
Returns:
a new CcFile proxy for the hijacked file
Throws:
WvcmException

readContent

CcFile readContent(OutputStream content,
                   Feedback feedback)
                   throws WvcmException
Reads the file's content, if it is available locally on the client machine.

Parameters:
feedback - the properties to be available in the returned proxy, and any other feedback desired, such as progress indications.
content - the file's content, if available, is written to this byte stream. The stream is then closed.
Returns:
a CcFile proxy containing the wanted properties that are available on the client host without communicating with the server.
Throws:
WvcmException - ReasonCode:
WvcmException.ReasonCode.NOT_FOUND: The file MUST be available locally on the client machine.
See Also:
doReadContent

readProperties

CcFile readProperties(Feedback feedback)
                      throws WvcmException
Reads the file's properties, if they are available locally on the client machine.

Parameters:
feedback - the properties to be available in the returned proxy, and any other feedback desired, such as progress indications.
Returns:
a CcFile containing the wanted properties that are available locally on the client machine without communicating with the server.
Throws:
WvcmException - ReasonCode:
WvcmException.ReasonCode.NOT_FOUND: The file MUST be available locally on the client machine.
See Also:
doReadProperties.

resolve

CcFile resolve()
               throws WvcmException
Resolve this file resource, but do not consult the ClearCase server. Unlike CcResource.doResolve(), use only information currently available information on the local client machine.

Returns:
a new file proxy of the correct, most specific resource type
Throws:
WvcmException - with NOT_FOUND reason code if this file does not exist on the local machine.
See Also:
CcResource.doResolve()

setElementType

void setElementType(CcElementType eltype)
Set the value of this file or directory's ELEMENT_TYPE property. This property can only be set just prior to calling doVersionControl() on the resource.

Parameters:
eltype - resource's desired element type

Generated Wed 12-Feb-2014 03:12 AM

Copyright © IBM 2014. All rights reserved.