|
Project: stp | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Folder
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.
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 from 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. |
Field Detail |
---|
static final PropertyNameList.PropertyName<ResourceList<Resource>> CHILD_LIST
CHILD_MAP
.
This may be a more efficient way of accessing the list
of children when their binding names are not required.
static final PropertyNameList.PropertyName<Map<String,Resource>> CHILD_MAP
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:
segment
does not need to
equal member.location().lastSegment()
member.location().getParent()
does not need to equal foo.location()
foo.location().child(binding)
must be a valid location for the bound resource, it does not
need to equal member.location()
CHILD_MAP
may be more efficient than doReadMemberList(boolean, javax.wvcm.Feedback)
.
Method Detail |
---|
Folder doBindChild(String bindingName, Resource resource, Folder.BindFlag[] flags, Feedback feedback) throws WvcmException
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:
bindingName
in the folder
identified by this Folder to the resource identified by resource
.
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.
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.
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 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.
ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback)
for additional reason codes.ResourceList.ResponseIterator<Resource> doReadMemberList(boolean deep, Feedback feedback) throws WvcmException
Postconditions:
Folder.location().child("foo")
.
deep
- whether to retrieve properties for
all members of this Folder.feedback
- the properties to be retrieved.
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.
WvcmException
Folder doRebindAll(String bindingName, Resource source, Folder.RebindFlag[] flags, Feedback feedback) throws WvcmException
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.
WvcmException
doRebindChild(java.lang.String, javax.wvcm.Folder, java.lang.String, javax.wvcm.Folder.RebindFlag[], javax.wvcm.Feedback)
Folder doRebindChild(String bindingName, Folder sourceFolder, String sourceBindingName, Folder.RebindFlag[] flags, Feedback feedback) throws WvcmException
sourceBindingName
from 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:
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.
bindingName
to the rebound resource.
The Resource.PARENT_LIST
of the rebound resource
contains a reference to the folder identified by this Folder.
ControllableResource.WORKSPACE
property of the rebound resource
MUST have been updated to have the same value as
the Workspace of this Folder.
ControllableResource.WORKSPACE
property MUST have been updated
to refer to the new location of that workspace.
Activity.ACTIVITY_CHECKOUT_LIST
property MUST be updated
to refer to the new location of that resource.
ControllableResource.ACTIVITY
,
Version.ACTIVITY
, or Workspace.CURRENT_ACTIVITY
MUST be updated to refer to the new location of that activity.
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.
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.
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.
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.
ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback)
for additional reason codes.Folder doUnbindChild(String bindingName, Feedback feedback) throws WvcmException
Postconditions:
ControllableResource.ACTIVITY
, Version.ACTIVITY
, or
Workspace.CURRENT_ACTIVITY
MUST be removed.
ControllableResource.PREDECESSOR_LIST
or
Version.PREDECESSOR_LIST
by a copy of the Version.PREDECESSOR_LIST
of
the unbound version.
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.
ControllableResource.MERGE_LIST
or
ControllableResource.AUTO_MERGE_LIST
property MUST be removed.
Activity.CURRENT_WORKSPACE_LIST
MUST be removed.
bindingName
is version-controlled, and if this folder was a checked-in version-controlled folder
the request MAY have automatically checked out this folder.
feedback
- Specifies optional feedback to the caller.
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.
ControllableResource.doCheckin(javax.wvcm.ControllableResource.CheckinFlag[], javax.wvcm.Feedback)
for additional reason codes.ResourceList<Resource> getChildList() throws WvcmException
CHILD_LIST
property.
CHILD_LIST
property.
WvcmException
- if this Folder was not created with
CHILD_LIST
as a wanted property.Map<String,Resource> getChildMap() throws WvcmException
CHILD_MAP
property.
CHILD_MAP
property.
WvcmException
- if this Folder was not created with
CHILD_MAP
as a wanted property.
|
Generated Thu 2-Aug-2012 03:10 AM | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |