Project: stp

javax.wvcm
Interface Resource

All Known Subinterfaces:
Activity, Baseline, CcActivity, CcAttributeType, CcBaseline, CcBranch, CcBranchType, CcComponent, CcDirectory, CcDirectoryElement, CcDirectoryVersion, CcElement, CcElementType, CcFile, CcHyperlink, CcHyperlinkType, CcLabelType, CcProject, CcProjectFolder, CcRegistryRegion, CcReplica, CcResource, CcStorageLocation, CcStream, CcSymlink, CcTask, CcTriggerType, CcTypeBase, CcVersion, CcView, CcViewTag, CcVob, CcVobResource, CcVobTag, Component, Configuration, ControllableFolder, ControllableResource, ControllableSymbolicLink, CqAction, CqAttachment, CqAttachmentFolder, CqContextResource, CqDb, CqDbSet, CqDynamicChoiceList, CqFieldDefinition, CqGroup, CqHook, CqQuery, CqQueryFolder, CqQueryFolderItem, CqRecord, CqRecordType, CqReplica, CqReport, CqReportFormat, CqResource, CqUser, CqUserDb, CqUserDbMember, Folder, FolderVersion, StpAccessControlledResource, StpActivity, StpPrincipal, StpRepository, StpResource, Stream, SymbolicLinkVersion, Task, Version, VersionHistory, Workspace

public interface Resource

A proxy for a persistent resource. A proxy for a persistent resource is used to retrieve information from the resource and to perform operations on the resource. A resource has both standard properties, which are named values whose semantics are specified by the API, as well as custom properties whose names are arbitrary strings selected by the client. A custom property has a namespace which allows different clients to use simple property names without conflicting with each other.

A proxy for a persistent resource contains the location of that persistent resource on the server that maintains that resource. A proxy can be created as the return value of a request to the server, in which case the proxy is initialized with a set of properties reflecting the state of the persistent resource at the time of the request (the list of wanted properties is specified as an argument to the request). Alternatively, a proxy can be created locally by a client (using the Provider interface), in which case it is initialized with an empty set of properties.

Two proxies are equal if they are known to identify the same resource, where the identity of a proxy is determined by its RESOURCE_IDENTIFIER property if it has one loaded, and if not, by its location().

Since:
1.0

Nested Class Summary
static class Resource.CopyFlag
          Boolean flags for the doCopy method
 
Field Summary
static PropertyNameList.PropertyName<Object> ALL_CUSTOM_PROPERTIES
          A generic PropertyName that selects all custom properties (i.e., properties with a non-null namespace) that are defined on the resource.
static PropertyNameList.PropertyName<String> COMMENT
          A brief comment about a resource that is suitable for presentation to a user.
static PropertyNameList.PropertyName<String> CONTENT_CHARACTER_SET
          The name of the character set of the resource content.
static PropertyNameList.PropertyName<String> CONTENT_IDENTIFIER
          An implementation-defined String identifying the value of the content of a resource.
static PropertyNameList.PropertyName<Locale> CONTENT_LANGUAGE
          The name of the natural language used in a resource content, represented by a Locale object, with country, language, and variant if appropriate.
static PropertyNameList.PropertyName<Long> CONTENT_LENGTH
          The size in bytes of the content of a resource.
static PropertyNameList.PropertyName<String> CONTENT_TYPE
          A MIME type string (see RFC 1590) indicating the media type of the resource content.
static PropertyNameList.PropertyName<Date> CREATION_DATE
          The date and time the resource was created.
static PropertyNameList.PropertyName<String> CREATOR_DISPLAY_NAME
          This property contains a description of the creator of the resource that is suitable for presentation to a user.
static PropertyNameList.PropertyName<String> DISPLAY_NAME
          Contains a description of the resource that is suitable for presentation to a user in a tree display.
static PropertyNameList.PropertyName<Boolean> IS_EXECUTABLE
          Whether the content is executable (i.e, can be run as a program).
static PropertyNameList.PropertyName<Date> LAST_MODIFIED
          The date and time the content of the resource was last modified.
static PropertyNameList.PropertyName<ResourceList<Folder>> PARENT_LIST
          The PARENT_LIST property enables clients to discover what folders contain a binding to this resource (that is, which folders have this resource as a bound member).
