Project: stp

javax.wvcm
Interface Folder

All Superinterfaces:
Resource
All Known Subinterfaces:
CcComponent, CcDirectory, CcDirectoryElement, CcDirectoryVersion, CcElement, CcSymlink, CcView, Component, ControllableFolder, ControllableSymbolicLink, CqAttachmentFolder, CqQueryFolder, FolderVersion, VersionHistory, Workspace

public interface Folder
extends Resource

A proxy for a folder resource. A folder resource is a resource that contains a set of named mappings to other resources, called the "bound members" of that folder. The "members" of a folder are the folder itself and all members of the bound members of the folder. The semantics of a folder is similar to those of a Windows folder, a Unix directory, or a WebDAV collection.

Since:
1.0

Nested Class Summary
static class Folder.BindFlag
          Boolean flags for the doBind method
static class Folder.RebindFlag
          Boolean flags for the doRebind method
 
Nested classes/interfaces inherited from interface javax.wvcm.Resource
Resource.CopyFlag
 
Field Summary
static PropertyNameList.PropertyName<ResourceList<Resource>> CHILD_LIST
          The list of resources bound to this folder as immediate children.
static PropertyNameList.PropertyName<Map<String,Resource>> CHILD_MAP
          The map of (name, resource) pairs identifying the resources bound to this folder as immediate children and the names by which they are known in this folder.
 
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
 Folder doBindChild(String bindingName, Resource resource, Folder.BindFlag[] flags, Feedback feedback)
          Creates a binding named bindingName in the folder identified by this Folder to the resource identified by resource.
 ResourceList.ResponseIterator<Resource> doReadMemberList(boolean deep, Feedback feedback)
          Get the contents of a folder.
 Folder doRebindAll(String bindingName, Resource source, Folder.RebindFlag[] flags, Feedback feedback)
          Removes all binding to the resource identified by source and adds the binding named bindingName to that resource in the folder identified by this Folder.
 Folder doRebindChild(String bindingName, Folder sourceFolder, String sourceBindingName, Folder.RebindFlag[] flags, Feedback feedback)
          Removes the binding named sourceBindingName to a resource in the folder identified by sourceFolder and adds the binding named bindingName to that resource in the folder identified by this Folder.
 Folder doUnbindChild(String bindingName, Feedback feedback)
          Removes the binding named bindingName from the folder identified by this Folder.
 ResourceList<Resource> getChildList()
          Get the CHILD_LIST property.
 Map<String,Resource> getChildMap()
          Get the CHILD_MAP property.
 
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

CHILD_LIST

static final PropertyNameList.PropertyName<ResourceList<Resource>> CHILD_LIST
The list of resources bound to this folder as immediate children. This list contains the same resources as the values of CHILD_MAP. This may be a more efficient way of accessing the list of children when their binding names are not required.


CHILD_MAP

static final PropertyNameList.PropertyName<Map<String,Resource>> CHILD_MAP
The map of (name, resource) pairs identifying the resources bound to this folder as immediate children and the names by which they are known in this folder. A map entry's key is the binding name (String) and its value is the bound member (Resource). Unlike the locations returned by doReadMemberList(boolean, javax.wvcm.Feedback), the locations of the child resources in the CHILD_MAP do not need to be simple extensions of the location of this folder. Thus, if segment is a binding name key from the CHILD_MAP property of Folder foo, and member is a Resource value for that key: Since the locations are less constrained, computation of CHILD_MAP may be more efficient than doReadMemberList(boolean, javax.wvcm.Feedback).

Method Detail

doBindChild

Folder doBindChild(String bindingName,
                   Resource resource,
                   Folder.BindFlag[] flags,
                   Feedback feedback)
                   throws WvcmException
Creates a binding named bindingName in the folder identified by this Folder to the resource identified by resource. The content and location-independent properties of the resource are not modified by this request.

