Project: stp

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

All Superinterfaces:
Resource, StpResource
All Known Subinterfaces:
CcActivity, CcAttributeType, CcBaseline, CcBranch, CcBranchType, CcComponent, CcDirectory, CcDirectoryElement, CcDirectoryVersion, CcElement, CcElementType, CcFile, CcHyperlink, CcHyperlinkType, CcLabelType, CcPolicy, CcProject, CcProjectFolder, CcRegistryRegion, CcReplica, CcRolemap, CcStorageLocation, CcStream, CcSymlink, CcTriggerType, CcTypeBase, CcVersion, CcView, CcViewTag, CcVob, CcVobResource, CcVobTag

public interface CcResource
extends StpResource

A proxy for a resource in a ClearCase VOB or view.


Nested Class Summary
 
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
 
Field Summary
 
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
 
Method Summary
 CcProvider ccProvider()
          Get the ClearCase provider associated with this resource proxy.
 Resource doReadContent(Resource context, OutputStream content, Feedback feedback)
          Get both the content and selected properties of this resource.
 CcResource doResolve()
          Construct a new proxy for this resource.
 Resource doWriteProperties(Resource context, Feedback feedback)
          Persists property changes to this CcResource.
 boolean hasSupportedProperties(PropertyRequestItem wantedProp)
          Checks if this proxy contains valid values for the provided properties, if and only if, they are supported.
 boolean isResolved()
          Has this proxy already been resolved?
 Resource readProperties(Feedback feedback)
          Reads the CcResource's properties if they are available locally on the client machine.
 Resource readProperties(Resource context, Feedback feedback)
          Request the properties specified in feedback from the client resource represented by this proxy.
 Resource resolve()
          Resolve this ClearCase resource, but do not consult the ClearCase server.
 Resource writeProperties(Feedback feedback)
          Persists property changes to this CcResource locally if they can be persisted locally.
 Resource writeProperties(Resource context, Feedback feedback)
          Persists property changes to this CcResource locally if they can be persisted locally.
 
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, setPropertyClean, 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
 

Method Detail

ccProvider

CcProvider ccProvider()
Get the ClearCase provider associated with this resource proxy. This is normally the network provider for the CCRC WAN server on which this remote resource resides, or a local provider if this is a local ClearCase resource.


doReadContent

Resource doReadContent(Resource context,
                       OutputStream content,
                       Feedback feedback)
                       throws WvcmException
Get both the content and selected properties of this resource. Use the provided

