Project: stp

javax.wvcm
Interface ControllableResource

All Superinterfaces:
Resource
All Known Subinterfaces:
CcDirectory, CcFile, CcSymlink, CcView, Configuration, ControllableFolder, ControllableSymbolicLink, Workspace

public interface ControllableResource
extends Resource

A proxy for a controllable resource. A controllable resource is always the member of a special type of controllable folder called a "workspace". A controllable resource is either a version-controllable resource, a baseline-controllable resource, or both.

A version-controlled resource is a resource that is under control of a Checkout/Checkin protocol. The controlled state (content, controlled properties, and bindings to version-controlled members) of a version-controlled resource cannot be modified by a client unless that version-controlled resource is checked out.

When a version-controlled resource is checked in, a new version of that resource is created. The controlled state of the version-controlled resource is captured immutably in the new version.

The persistent state for a version-controlled resource may be stored on the client, on the server, or both. Storing the state on the server allows it to be shared by multiple clients. Storing the state on the client provides access to that state even when the client is disconnected from the server, and often provides more efficient access to that state. Note that the choice of what part of the state of a version-controlled resource is stored on the client is completely up to the implementation. In particular, although most implementations will cache some state on the client, an implementation may chose to store no local state.

Since:
1.0

Nested Class Summary
static class ControllableResource.CheckinFlag
          Boolean flags for the doCheckin method
static class ControllableResource.CheckoutFlag
          Boolean flags for the doCheckout method
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.CopyFlag
 
Field Summary
static PropertyNameList.PropertyName<Activity> ACTIVITY
          If the controllable resource is checked-out, this identifies the activity that will become the Version.ACTIVITY of the version created when the controllable resource is checked in; otherwise, this is null.
static PropertyNameList.PropertyName<ResourceList<Version>> AUTO_MERGE_LIST
          A list of Version objects that identify each version whose controlled state has been merged by the server into this checked-out ControllableResource.
static PropertyNameList.PropertyName<Version> CHECKED_IN
          The checked-in Version of this version-controlled resource.
static PropertyNameList.PropertyName<Version> CHECKED_OUT
          The checked-out version of a version-controlled resource.
static PropertyNameList.PropertyName<Configuration> CONFIGURATION
          The configuration to which this resource belongs.
static PropertyNameList.PropertyName<Boolean> IS_CHECKED_OUT
          true if the resource is checked out, false otherwise.
static PropertyNameList.PropertyName<Boolean> IS_VERSION_CONTROLLABLE
          A boolean value indicating whether this resource can be placed under version-control.
static PropertyNameList.PropertyName<Boolean> IS_VERSION_CONTROLLED
          true if the resource is version-controlled, false otherwise.
static PropertyNameList.PropertyName<ResourceList<Version>> MERGE_LIST
          A list of Version objects that identify the versions whose content and controlled properties must be merged by the client into this checked-out ControllableResource.
static PropertyNameList.PropertyName<ResourceList<Version>> PREDECESSOR_LIST
          If this ControllableResource is checked-out, this is a list of the versions that will become the predecessors of the version created when this ControllableResource is checked in; otherwise, this is null.
static PropertyNameList.PropertyName<Boolean> RESERVED
          A Boolean that indicates whether the checked-out version of this checked-out version-controlled resource can concurrently be checked-out to the same activity in another version-controlled resource.
static PropertyNameList.PropertyName<VersionHistory> VERSION_HISTORY
          The version history of a version-controlled resource.