static PropertyNameList.PropertyName<Location> PATHNAME_LOCATION
          A location for this resource to which Location.parent() can be applied zero or more times to produce a location for a folder in either the WORKSPACE_FOLDER_LIST of this resource, or for a folder in the Workspace.ACTIVITY_FOLDER_LIST or Workspace.VERSION_HISTORY_FOLDER_LIST of some workspace that is a member of a folder in WORKSPACE_FOLDER_LIST.
static PropertyNameList.PropertyName<List<String>> PROVIDER_LIST
          A list of names of alternative providers for the persistent resource identified by this resource.
static PropertyNameList.PropertyName<String> RESOURCE_IDENTIFIER
          A resource identifier is an optional unique and immutable identifier for a resource.
static PropertyNameList.PropertyName<ResourceList<Folder>> WORKSPACE_FOLDER_LIST
          A list of folders that contain workspaces that are being managed by the same server that is managing this resource.
 
Method Summary
 Resource doCopy(Location destination, Resource.CopyFlag[] flags, Feedback feedback)
          Create a copy of the resource identified by this Resource at the location identified by the destination.
 Resource doFind(Feedback feedback)
          Find a persistent resource that "matches" this proxy.
<T extends Resource>
ResourceList.ResponseIterator<T>
doFindAll(Feedback feedback)
          Find all persistent resources that "match" this proxy.
 PropertyNameList doGetPropertyNameList(Feedback feedback)
          Get the names of standard properties available on the server resource identified by this Resource.
 PropertyNameList doGetPropertyNameList(String namespace, Feedback feedback)
          Get the names of properties in a given namespace available on the server resource identified by this Resource.
 Resource doReadContent(OutputStream content, Feedback feedback)
          Get both the content and selected properties of this resource.
 Resource doReadProperties(Feedback feedback)
          Get a set of properties of this Resource from the server.
 void doUnbindAll(Feedback feedback)
          Unbinds the resource identified by this Resource from all folders in its PARENT_LIST.
 Resource doWriteContent(InputStream content, String contentIdentifier, Feedback feedback)
          Persists content changes to a resource.
 Resource doWriteProperties(Feedback feedback)
          Persists property changes to this Resource.
 void forgetProperty(PropertyNameList.PropertyName<?> name)
          Removes the specified property of this Resource.
 String getComment()
          Get the COMMENT property.
 String getContentCharacterSet()
          Get the CONTENT_CHARACTER_SET property.
 String getContentIdentifier()
          Get the CONTENT_IDENTIFIER property.
 Locale getContentLanguage()
          Get the CONTENT_LANGUAGE property.
 long getContentLength()
          Get the CONTENT_LENGTH property.
 String getContentType()
          Get the CONTENT_TYPE property.
 Date getCreationDate()
          Get the CREATION_DATE property.
 String getCreatorDisplayName()
          Get the CREATOR_DISPLAY_NAME property.
 String getDisplayName()
          Get the DISPLAY_NAME property.
 Boolean getIsExecutable()
          Get the IS_EXECUTABLE property.
 Date getLastModified()
          Get the LAST_MODIFIED property.
 ResourceList<Folder> getParentList()
          Get the PARENT_LIST property.
 Location getPathnameLocation()
          Get the PATHNAME_LOCATION property.
<T> T
getProperty(PropertyNameList.PropertyName<T> name)
          Get the value of the specified property of this Resource.
 List<String> getProviderList()
          Get the PROVIDER_LIST property.
 String getResourceIdentifier()
          Get the RESOURCE_IDENTIFIER property.
 ResourceList<Folder> getWorkspaceFolderList()
          Get the WORKSPACE_FOLDER_LIST property.