Postconditions:

  • (preserve-properties): The property values of the resource identified by this Resource MUST NOT have been modified by this request unless this specification states otherwise.
  • (new-binding): There MUST be a binding named bindingName in the folder identified by this Folder to the resource identified by resource.
  • (auto-checkout-parent): If resource identifies a controlled resource, and if this Folder identifies a checked-in controlled folder, this folder MAY have been checked-out by this request.

    Parameters:
    bindingName - the name of the new binding in this Folder to the resource identified by resource.
    resource - the resource being bound.
    flags - Array of boolean flags (may be null):
  • Folder.BindFlag.OVERWRITE: Indicates whether an existing binding in this folder will be overwritten rather than the request failing.
  • Folder.BindFlag.AUTO_UNBIND: Indicates whether the resource will be unbound from its original folder rather than the request failing because multiple bindings to the same resource are not supported.
    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.NOT_FOUND: There must be a binding named bindingName in this Folder, and the folder identified by sourceFolder must exist.
  • WvcmException.ReasonCode.METHOD_NOT_SUPPORTED: If the resource identified by resource does not support multiple bindings to it, and Folder.BindFlag.AUTO_UNBIND is not specified, the request MUST fail.
  • WvcmException.ReasonCode.NO_CROSS_SERVER_BINDING: If the resource identified by resource is on another server from the folder identified by this Folder, and the server for this Folder does not support cross-server bindings, the request MUST fail.
  • WvcmException.ReasonCode.CANNOT_OVERWRITE: If there already is a binding named in the folder identified by this Folder, and overwrite is false, the request MUST fail.
  • WvcmException.ReasonCode.CYCLE_NOT_ALLOWED: If the server does not support cycles in the location namespace, and if resource identifies a folder, and if the folder identified by this Folder is a member of that folder, then 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.

  • doReadMemberList

    ResourceList.ResponseIterator<Resource> doReadMemberList(boolean deep,
                                                             Feedback feedback)
                                                             throws WvcmException
    Get the contents of a folder.

    Postconditions:

  • (read-bound-members): The result contains a proxy for each bound member of the folder. The Location of the bound member whose binding name is "foo" must be Folder.location().child("foo").
  • (read-all-members): If deep is true, the result contains a proxy for every member of the folder identified by this Folder.

    Parameters:
    deep - whether to retrieve properties for all members of this Folder.
    feedback - the properties to be retrieved.
    Returns:
    an iterator of Resource objects that contain properties of the resources that are bound members of this Folder. If deep is true, then all members of the folder (including this Folder) are included.
    Throws:
    WvcmException

  • doRebindAll

    Folder doRebindAll(String bindingName,
                       Resource source,
                       Folder.RebindFlag[] flags,
                       Feedback feedback)
                       throws WvcmException
    Removes all binding to the resource identified by source and adds the binding named bindingName to that resource in the folder identified by this Folder. The content and properties of the rebound resource are not modified by this request, except for the properties that are location dependent.

    Throws:
    WvcmException
    See Also:
    doRebindChild(java.lang.String, javax.wvcm.Folder, java.lang.String, javax.wvcm.Folder.RebindFlag[], javax.wvcm.Feedback)

    doRebindChild

    Folder doRebindChild(String bindingName,
                         Folder sourceFolder,
                         String sourceBindingName,
                         Folder.RebindFlag[] flags,
                         Feedback feedback)
                         throws WvcmException
    Removes the binding named sourceBindingName to a resource in the folder identified by sourceFolder and adds the binding named bindingName to that resource in the folder identified by this Folder. The content and properties of the rebound resource are not modified by this request, except for the properties that are location dependent.

    Postconditions:

  • (removed-from-source-parent): The binding named sourceBindingName is removed from the folder identified by sourceFolder. If this was the only binding to this resource in the source folder, the Resource.PARENT_LIST of this resource no longer contains a reference to the source folder.
  • (added-to-destination-parent): The folder identified by the this Folder is modified to have a binding named bindingName to the rebound resource. The Resource.PARENT_LIST of the rebound resource contains a reference to the folder identified by this Folder.
  • (preserve-properties): The property values of the rebound resource MUST NOT have been modified by the request unless this specification states otherwise.
  • (workspace-member-moved): If the rebound resource did not identify a workspace, the ControllableResource.WORKSPACE property of the rebound resource MUST have been updated to have the same value as the Workspace of this Folder.
  • (workspace-moved): If the rebound resource was a workspace, any reference to that workspace in a ControllableResource.WORKSPACE property MUST have been updated to refer to the new location of that workspace.
  • (update-checked-out-reference): If a checked-out resource is rebound, any reference to that resource in an Activity.ACTIVITY_CHECKOUT_LIST property MUST be updated to refer to the new location of that resource.
  • (update-workspace-reference): If the rebound resource was a workspace, any reference to that workspace in a CurrentWorkspaceList property MUST be updated to refer to the new location of that workspace.
  • (update-activity-reference): If the rebound resource was an activity, any reference to that activity in an ControllableResource.ACTIVITY, Version.ACTIVITY, or Workspace.CURRENT_ACTIVITY MUST be updated to refer to the new location of that activity.
  • (auto-checkout-destination-parent): If the resource identified by sourceBindingName in sourceFolder is a version-controlled resource, and if this folder was a checked-in folder the request MUST have automatically checked out this folder.
  • (auto-checkout-source-parent): If the resource identified by sourceBindingName in sourceFolder is a version-controlled resource, and if the sourceFolder was a checked-in folder, the request MUST have automatically checked out the source folder.

    Parameters:
    bindingName - the new binding name of the resource being rebound.
    sourceFolder - the previous parent folder of the rebound resource.
    sourceBindingName - the original binding name of the rebound resource in the source folder.
    flags - Array of boolean flags (may be null):
  • Folder.RebindFlag.OVERWRITE: Indicates whether an existing binding in this folder 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.BAD_ARGUMENT_TYPE: The resource identified by the sourceFolder argument must be a folder.
  • WvcmException.ReasonCode.CANNOT_OVERWRITE: If there already is a binding named bindingName in this Folder, and overwrite is false, the request MUST fail.
  • WvcmException.ReasonCode.METHOD_NOT_SUPPORTED: The folder does not support rebinding children.
  • 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.

  • doUnbindChild

    Folder doUnbindChild(String bindingName,
                         Feedback feedback)
                         throws WvcmException
    Removes the binding named bindingName from the folder identified by this Folder. The removal of the binding only guarantees that the resource is no longer accessible via this binding; it does not affect its accessibility via other bindings. If a folder is unbound, no resource is accessible at any location that has the location of the unbound folder as its prefix.

    Postconditions:

  • (resource-unbound): There is no resource at the location identified by this bindingName.
  • (unbind-activity-reference): If an activity is unbound and has no more bindings to it, any reference to that activity in an ControllableResource.ACTIVITY, Version.ACTIVITY, or Workspace.CURRENT_ACTIVITY MUST be removed.
  • (update-predecessor-list): If a version was unbound and has no more bindings to it, the server MUST have replaced any reference to that version in a ControllableResource.PREDECESSOR_LIST or Version.PREDECESSOR_LIST by a copy of the Version.PREDECESSOR_LIST of the unbound version.
  • (version-history-has-root): If the request unbound the root version of a version history and that version has no more bindings to it, the request MUST have updated the VersionHistory.ROOT_VERSION of the version history to refer to another version that is an ancestor of all other remaining versions in that version history. A result of this postcondition is that every version history will have at least one version, and the only way to delete all versions is to unbind the version history resource.
  • (delete-version-reference): If a version is unbound and has no more bindings to it, any reference to that version in a ControllableResource.MERGE_LIST or ControllableResource.AUTO_MERGE_LIST property MUST be removed.
  • (delete-version-set): If the request unbound a version history and has no more bindings to it, the request MUST have unbound all versions in the VersionList of that version history, and MUST have satisfied the postconditions for version deletion.
  • (unbind-workspace-reference): If a workspace is unbound and has no more bindings to it, any reference to that workspace in an activity's Activity.CURRENT_WORKSPACE_LIST MUST be removed.
  • (auto-checkout-parent): If the resource identified by bindingName is version-controlled, and if this folder was a checked-in version-controlled folder the request MAY have automatically checked out this 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.NOT_FOUND: There must be a binding named bindingName in this Folder.
  • WvcmException.ReasonCode.METHOD_NOT_SUPPORTED: A server MAY fail an attempt to unbind a version history or 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.

  • getChildList

    ResourceList<Resource> getChildList()
                                        throws WvcmException
    Get the CHILD_LIST property.

    Returns:
    CHILD_LIST property.
    Throws:
    WvcmException - if this Folder was not created with CHILD_LIST as a wanted property.

    getChildMap

    Map<String,Resource> getChildMap()
                                     throws WvcmException
    Get the CHILD_MAP property.

    Returns:
    CHILD_MAP property.
    Throws:
    WvcmException - if this Folder was not created with CHILD_MAP as a wanted property.

    Generated Wed 18-May-2011 12:24 PM

    Copyright © IBM 2011. All rights reserved.