static PropertyNameList.PropertyName<Workspace> WORKSPACE
          The workspace of which this ControllableResource is a member.
 
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
 ControllableResource doAddLabel(String label, Feedback feedback)
          Add the specified label to the checked-in version of this controllable resource.
 ControllableResource doCheckin(ControllableResource.CheckinFlag[] flags, Feedback feedback)
          Changes the state of the resource identified by this ControllableResource to be checked-in, and synchronizes the persistent state of the resource to be that of the persistent state on the client.
 ControllableResource doCheckout(ControllableResource.CheckoutFlag[] flags, Feedback feedback)
          Checkout this ControllableResource so that its controlled state can be modified.
 ControllableResource doCreateResource(Feedback feedback)
          Create a new persistent resource at the location identified by this ControllableResource.
 ControllableResource doCreateVersionControlledResource(Version version, Feedback feedback)
          Create a new version-controlled resource at the location identified by the proxy.
 Version doReadLabelledVersionProperties(String label, Feedback feedback)
          Apply Resource.doReadProperties(javax.wvcm.Feedback) to the version selected by label from the version history of this ControllableResource.
 ControllableResource doRemoveLabel(String label, Feedback feedback)
          Remove the specified lable from the CHECKED_IN version of this controllable resource.
 ControllableResource doSetLabel(String label, Feedback feedback)
          Set the specified label on the checked-in version of this controllable resource.
 ControllableResource doUncheckout(Feedback feedback)
          Cancels the checkout of a version-controlled resource, and restores its controlled state to the state of its CHECKED_OUT version.
 ControllableResource doVersionControl(Feedback feedback)
          Place this resource under version-control.
 Activity getActivity()
          Get the ACTIVITY property.
 ResourceList<Version> getAutoMergeList()
          Get the AUTO_MERGE_LIST property.
 Version getCheckedIn()
          Get the CHECKED_IN property.
 Version getCheckedOut()
          Get the CHECKED_OUT property.
 Configuration getConfiguration()
          Get the CONFIGURATION property.
 boolean getIsCheckedOut()
          Get the IS_CHECKED_OUT property.
 boolean getIsVersionControllable()
          Get the IS_VERSION_CONTROLLABLE property.
 boolean getIsVersionControlled()
          Get the IS_VERSION_CONTROLLED property.
 ResourceList<Version> getMergeList()
          Get the MERGE_LIST property.
 ResourceList<Version> getPredecessorList()
          Get the PREDECESSOR_LIST property.
 boolean getReserved()
          Get the RESERVED property.
 VersionHistory getVersionHistory()
          Get the VERSION_HISTORY property.
 Workspace getWorkspace()
          Get the WORKSPACE property.
 void setActivity(Activity activity)
          Set the ACTIVITY property.
 void setAutoMergeList(ResourceList<Version> versionList)
          Set the AUTO_MERGE_LIST property.
 void setMergeList(ResourceList<Version> versionList)
          Set the MERGE_LIST property.
 void setPredecessorList(ResourceList<Version> versionList)
          Set the PREDECESSOR_LIST property.
 void setReserved(boolean val)
          Set the RESERVED property.
 WorkspaceProvider workspaceProvider()
          Get the workspace provider of this resource.
 
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, getResourceIdentifier, getWorkspaceFolderList, initProperty, location, lookupProperty, modifyLocation, propertyNameList, provider, removeProperty, setComment, setContentCharacterSet, setContentLanguage, setContentType, setCreatorDisplayName, setDisplayName, setIsExecutable, setProperty, setProperty, updatedPropertyNameList
 

Field Detail

ACTIVITY

static final PropertyNameList.PropertyName<Activity> ACTIVITY
If the controllable resource is checked-out, this identifies the activity that will become the Version.ACTIVITY of the version created when the controllable resource is checked in; otherwise, this is null. If the controllable resource is not checked-out, an attempt to modify this property MUST fail. If the controllable resource is a Configuration, and the ACTIVITY is not null, the activity must be a Stream.

See Also:
setActivity(javax.wvcm.Activity), getActivity()

AUTO_MERGE_LIST

static final PropertyNameList.PropertyName<ResourceList<Version>> AUTO_MERGE_LIST
A list of Version objects that identify each version whose controlled state has been merged by the server into this checked-out ControllableResource.

When a server has the ability to automatically update the controlled state of the merge target to reflect the logical merge of the merge source, it may do so unless Workspace.MergeFlag.NO_AUTO_MERGE is specified in the Workspace.doMerge(javax.wvcm.ResourceList, javax.wvcm.Workspace.MergeFlag[], javax.wvcm.Feedback) request.

After a merge operation, the auto-merge list of each merge target contains a list of merge source versions whose controlled state was automatically merged into that merge target. Automatically merged source versions appear only in the auto-merge list, and not the merge list.

The client is responsible for deleting entries from the AUTO_MERGE_LIST and adding them to the PREDECESSOR_LIST after the user has verified that the automatic merge was performed correctly by the server.