<T> void
initProperty(PropertyNameList.PropertyName<T> name, T value)
          Initializes the value of the specified property of this Resource.
 Location location()
          Get the location of this resource.
 Object lookupProperty(PropertyNameList.PropertyName<?> name)
          Lookup the value of the specified property of this Resource.
 void modifyLocation(Location location)
          Modify the location of this resource.
 PropertyNameList propertyNameList()
          Get the names of properties available on this client proxy.
 Provider provider()
          Get the provider of this resource.
 void removeProperty(PropertyNameList.PropertyName<?> name)
          Removes the specified property of this Resource.
 void setComment(String comment)
          Set the COMMENT property.
 void setContentCharacterSet(String contentCharacterSet)
          Set the CONTENT_CHARACTER_SET property.
 void setContentLanguage(Locale contentLanguage)
          Set the CONTENT_LANGUAGE property.
 void setContentType(String contentType)
          Set the CONTENT_TYPE property.
 void setCreatorDisplayName(String val)
          Set the CREATOR_DISPLAY_NAME property.
 void setDisplayName(String val)
          Set the DISPLAY_NAME property.
 void setIsExecutable(Boolean isExecutable)
          Set the IS_EXECUTABLE property.
<T> void
setProperty(PropertyNameList.PropertyName<T> name, T value)
          Adds or replaces the value of the specified property of this Resource.
<V,U extends Collection<V>>
void
setProperty(PropertyNameList.PropertyName<U> name, U additions, U removals)
          Adds and removes the specified values from the current value of the specified list-valued property.
 PropertyNameList updatedPropertyNameList()
          Get a list of modified properties that have been updated in the proxy by setXyz operations, but not been successfully written to the corresponding persistent resource by a doXyz operation.
 

Field Detail

ALL_CUSTOM_PROPERTIES

static final PropertyNameList.PropertyName<Object> ALL_CUSTOM_PROPERTIES
A generic PropertyName that selects all custom properties (i.e., properties with a non-null namespace) that are defined on the resource.


COMMENT

static final PropertyNameList.PropertyName<String> COMMENT
A brief comment about a resource that is suitable for presentation to a user. The comment of a version can be used to indicate why that version was created.


CONTENT_CHARACTER_SET

static final PropertyNameList.PropertyName<String> CONTENT_CHARACTER_SET
The name of the character set of the resource content. Character sets names must be registered; see RFC 2278 and 1700


CONTENT_IDENTIFIER

static final PropertyNameList.PropertyName<String> CONTENT_IDENTIFIER
An implementation-defined String identifying the value of the content of a resource. The semantics of a Content Identifier are the same as that of an HTTP ETag (see RFC 2616).


CONTENT_LANGUAGE

static final PropertyNameList.PropertyName<Locale> CONTENT_LANGUAGE
The name of the natural language used in a resource content, represented by a Locale object, with country, language, and variant if appropriate.


CONTENT_LENGTH

static final PropertyNameList.PropertyName<Long> CONTENT_LENGTH
The size in bytes of the content of a resource.


CONTENT_TYPE

static final PropertyNameList.PropertyName<String> CONTENT_TYPE
A MIME type string (see RFC 1590) indicating the media type of the resource content.


CREATION_DATE

static final PropertyNameList.PropertyName<Date> CREATION_DATE
The date and time the resource was created.


CREATOR_DISPLAY_NAME

static final PropertyNameList.PropertyName<String> CREATOR_DISPLAY_NAME
This property contains a description of the creator of the resource that is suitable for presentation to a user. The CREATOR_DISPLAY_NAME of a version can be used to indicate who created that version. A server may automatically set the CREATOR_DISPLAY_NAME property and not allow it to be changed by a client.


DISPLAY_NAME

static final PropertyNameList.PropertyName<String> DISPLAY_NAME
Contains a description of the resource that is suitable for presentation to a user in a tree display.

Note that the DISPLAY_NAME of a resource is in general not the binding name of that resource in its parent folder, because at a given time, a resource can be bound into multiple parent folders, and have a different binding name in each parent folder.


IS_EXECUTABLE

static final PropertyNameList.PropertyName<Boolean> IS_EXECUTABLE
Whether the content is executable (i.e, can be run as a program).


LAST_MODIFIED

static final PropertyNameList.PropertyName<Date> LAST_MODIFIED
The date and time the content of the resource was last modified.


PARENT_LIST

static final PropertyNameList.PropertyName<ResourceList<Folder>> PARENT_LIST
The PARENT_LIST property enables clients to discover what folders contain a binding to this resource (that is, which folders have this resource as a bound member). The value of the PARENT_LIST property is a list of Folder objects.


PATHNAME_LOCATION