Parameters:
context - An optional proxy (often CcView) providing context for the generation of certain properties in the returned report. If the context is a CcView, the view's text mode will be used for retrieving the context. May be null.
content - the resource content is written to this byte stream. The stream is then closed.
feedback - Specifies optional feedback to the caller.
Returns:
a new proxy for this resource, whose properties are specified by feedback.
Throws:
WvcmException - ReasonCode:
  • WvcmException.ReasonCode.METHOD_NOT_SUPPORTED: This resource has no content.

  • doResolve

    CcResource doResolve()
                         throws WvcmException
    Construct a new proxy for this resource. This new proxy will be of the most correct, most derived class for this resource, based on currently available information in the resource's location, on the local client machine, and/or on the ClearCase server. In addition, this new proxy will have its identity correctly set so that its equals() and hashMap() methods will work correctly.

    Unresolved resource proxies should not be used in situations where equality matters, especially in maps, lists, sets, and other collection classes.

    Returns:
    a new proxy of the correct, most specific resource type
    Throws:
    WvcmException

    doWriteProperties

    Resource doWriteProperties(Resource context,
                               Feedback feedback)
                               throws WvcmException
    Persists property changes to this CcResource. An exception is thrown if any of properties cannot be written. If an exception is thrown, the properties that were set will not be written can be determined from Resource.updatedPropertyNameList() on this CcResource. Note that since doWriteProperties returns a new proxy whose properties are specified in the feedback argument, doWriteProperties is semantically identical to StpResource.doReadProperties(javax.wvcm.Resource, javax.wvcm.Feedback). Properties are computed relative to the given context. For example, when working with automatic views, the CcVobTag.IS_MOUNTED property of a CcVobTag resource can only be modified in the context of a CcView. Hence, you would use this form of doWriteProperties to specify the CcView context that should be used.

    Parameters:
    context - An optional proxy (often CcView) providing context for the writing of certain properties. May be null.
    feedback - Specifies optional feedback to the caller.
    Returns:
    a new proxy for this resource, whose properties are specified by feedback.
    Throws:
    WvcmException

    hasSupportedProperties

    boolean hasSupportedProperties(PropertyRequestItem wantedProp)
    Checks if this proxy contains valid values for the provided properties, if and only if, they are supported. Properties which are unsupported by the server are ignored.

    Parameters:
    wantedProp - A PropertyRequestItem, possibly with multiple nested properties, to check the value for. Cannot be null.
    Returns:
    true if there is an entry in this proxy for all server supported properties of the PropertyRequestItem, and those entries contain a valid value; false otherwise.

    isResolved

    boolean isResolved()
                       throws WvcmException
    Has this proxy already been resolved?

    Returns:
    true if this proxy has been resolved; else false
    Throws:
    WvcmException
    See Also:
    doResolve()

    readProperties

    Resource readProperties(Feedback feedback)
                            throws WvcmException
    Reads the CcResource's properties if they are available locally on the client machine. Any modified properties in this CcResource are first written to the resource before the properties are read from the resource. Note that this makes readProperties semantically identical to writeProperties(javax.wvcm.Feedback).

    Parameters:
    feedback - the properties to be available in the returned proxy, and any other feedback desired, such as progress indications.
    Returns:
    a Resource containing the wanted properties that are available locally on the client machine without communicating with the server. Note that there is an exception to this for automatic views, where a request to a connected automatic view may result in server communication to update local cached data.
    Throws:
    WvcmException -

    WvcmException.ReasonCode.NOT_FOUND: If the resource is not be known locally on the client machine.

    See Also:
    doReadProperties.

    readProperties

    Resource readProperties(Resource context,
                            Feedback feedback)
                            throws WvcmException
    Request the properties specified in feedback from the client resource represented by this proxy. A new proxy will be constructed whose property map contains just the requested properties. Any modified properties in this CcResource are first written to the resource before the properties are read from the resource. Note that this makes readProperties semantically identical to writeProperties(javax.wvcm.Feedback).

    Properties are computed within the context of a given resource context. For example, the CcVobTag.IS_MOUNTED property of a CcVobTag for automatic views can be provided in the context of a CcView. Hence, you would use this form of readProperties to obtain the list of vob tags mounted for the specified view context.

    Parameters:
    context - An optional proxy (often CcView) providing context for the generation of certain properties in the returned report. May be null.
    feedback - Provides optional feedback to the caller for a list of properties desired from the client. If the parameter is null or empty, a request is still made, and the returned proxy will have only the properties always requested from the client.
    Returns:
    A proxy containing the properties retrieved from the client (and error messages for those that could not be retrieved). The class of the returned proxy is the one most suited to the type of resource addressed.
    Throws:
    WvcmException - if failures occur
    See Also:
    readProperties(Feedback)

    resolve

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

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

    writeProperties

    Resource writeProperties(Feedback feedback)
                             throws WvcmException
    Persists property changes to this CcResource locally if they can be persisted locally. An exception is thrown if any of properties cannot be written. If an exception is thrown, the properties that were set will not be written can be determined from Resource.updatedPropertyNameList() on this CcResource. Note that since writeProperties returns a new proxy whose properties are specified in the feedback argument, writeProperties is semantically identical to readProperties(javax.wvcm.Feedback).

    Parameters:
    feedback - Specifies optional feedback to the caller.
    Returns:
    a new proxy for this resource, whose properties are specified by feedback.
    Throws:
    WvcmException
    See Also:
    Resource.doWriteProperties(Feedback)

    writeProperties

    Resource writeProperties(Resource context,
                             Feedback feedback)
                             throws WvcmException
    Persists property changes to this CcResource locally if they can be persisted locally. An exception is thrown if any of properties cannot be written. If an exception is thrown, the properties that were set will not be written can be determined from Resource.updatedPropertyNameList() on this CcResource. Note that since writeProperties returns a new proxy whose properties are specified in the feedback argument, writeProperties is semantically identical to readProperties(javax.wvcm.Feedback). Properties are computed within the context of a given resource context. For example, when working with automatic views, the CcVobTag.IS_MOUNTED property of a CcVobTag resource can only be modified in the context of a CcView. Hence, you would use this form of writeProperties to specify the view context that should be used.

    Parameters:
    context - An optional proxy (often CcView) providing context for the writing of certain properties. May be null.
    feedback - Specifies optional feedback to the caller.
    Returns:
    a new proxy for this resource, whose properties are specified by feedback.
    Throws:
    WvcmException

    Generated Wed 13-Apr-2016 10:51 PM

    Copyright © IBM 2016. All rights reserved.