See Also:
setAutoMergeList(javax.wvcm.ResourceList), getAutoMergeList()

CHECKED_IN

static final PropertyNameList.PropertyName<Version> CHECKED_IN
The checked-in Version of this version-controlled resource. If this ControllableResource is checked-in, this is the version whose content and controlled properties are identical to those of this ControllableResource; otherwise, this is null.


CHECKED_OUT

static final PropertyNameList.PropertyName<Version> CHECKED_OUT
The checked-out version of a version-controlled resource. if this ControllableResource is checked-out, this is the checked-in version at the time the checkout was performed; otherwise, this is null.


CONFIGURATION

static final PropertyNameList.PropertyName<Configuration> CONFIGURATION
The configuration to which this resource belongs.


IS_CHECKED_OUT

static final PropertyNameList.PropertyName<Boolean> IS_CHECKED_OUT
true if the resource is checked out, false otherwise.


IS_VERSION_CONTROLLABLE

static final PropertyNameList.PropertyName<Boolean> IS_VERSION_CONTROLLABLE
A boolean value indicating whether this resource can be placed under version-control.

See Also:
doVersionControl

IS_VERSION_CONTROLLED

static final PropertyNameList.PropertyName<Boolean> IS_VERSION_CONTROLLED
true if the resource is version-controlled, false otherwise.


MERGE_LIST

static final PropertyNameList.PropertyName<ResourceList<Version>> MERGE_LIST
A list of Version objects that identify the versions whose content and controlled properties must be merged by the client into this checked-out ControllableResource.

After a merge operation, the merge list of each merge target contains a list of merge source versions, indicating the versions whose content or controlled properties are yet to be merged. For each entry in the merge list, it is the client's responsibility to update the controlled state of the checked-out merge target so that it reflects the logical merge of the merge source into the current controlled state of the merge target. The client indicates that it has completed the update of the merge target by deleting the merge source from the merge list of the checked-out merge target, and adding it to the predecessor list.

As an error check for a client forgetting to complete a merge, the server MUST fail an attempt to doCheckin() a version-controlled resource with a non-empty merge list.

See Also:
setMergeList(javax.wvcm.ResourceList), getMergeList()

PREDECESSOR_LIST

static final PropertyNameList.PropertyName<ResourceList<Version>> PREDECESSOR_LIST
If this ControllableResource is checked-out, this is a list of the versions that will become the predecessors of the version created when this ControllableResource is checked in; otherwise, this is null.

See Also:
getPredecessorList(), setPredecessorList(javax.wvcm.ResourceList)

RESERVED

static final PropertyNameList.PropertyName<Boolean> RESERVED
A Boolean that indicates whether the checked-out version of this checked-out version-controlled resource can concurrently be checked-out to the same activity in another version-controlled resource.

In particular, this indicates whether the ACTIVITY of another checked-out resource associated with the version history of this version-controlled resource can have be the activity that is also identified by the ACTIVITY property of this checked-out resource. Since an activity must form a single line of descent through a given version history, a doCheckin may fail when a checkout is not reserved, because another version-controlled resource may have checked-in a parallel version into the activity. In this case, the user will first have to merge into this checked-out resource the latest version selected by that activity from that version history, and then modify the PREDECESSOR_LIST of this checked-out resource to identify that version.

See Also:
setReserved(boolean), getReserved()

VERSION_HISTORY

static final PropertyNameList.PropertyName<VersionHistory> VERSION_HISTORY
The version history of a version-controlled resource. This is the version history of the CHECKED_IN or CHECKED_OUT version.


WORKSPACE

static final PropertyNameList.PropertyName<Workspace> WORKSPACE
The workspace of which this ControllableResource is a member. By definition, the workspace property of a workspace identifies itself, and the workspace property of any other type of resource must identify the same workspace as its parent.

Method Detail

doAddLabel

ControllableResource doAddLabel(String label,
                                Feedback feedback)
                                throws WvcmException
Add the specified label to the checked-in version of this controllable resource.

Throws:
WvcmException
See Also:
Version.doAddLabel(java.lang.String, javax.wvcm.Feedback)

doCheckin