static final PropertyNameList.PropertyName<Location> PATHNAME_LOCATION
A location for this resource to which Location.parent() can be applied zero or more times to produce a location for a folder in either the WORKSPACE_FOLDER_LIST of this resource, or for a folder in the Workspace.ACTIVITY_FOLDER_LIST or Workspace.VERSION_HISTORY_FOLDER_LIST of some workspace that is a member of a folder in WORKSPACE_FOLDER_LIST.


PROVIDER_LIST

static final PropertyNameList.PropertyName<List<String>> PROVIDER_LIST
A list of names of alternative providers for the persistent resource identified by this resource. Provider names are class names, and Provider objects can be generated from provider names using ProviderFactory.createProvider(String,ProviderFactory.Callback). The preferred providers are specified earlier in the list.


RESOURCE_IDENTIFIER

static final PropertyNameList.PropertyName<String> RESOURCE_IDENTIFIER
A resource identifier is an optional unique and immutable identifier for a resource. The resource identifier may be used to test whether two proxies identify the same persistent resource. The resource identifier is the string form of a stable location for the resource, where a stable location is a location that is not affected by moves/renames by Folder.doRebindChild(java.lang.String, javax.wvcm.Folder, java.lang.String, javax.wvcm.Folder.RebindFlag[], javax.wvcm.Feedback) or by the addition/removal of additional locations for the resource by Folder.doBindChild(java.lang.String, javax.wvcm.Resource, javax.wvcm.Folder.BindFlag[], javax.wvcm.Feedback) and Folder.doUnbindChild(java.lang.String, javax.wvcm.Feedback).

If Provider.location(java.lang.String) can be applied to the resource identifier of a resource to produces a valid location, then that location MUST identify that resource.


WORKSPACE_FOLDER_LIST

static final PropertyNameList.PropertyName<ResourceList<Folder>> WORKSPACE_FOLDER_LIST
A list of folders that contain workspaces that are being managed by the same server that is managing this resource.

Method Detail

doCopy

Resource doCopy(Location destination,
                Resource.CopyFlag[] flags,
                Feedback feedback)
                throws WvcmException
Create a copy of the resource identified by this Resource at the location identified by the destination. The content of the copy is the same as the content of the resource identified by this Resource, but the properties of the copy are the default properties for a new resource.

Postconditions:

  • (must-not-copy-resource-identifier): The copy must be a different resource. In particular, it must have a different resource identifier.
  • (copy-creates-new-resource): If the source of a doCopy is a controlled resource or a version, and if there is no resource at the destination of the doCopy, then the doCopy creates a new uncontrolled resource at the destination of the doCopy.

    Parameters:
    destination - the location of the new resource created by doCopy.
    flags - Array of boolean flags (may be null):
  • Resource.CopyFlag.OVERWRITE: Indicates whether an existing destination resource will be overwritten rather than the request failing.
    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.CANNOT_OVERWRITE: If there already is a resource at the destination, and the overwrite is false, the request MUST fail.
  • WvcmException.ReasonCode.METHOD_NOT_SUPPORTED: This proxy MUST NOT identify a folder version or a version history. In order to create another version history whose versions have the same content, the appropriate sequence of doVersionControl, doCheckout, doWriteContent, and doCheckin requests must be made.

  • doFind

    Resource doFind(Feedback feedback)
                    throws WvcmException
    Find a persistent resource that "matches" this proxy. For example,
       Activity activityExample = WorkspaceProvider.activity(WorkspaceProvider.location("/my-act-repo")):
       activityExample.setCreatorDisplayName("Geoff Clemm");
       Activity activity = (Activity)activityExample.doFind(null);
     
    would return an activity in "/my-act-repo" created by "Geoff Clemm". Unlike most doXyz methods, this method does not save changes to the proxy before executing the query. In particular, it is valid to execute this method on a proxy that could not be saved by doWriteProperties(javax.wvcm.Feedback).

    The precise rules for matching are as follows:

  • A proxy Q matches a resource R if the type of Q "matches" the type of R, if the location of Q "matches" the location of R, and if for each loaded property P of the proxy Q, Q.P.value (the value of the property P of the proxy Q) "matches" R.P.value (the value of the property P of the resource R). Note that a property is loaded into a proxy as the result of reading properties values from the repository when creating the proxy (e.g., doReadProperties(javax.wvcm.Feedback)) or by explicitly setting property values (e.g., setComment(java.lang.String) or more generally, setProperty(javax.wvcm.PropertyNameList.PropertyName, T)).
  • The type of a proxy matches the type of a resource if the resource implements the result type of the method used to create the proxy. So for example, if the proxy was created by WorkspaceProvider.workspace(javax.wvcm.Location), to match that proxy a resource must implement the Workspace interface.
  • The location of a proxy Q matches the location of a resource R if the resource identified by the location of Q would be in the same "repository" as R. Note that whether or not a resource would be in the same repository as another resource is decided by the implementation of the doFind(javax.wvcm.Feedback) method.
  • If Q.P.value is not a list and R.P.value is a list, then Q.P.value matches R.P.value if Q.P.value matches at least one object in R.P.value.
  • If Q.P.value is a list of proxies, and R.P.value is not a list, then Q.P.value matches R.P.value if at least one proxy in Q.P.value matches R.P.value.
  • If Q.P.value is a list of proxies, and R.P.value is a list, then Q.P.value matches R.P.value if at least one proxy in Q.P.value matches at least one object in R.P.value.
  • If Q.P is Resource.PATHNAME_LOCATION, then Q matches R if R is the resource identified by Q.P.value.
  • Otherwise, Q.P.value matches R.P.value if Q.P.value Object.equals(java.lang.Object) R.P.value.

    Parameters:
    feedback - the properties to be available in the returned resources.
    Returns:
    a proxy for a persistent resource that matches this Resource. If none found, null is returned.
    Throws:
    WvcmException - if problems encountered communicating with server or if the request could not be executed.

  • doFindAll

    <T extends Resource> ResourceList.ResponseIterator<T> doFindAll(Feedback feedback)
                                                                throws WvcmException
    Find all persistent resources that "match" this proxy. For example,
       Activity activityExample = WorkspaceProvider.activity(WorkspaceProvider.location("/my-act-repo")):
       activityExample.setCreatorDisplayName("Geoff Clemm");
       ResponseIterator myActivities = activityExample.doFindAll(null);
     
    would return all activities in "/my-act-repo" created by "Geoff Clemm". See doFind(javax.wvcm.Feedback).

    Parameters:
    feedback - the properties to be available in the returned resources.
    Returns:
    proxies for persistent resources that that match this Resource.
    Throws:
    WvcmException - if problems encountered communicating with server or if the request could not be executed.

    doGetPropertyNameList

    PropertyNameList doGetPropertyNameList(Feedback feedback)
                                           throws WvcmException
    Get the names of standard properties available on the server resource identified by this Resource.

    Parameters:
    feedback - Provides optional feedback to the caller for long-running requests.
    Returns:
    the list of names of standard properties available on the server resource identified by this Resource.
    Throws:
    WvcmException - if problems encountered communicating with server

    doGetPropertyNameList

    PropertyNameList doGetPropertyNameList(String namespace,
                                           Feedback feedback)
                                           throws WvcmException
    Get the names of properties in a given namespace available on the server resource identified by this Resource.

    Parameters:
    namespace - the namespace for the requested property names.
    feedback - Provides optional feedback to the caller for long-running requests.
    Returns:
    the list of names of properties in the specified namespace available on the server resource identified by this Resource. If the namespace is null, the system property names are listed. If the namespace is not null, the user-defined properties in that namespace are listed.
    Throws:
    WvcmException - if problems encountered communicating with server

    doReadContent

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

    Parameters:
    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.

  • doReadProperties

    Resource doReadProperties(Feedback feedback)
                              throws WvcmException
    Get a set of properties of this Resource from the server. Like all doXyz methods, any modified properties in this Resource are first written to the resource before the properties are read from the resource. Note that this makes doReadProperties semantically identical to doWriteProperties(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 proxy for this resource containing the wanted properties. A requested property named XYZ can be retrieved from the resource with the getXyz method, when a getXyz method is defined in the interface.
    Throws:
    WvcmException - if problems encountered communicating with server or if modified properties cannot be written (see doWriteProperties(javax.wvcm.Feedback).

    doUnbindAll

    void doUnbindAll(Feedback feedback)
                     throws WvcmException
    Unbinds the resource identified by this Resource from all folders in its PARENT_LIST. See Folder.doUnbindChild(java.lang.String, javax.wvcm.Feedback).

    Throws:
    WvcmException

    doWriteContent

    Resource doWriteContent(InputStream content,
                            String contentIdentifier,
                            Feedback feedback)
                            throws WvcmException
    Persists content changes to a resource.

    Postconditions:

  • (auto-checkout-controlled-content): If this resource was a checked-in controlled, resource, this resource MUST have been checked out by this request.

    Parameters:
    content - if contentIdentifier matches the current content identifier of the persistent resource, the content of the resource is replaced with the bytes read from content, and content is then closed.

    contentIdentifier - if this content identifier does not match the content identifier of the persistent resource, the persistent resource is left unaltered, and a WvcmException is thrown.

    If reading from the stream throws a java.io.IOException, then no further data will be read from the stream, and after attempting to close the stream, a WvcmException wrapping the IOException is thrown, possibly leading to incomplete data being stored on the resource.

    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.CANNOT_MODIFY_VERSION: If this proxy identifies a version, the request MUST fail.
  • Since this method may cause a checkout to be attempted on this resource, see ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback) for additional reason codes.

  • doWriteProperties

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

    Postconditions:

  • (auto-checkout-controlled-property): If the property is controlled, and if this resource was a checked-in controlled, resource, this resource MUST have been checked out by this request.

    Parameters:
    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.PROPERTY_OVERWRITE_FORBIDDEN: This property has been updated by another client after this proxy was created.
  • WvcmException.ReasonCode.CANNOT_MODIFY_PROTECTED_PROPERTY: Some properties cannot be directly updated.
  • WvcmException.ReasonCode.CANNOT_MODIFY_VERSION: If this proxy identifies a version, the request MUST fail unless the property is explicitly defined to be modifiable on a version.
  • Since this method may cause a checkout to be attempted on this resource, see ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback) for additional reason codes.

  • forgetProperty

    void forgetProperty(PropertyNameList.PropertyName<?> name)
    Removes the specified property of this Resource. This is just a local change to this proxy, and is not persisted back to the resource identified by this Resource. This is commonly used to clear an updated property that caused doWriteProperties(javax.wvcm.Feedback) to fail.

    Parameters:
    name - the name of the property.

    getComment

    String getComment()
                      throws WvcmException
    Get the COMMENT property.

    Returns:
    the COMMENT property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with COMMENT as a wanted property.
    See Also:
    setComment(java.lang.String)

    getContentCharacterSet

    String getContentCharacterSet()
                                  throws WvcmException
    Get the CONTENT_CHARACTER_SET property.

    Returns:
    the CONTENT_CHARACTER_SET property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with CONTENT_CHARACTER_SET as a wanted property.
    See Also:
    setContentCharacterSet(java.lang.String)

    getContentIdentifier

    String getContentIdentifier()
                                throws WvcmException
    Get the CONTENT_IDENTIFIER property.

    Returns:
    the CONTENT_IDENTIFIER property.
    Throws:
    WvcmException - if this Resource was not created with CONTENT_IDENTIFIER as a wanted property.

    getContentLanguage

    Locale getContentLanguage()
                              throws WvcmException
    Get the CONTENT_LANGUAGE property.

    Returns:
    the CONTENT_LANGUAGE property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with CONTENT_LANGUAGE as a wanted property.
    See Also:
    setContentLanguage(java.util.Locale)

    getContentLength

    long getContentLength()
                          throws WvcmException
    Get the CONTENT_LENGTH property.

    Returns:
    the CONTENT_LENGTH property.
    Throws:
    WvcmException - if this Resource was not created with CONTENT_LENGTH as a wanted property.

    getContentType

    String getContentType()
                          throws WvcmException
    Get the CONTENT_TYPE property. A server may refuse to allow the CONTENT_TYPE of a resource to be changed after the resource has been created.

    Returns:
    the CONTENT_TYPE property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with CONTENT_TYPE as a wanted property.
    See Also:
    setContentType(java.lang.String)

    getCreationDate

    Date getCreationDate()
                         throws WvcmException
    Get the CREATION_DATE property.

    Returns:
    the CREATION_DATE property.
    Throws:
    WvcmException - if this Resource was not created with CREATION_DATE as a wanted property

    getCreatorDisplayName

    String getCreatorDisplayName()
                                 throws WvcmException
    Get the CREATOR_DISPLAY_NAME property.

    Returns:
    the CREATOR_DISPLAY_NAME property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with CREATOR_DISPLAY_NAME as a wanted property.
    See Also:
    setCreatorDisplayName(java.lang.String)

    getDisplayName

    String getDisplayName()
                          throws WvcmException
    Get the DISPLAY_NAME property.

    Returns:
    the DISPLAY_NAME property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with DISPLAY_NAME as a wanted property.
    See Also:
    setDisplayName(java.lang.String)

    getIsExecutable

    Boolean getIsExecutable()
                            throws WvcmException
    Get the IS_EXECUTABLE property.

    Returns:
    the IS_EXECUTABLE property.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with IS_EXECUTABLE as a wanted property.
    See Also:
    setIsExecutable(java.lang.Boolean)

    getLastModified

    Date getLastModified()
                         throws WvcmException
    Get the LAST_MODIFIED property.

    Returns:
    the LAST_MODIFIED property.
    Throws:
    WvcmException - if this Resource was not created with LAST_MODIFIED as a wanted property.

    getParentList

    ResourceList<Folder> getParentList()
                                       throws WvcmException
    Get the PARENT_LIST property.

    Returns:
    the PARENT_LIST property.
    Throws:
    WvcmException - if this Resource was not created with PARENT_LIST as a wanted property.

    getPathnameLocation

    Location getPathnameLocation()
                                 throws WvcmException
    Get the PATHNAME_LOCATION property.

    Returns:
    the PATHNAME_LOCATION property.
    Throws:
    WvcmException - if this Resource was not created with PATHNAME_LOCATION as a wanted property.

    getProperty

    <T> T getProperty(PropertyNameList.PropertyName<T> name)
                  throws WvcmException
    Get the value of the specified property of this Resource.

    Parameters:
    name - the name of the property.
    Returns:
    the value of the specified property of this Resource.
    Throws:
    WvcmException - if this property was not set and this Resource was not created with the specified property as a wanted property.
    See Also:
    setProperty(javax.wvcm.PropertyNameList.PropertyName, T)

    getProviderList

    List<String> getProviderList()
                                 throws WvcmException
    Get the PROVIDER_LIST property.

    Returns:
    the PROVIDER_LIST property.
    Throws:
    WvcmException - if this Resource was not created with PROVIDER_LIST as a wanted property.

    getResourceIdentifier

    String getResourceIdentifier()
                                 throws WvcmException
    Get the RESOURCE_IDENTIFIER property.

    Returns:
    the RESOURCE_IDENTIFIER property.
    Throws:
    WvcmException - if this Resource was not created with RESOURCE_IDENTIFIER as a wanted property.

    getWorkspaceFolderList

    ResourceList<Folder> getWorkspaceFolderList()
                                                throws WvcmException
    Get the WORKSPACE_FOLDER_LIST property.

    Returns:
    the WORKSPACE_FOLDER_LIST property.
    Throws:
    WvcmException - if this Resource was not created with WORKSPACE_FOLDER_LIST as a wanted property.

    initProperty

    <T> void initProperty(PropertyNameList.PropertyName<T> name,
                          T value)
    Initializes the value of the specified property of this Resource. If that property of the Resource is non-null when it is written (e.g., by a doWriteProperties(javax.wvcm.Feedback) request), WvcmException with WvcmException.ReasonCode.CANNOT_OVERWRITE is thrown and the property of the Resource is not changed.

    Parameters:
    name - the name of the property.
    value - the value of the specified property.
    See Also:
    getProperty(javax.wvcm.PropertyNameList.PropertyName)

    location

    Location location()
    Get the location of this resource.

    The format of the location string is specific to the repository that stores the persistent resource. A URL, a UNC filename, and an NFS filename are examples of possible formats for a location string.

    Returns:
    the location of the persistent resource for which this Resource is a proxy.

    lookupProperty

    Object lookupProperty(PropertyNameList.PropertyName<?> name)
    Lookup the value of the specified property of this Resource.

    Parameters:
    name - the name of the property.
    Returns:
    the value of the specified property of this Resource, or a WvcmException if there was an error computing the property value or if this property was not set and this resource was not created with the specified property as a wanted property.
    See Also:
    getProperty(javax.wvcm.PropertyNameList.PropertyName)

    modifyLocation

    void modifyLocation(Location location)
    Modify the location of this resource. This does not affect the value of any property of this proxy.


    propertyNameList

    PropertyNameList propertyNameList()
    Get the names of properties available on this client proxy. A property is available if it would not throw an exception if retrieved from this proxy. One difference between this and wantedPropertyRequestList is that ALL_CUSTOM_PROPERTIES would appear in wantedPropertyRequestList, but the actual property names would appear in propertyNameList. In addition, failing to retrieve a property would cause a property to not appear in propertyNameList, setting a property would add that property to propertyNameList, and forgetting or removing a property would remove that property from propertyNameList.

    Returns:
    the list of names of properties available on this client proxy.

    provider

    Provider provider()
    Get the provider of this resource.

    Returns:
    the Provider for this Resource.

    removeProperty

    void removeProperty(PropertyNameList.PropertyName<?> name)
    Removes the specified property of this Resource. The next doXyz() request will cause the server to remove this property from the resource on the server identified by this Resource.

    Parameters:
    name - the name of the property.

    setComment

    void setComment(String comment)
    Set the COMMENT property.

    Parameters:
    comment - the new comment to apply to this Resource.
    See Also:
    getComment()

    setContentCharacterSet

    void setContentCharacterSet(String contentCharacterSet)
    Set the CONTENT_CHARACTER_SET property.

    Parameters:
    contentCharacterSet - the content character set for the resource.
    See Also:
    getContentCharacterSet()

    setContentLanguage

    void setContentLanguage(Locale contentLanguage)
    Set the CONTENT_LANGUAGE property.

    Parameters:
    contentLanguage - the content language for the resource.
    See Also:
    getContentLanguage()

    setContentType

    void setContentType(String contentType)
    Set the CONTENT_TYPE property.

    Parameters:
    contentType - the content type for the resource.
    See Also:
    getContentType()

    setCreatorDisplayName

    void setCreatorDisplayName(String val)
    Set the CREATOR_DISPLAY_NAME property.

    Parameters:
    val - the new creator display name to apply to the resource.
    See Also:
    getCreatorDisplayName()

    setDisplayName

    void setDisplayName(String val)
    Set the DISPLAY_NAME property.

    Parameters:
    val - the new display name to apply to the resource.
    See Also:
    getDisplayName()

    setIsExecutable

    void setIsExecutable(Boolean isExecutable)
    Set the IS_EXECUTABLE property.

    Parameters:
    isExecutable - whether the resource is executable.
    See Also:
    getIsExecutable()

    setProperty

    <T> void setProperty(PropertyNameList.PropertyName<T> name,
                         T value)
    Adds or replaces the value of the specified property of this Resource.

    Parameters:
    name - the name of the property.
    value - the new value of the specified property.
    See Also:
    getProperty(javax.wvcm.PropertyNameList.PropertyName)

    setProperty

    <V,U extends Collection<V>> void setProperty(PropertyNameList.PropertyName<U> name,
                                                 U additions,
                                                 U removals)
    Adds and removes the specified values from the current value of the specified list-valued property.

    Parameters:
    name - the name of the property.
    additions - the values to be added to the value of the specified property value.
    removals - the values to be removed from the value of the specified property.
    See Also:
    setProperty(javax.wvcm.PropertyNameList.PropertyName, T)

    updatedPropertyNameList

    PropertyNameList updatedPropertyNameList()
    Get a list of modified properties that have been updated in the proxy by setXyz operations, but not been successfully written to the corresponding persistent resource by a doXyz operation.

    Returns:
    the names of properties that have been updated in the proxy, but the updates have not yet been successfully applied to the resource.

    Generated Wed 19-Nov-2014 10:09 AM

    Copyright © IBM 2014. All rights reserved.