ControllableResource doCheckin(ControllableResource.CheckinFlag[] flags,
                               Feedback feedback)
                               throws WvcmException
Changes the state of the resource identified by this ControllableResource to be checked-in, and synchronizes the persistent state of the resource to be that of the persistent state on the client. The current content and controlled properties of the resource are captured in a new version resource at a server-defined location. A doCheckin request can be applied to a checked-out configuration to produce a new baseline whose Baseline.VERSION_LIST captures the current state of the version-controlled members of the Configuration.ROOT_FOLDER of the configuration.

Postconditions:

  • (uncheckout-identical): If the controlled state of this resource is the same as its CHECKED_OUT version, and if the PREDECESSOR_LIST only contains the CHECKED_OUT version, and if the flag ControllableResource.CheckinFlag.CHECKIN_IDENTICAL has not been passed in, an uncheckout on this resource will be automatically performed.
  • (complete-merge): If the MERGE_LIST or the AUTO_MERGE_LIST are non-empty, the versions within them are first moved to PREDECESSOR_LIST.
  • (create-version): The request MUST have created a new version in the version history of the CHECKED_OUT version. The request MUST have allocated a distinct new location for the new version, and that location MUST NOT ever identify any resource other than that version.
  • (initialize-version-content-and-properties): The content and controlled properties of the new version MUST be copied from the checked-out resource. The Version.VERSION_NAME of the new version MUST be set to a server-defined value distinct from all other Version.VERSION_NAME values of other versions in the same version history. The Resource.COMMENT and PREDECESSOR_LIST of the version-controlled resource MUST have been set to null after it was copied to the new version.
  • (checked-in): If keepCheckedOut is not specified in the request, the CHECKED_OUT property of the version-controlled resource MUST have been removed and a CHECKED_IN property that identifies the new version MUST have been added.
  • (keep-checked-out): If keepCheckedOut is specified in the request, the CHECKED_OUT property of the checked-out resource MUST have been updated to identify the new version.
  • (add-to-history): The new version resource MUST have been added as a new bound member of the version history of the CHECKED_OUT version.
  • (initialize-activity): The Version.ACTIVITY of the new version MUST have been initialized to be the same as the ACTIVITY of the checked-out resource. The ACTIVITY of the version-controlled resource MUST have been set to NULL after it was copied to the new version.
  • (initialize-folder-version-bindings): If this ControllableResource identifies a version-controlled folder, then for each version-controlled bound member of this ControllableResource, the new folder version MUST contain a bound member which is the version history of that version-controlled bound member, and whose binding name is the binding name of the version-controlled bound member.
  • (create-baseline-version-list): If this ControllableResource identifies a configuration, the Baseline.VERSION_LIST of the new baseline identifies a list of the CHECKED_IN versions of each version-controlled member of the Configuration.ROOT_FOLDER of the configuration at the time of the request.
  • (update-stream): The Stream.VERSION_LIST of the Workspace.STREAM is updated to contain the new version resource. If the Stream.VERSION_LIST had previously contained a different version from the version history of the new version, that different version is removed.

    Parameters:
    flags - Array of boolean flags (may be null):
  • ControllableResource.CheckinFlag.KEEP_CHECKED_OUT indicates whether to checkout the resource again immediately after checking it in. If true, the ACTIVITY and RESERVED properties should not be changed by the checkout.
  • ControllableResource.CheckinFlag.FORK_OK indicates whether to fork even if forking is discouraged.
  • ControllableResource.CheckinFlag.CHECKIN_IDENTICAL will force a checkin even if the controlled state is the same as its CHECKED_IN version. Otherwise, an uncheckout will be performed if the controlled state of this resource is the same as its CHECKED_IN version, and if the PREDECESSOR_LIST only contains the CHECKED_OUT version.
    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.MUST_BE_CHECKED_OUT: This ControllableResource MUST identify a resource whose IS_CHECKED_OUT property is true.
  • WvcmException.ReasonCode.VERSION_HISTORY_MUST_BE_A_TREE: The versions identified by the PREDECESSOR_LIST, MERGE_LIST and AUTO_MERGE_LIST of the checked-out resource MUST be descendants of the root version of the version history for the CHECKED_OUT version.
  • WvcmException.ReasonCode.CANNOT_FORK: A doCheckin request MUST fail if it would cause a version whose Version.CHECKIN_FORK is Version.Fork.FORBIDDEN to appear in the Version.PREDECESSOR_LIST of more than one version.
  • WvcmException.ReasonCode.CANNOT_CHECKIN_FORK_DISCOURAGED: A doCheckin request MUST fail if it would cause a version whose Version.CHECKIN_FORK is Version.Fork.DISCOURAGED to appear in the Version.PREDECESSOR_LIST of more than one version, unless forkOk is specified in the request.
  • WvcmException.ReasonCode.CANNOT_CREATE_BRANCH_IN_ACTIVITY: Any version which is in the version history of the checked-out resource and whose Version.ACTIVITY identifies the ACTIVITY of the checked-out resource MUST be an ancestor of the checked-out resource.
  • @WvcmException.ReasonCode.CANNOT_CHECKIN_TO_RESERVED_ACTIVITY If in another workspace there is a version-controlled resource whose CHECKED_OUT property identifies a version in the version history of this resource, then the RESERVED property of that version-controlled resource MUST be true.
  • WvcmException.ReasonCode.NO_CHECKED_OUT_BASELINE_CONTROLLED_FOLDER_MEMBERS: If this ControllableResource identifies a configuration, all version-controlled members of the Configuration.ROOT_FOLDER of the configuration MUST be checked-in.
  • WvcmException.ReasonCode.CANNOT_CREATE_BRANCH_IN_STREAM: If the Stream.VERSION_LIST of the Workspace.STREAM of this ControllableResource contains a version from the version history of this controllable resource, then the Stream.VERSION_LIST MUST contain one of the versions in the PREDECESSOR_LIST of this controllable resource.

  • doCheckout

    ControllableResource doCheckout(ControllableResource.CheckoutFlag[] flags,
                                    Feedback feedback)
                                    throws WvcmException
    Checkout this ControllableResource so that its controlled state can be modified.

    Postconditions:

  • (is-checked-out): The resource identified by this ControllableResource MUST have an IS_CHECKED_OUT property whose value is true.
  • (has-checked-out-version): The checked-out resource MUST have a CHECKED_OUT property that identifies the CHECKED_IN version preceding the checkout. The version-controlled resource MUST NOT have a CHECKED_IN property.
  • (initialize-predecessor-list): The PREDECESSOR_LIST property of the checked-out resource MUST be initialized to be the CHECKED_OUT version.
  • (initialize-activity): The ACTIVITY of the checked-out resource is set as follows: - If the resource is a configuration, then the activity is the Workspace.STREAM of the workspace (possibly null). - Otherwise, if the resource is not a configuration, the Workspace.CURRENT_ACTIVITY of the workspace is used. If the Workspace.CURRENT_ACTIVITY is null, the server MAY automatically set the Workspace.CURRENT_ACTIVITY to be a newly created activity.
  • (initialize-reserved): If reserved was specified in the request, then the RESERVED property of the checked-out resource MUST be true.

    Parameters:
    flags - Array of boolean flags (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 - ReasonCode:
  • WvcmException.ReasonCode.MUST_BE_CHECKED_IN: The IS_CHECKED_OUT property of this ControllableResource MUST be false.
  • WvcmException.ReasonCode.CANNOT_CHECKOUT_FORKING_IS_FORBIDDEN: If the Version.CHECKOUT_FORK property of the version being checked out is Version.Fork.FORBIDDEN, the request MUST fail if the checked-out version has a non-empty list of successors.
  • WvcmException.ReasonCode.CANNOT_CHECKOUT_FORKING_IS_DISCOURAGED: If the Version.CHECKOUT_FORK property of the version being checked out is Version.Fork.DISCOURAGED, the request MUST fail if the checked-out version has a non-empty list of successors unless forkOk is specified in the request.
  • WvcmException.ReasonCode.CANNOT_CHECKOUT_MULTI_CHECKOUT_IS_DISCOURAGED: If the Version.CHECKOUT_FORK property of the version being checked out is Version.Fork.DISCOURAGED, the request MUST fail if a checked-out resource identifies that version in its CHECKED_OUT property unless forkOk is specified in the request.
  • WvcmException.ReasonCode.CANNOT_CHECKOUT_MULTI_CHECKOUT_IS_FORBIDDEN: If the Version.CHECKOUT_FORK property of the version being checked out is Version.Fork.FORBIDDEN, the request MUST fail if a checked-out resource identifies that version in its CHECKED_OUT property.
  • WvcmException.ReasonCode.ONE_CHECKOUT_PER_ACTIVITY_PER_HISTORY: If there is a request activity set, and if Reserved is specified, an existing reserved checkout from a version of that version history MUST NOT select an activity in that activity set.
  • WvcmException.ReasonCode.CANNOT_CREATE_BRANCH_IN_ACTIVITY: If there is a request activity set, and if Reserved is specified, the selected version MUST be a descendant of all other versions of that version history that select that activity.
  • WvcmException.ReasonCode.CANNOT_CREATE_BRANCH_IN_STREAM: If the Workspace.STREAM property of the workspace of this controllable resource is non-null, one of the following MUST be true:
    - the Stream.VERSION_LIST of the stream contains no version from the version history of the CHECKED_IN version.
    - the Stream.VERSION_LIST of the stream contains the CHECKED_IN version,
    - the ControllableResource.CheckoutFlag.RESERVED was not specified in the flags argument.
  • WvcmException.ReasonCode.BAD_ARGUMENT_TYPE: If the controllable resource is a configuration, and there is a request activity set, the activity argument MUST identify a stream; otherwise, the activity MUST identify an activity.

  • doCreateResource

    ControllableResource doCreateResource(Feedback feedback)
                                          throws WvcmException
    Create a new persistent resource at the location identified by this ControllableResource. The request will fail if a resource already exists at that location.

    Postconditions:

  • (initialize-resource): A new resource of the specified type exists at the location of this Resource.

    Parameters:
    feedback - Specifies optional feedback to the caller.
    Returns:
    A proxy for this new resource, whose properties are specified by feedback.
    Throws:
    WvcmException - ReasonCode:
  • WvcmException.ReasonCode.RESOURCE_ALREADY_EXISTS_AT_LOCATION: A resource MUST NOT exist at the location of this Resource.
  • WvcmException.ReasonCode.CANNOT_CREATE_AT_THIS_LOCATION: The location of this Resource MUST identify a valid location to create this Resource. For a workspace, a client can determine locations where workspaces can be created from the Resource.WORKSPACE_FOLDER_LIST property.

  • doCreateVersionControlledResource

    ControllableResource doCreateVersionControlledResource(Version version,
                                                           Feedback feedback)
                                                           throws WvcmException
    Create a new version-controlled resource at the location identified by the proxy. The resource is associated with an existing version history, and if possible, is initialized with a specified version from that version history. If the specified version must be restored at a specific location, the new version-controlled resource is created at that specific location instead of the location of this ControllableResource. The request will fail if a resource already exists at that location.

    Postconditions:

  • (new-version-controlled-resource): A new version-controlled resource is created for the version history of the specified version. If possible, the initial CHECKED_IN property of the new version-controlled resource is set to be the specified version; if not, the version is implementation dependent. Otherwise, same semantics as the Workspace.doUpdate(javax.wvcm.ResourceList, javax.wvcm.Feedback).
  • (new-version-controlled-folder): Same semantics as the update of a folder target in Workspace.doUpdate(javax.wvcm.ResourceList, javax.wvcm.Feedback).
  • (auto-checkout-parent): If the parent of this ControllableResource was a checked-in version-controlled folder, the request MAY automatically check out the parent folder.

    Parameters:
    version - the version used to initialize the version-controlled resource.
    feedback - Specifies optional feedback to the caller.
    Returns:
    A proxy for this new resource, whose properties are specified by feedback.
    Throws:
    WvcmException - ReasonCode:
  • WvcmException.ReasonCode.BAD_ARGUMENT_TYPE: The resource identified by the version argument must be a version.
  • WvcmException.ReasonCode.CANNOT_CREATE_AT_THIS_LOCATION: The location for the new version-controlled resource is not a valid location for a version-controlled resource.
  • WvcmException.ReasonCode.RESOURCE_ALREADY_EXISTS_AT_LOCATION: The location for the new version-controlled resource MUST NOT identify an existing resource.
  • WvcmException.ReasonCode.ONE_CONTROLLED_RESOURCE_PER_HISTORY_PER_WORKSPACE: The workspace of this ControllableResource MUST NOT have a member whose VERSION_HISTORY property identifies the version history of the version specified in the request.

  • doReadLabelledVersionProperties

    Version doReadLabelledVersionProperties(String label,
                                            Feedback feedback)
                                            throws WvcmException
    Apply Resource.doReadProperties(javax.wvcm.Feedback) to the version selected by label from the version history of this ControllableResource.

    Parameters:
    label - the label identifying the version to be selected
    feedback - the list of properties that will be available on the returned version.
    Returns:
    a proxy for the selected version, with the wanted properties.
    Throws:
    WvcmException - ReasonCode:
  • WvcmException.ReasonCode.MUST_BE_CHECKED_IN: The CHECKED_IN property of this ControllableResource MUST identify a version.
  • WvcmException.ReasonCode.NOT_FOUND: The label was not found.

  • doRemoveLabel

    ControllableResource doRemoveLabel(String label,
                                       Feedback feedback)
                                       throws WvcmException
    Remove the specified lable from the CHECKED_IN version of this controllable resource.

    Throws:
    WvcmException
    See Also:
    Version.doRemoveLabel(java.lang.String, javax.wvcm.Feedback)

    doSetLabel

    ControllableResource doSetLabel(String label,
                                    Feedback feedback)
                                    throws WvcmException
    Set the specified label on the checked-in version of this controllable resource.

    Throws:
    WvcmException
    See Also:
    Version.doSetLabel(java.lang.String, javax.wvcm.Feedback)

    doUncheckout

    ControllableResource doUncheckout(Feedback feedback)
                                      throws WvcmException
    Cancels the checkout of a version-controlled resource, and restores its controlled state to the state of its CHECKED_OUT version.

    Postconditions:

  • (cancel-checked-out): The value of the CHECKED_IN property is that of the CHECKED_OUT property prior to the request, and the CHECKED_OUT property has been removed.
  • (restore-content): The controlled state of the version-controlled resource corresponds to that of its CHECKED_IN version.

    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.MUST_BE_CHECKED_OUT: This ControllableResource MUST identify a version-controlled resource with a CHECKED_OUT property.

  • doVersionControl

    ControllableResource doVersionControl(Feedback feedback)
                                          throws WvcmException
    Place this resource under version-control. When under version-control, the resource must be checked out to be modified and checked in to commit the modifications as a new version in the version history of the resource.

    Postconditions:

  • (put-under-version-control): If this ControllableResource identified a resource that was not under version-control at the time of the request, the request MUST have created a new version history and MUST have created a new version resource in that version history. The IS_VERSION_CONTROLLED property of this ControllableResource MUST be true. The IS_CHECKED_OUT property of this ControllableResource MUST be false. The resource MUST have a CHECKED_IN property that identifies the new version. The content and controlled properties of the new version MUST be the same as that of the resource. Note that an implementation can choose to locate the version history and version resources anywhere that it wishes. In particular, it could locate them on the same host and server as the version-controlled resource, on a different virtual host maintained by the same server, on the same host maintained by a different server, or on a different host maintained by a different server.
  • (must-not-change-existing-checked-in-out): If this ControllableResource identified a resource already under version-control at the time of the request, the request MUST NOT change the CHECKED_IN or CHECKED_OUT property of that version-controlled resource.
  • (new-version-history): If the request created a new version history, the request MUST have allocated a new server-defined location for that version history that MUST NOT have previously identified any other resource, and MUST NOT ever identify a resource other than this version history.
  • (update-stream): If the Workspace.STREAM property of the workspace of this controllable resource is non-null, the Stream.VERSION_LIST of the stream is updated to contain the new version resource.
  • (auto-checkout-parent): If the parent of this ControllableResource was a checked-in version-controlled folder and this ControllableResource is not already under version-control, the request MAY have checked out the parent folder.

    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.FORBIDDEN If the IS_VERSION_CONTROLLABLE property of this resource is false, the request MUST fail.

  • getActivity

    Activity getActivity()
                         throws WvcmException
    Get the ACTIVITY property.

    Returns:
    the ACTIVITY property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with ACTIVITY as a wanted property.
    See Also:
    setActivity(javax.wvcm.Activity)

    getAutoMergeList

    ResourceList<Version> getAutoMergeList()
                                           throws WvcmException
    Get the AUTO_MERGE_LIST property.

    Returns:
    the AUTO_MERGE_LIST property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with AUTO_MERGE_LIST as a wanted property.
    See Also:
    setAutoMergeList(javax.wvcm.ResourceList)

    getCheckedIn

    Version getCheckedIn()
                         throws WvcmException
    Get the CHECKED_IN property.

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

    getCheckedOut

    Version getCheckedOut()
                          throws WvcmException
    Get the CHECKED_OUT property.

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

    getConfiguration

    Configuration getConfiguration()
                                   throws WvcmException
    Get the CONFIGURATION property.

    Returns:
    the CONFIGURATION property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with CONFIGURATION as a wanted property.

    getIsCheckedOut

    boolean getIsCheckedOut()
                            throws WvcmException
    Get the IS_CHECKED_OUT property.

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

    getIsVersionControllable

    boolean getIsVersionControllable()
                                     throws WvcmException
    Get the IS_VERSION_CONTROLLABLE property.

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

    getIsVersionControlled

    boolean getIsVersionControlled()
                                   throws WvcmException
    Get the IS_VERSION_CONTROLLED property.

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

    getMergeList

    ResourceList<Version> getMergeList()
                                       throws WvcmException
    Get the MERGE_LIST property.

    Returns:
    the MERGE_LIST property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with MERGE_LIST as a wanted property.
    See Also:
    setMergeList(javax.wvcm.ResourceList)

    getPredecessorList

    ResourceList<Version> getPredecessorList()
                                             throws WvcmException
    Get the PREDECESSOR_LIST property.

    Returns:
    the PREDECESSOR_LIST property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with PREDECESSOR_LIST as a wanted property.
    See Also:
    setPredecessorList(javax.wvcm.ResourceList)

    getReserved

    boolean getReserved()
                        throws WvcmException
    Get the RESERVED property.

    Returns:
    the RESERVED property.
    Throws:
    WvcmException - if this property was not set and this ControllableResource was not created with RESERVED as a wanted property.
    See Also:
    setReserved(boolean)

    getVersionHistory

    VersionHistory getVersionHistory()
                                     throws WvcmException
    Get the VERSION_HISTORY property.

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

    getWorkspace

    Workspace getWorkspace()
                           throws WvcmException
    Get the WORKSPACE property.

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

    setActivity

    void setActivity(Activity activity)
    Set the ACTIVITY property.

    Parameters:
    activity - a list of Activity objects that identify the new value for the ACTIVITY property.
    See Also:
    getActivity()

    setAutoMergeList

    void setAutoMergeList(ResourceList<Version> versionList)
    Set the AUTO_MERGE_LIST property.

    Parameters:
    versionList - a list of Version objects that identify the new value for the AUTO_MERGE_LIST property.
    See Also:
    getAutoMergeList()

    setMergeList

    void setMergeList(ResourceList<Version> versionList)
    Set the MERGE_LIST property.

    Parameters:
    versionList - a list of Version objects that will be the value of the MERGE_LIST property.
    See Also:
    getMergeList()

    setPredecessorList

    void setPredecessorList(ResourceList<Version> versionList)
    Set the PREDECESSOR_LIST property.

    Parameters:
    versionList - a list of versions that will be the predecessors of the version created when this ControllableResource is checked in.
    See Also:
    getPredecessorList()

    setReserved

    void setReserved(boolean val)
    Set the RESERVED property.

    Parameters:
    val - the new value for the RESERVED property of this ControllableResource.
    See Also:
    getReserved()

    workspaceProvider

    WorkspaceProvider workspaceProvider()
    Get the workspace provider of this resource.

    Returns:
    the WorkspaceProvider for this Resource.

    Generated Fri 5-Nov-2010 03:50 AM

    Copyright © IBM 2010. All rights reserved.