public abstract class FolderRef extends Object
Creating a reference instance does not execute anything on the DOORS client, it is just a way to get a pointer to an element on which commands are executed. The reference is only resolved to the actual element by the time the command is executed and may result in an element not being found.
Instances of FolderRef
created with the qualifiedName
or name
allow the use of the
CreateFolderCommand
command, as the reference contains the information necessary to create the folder.
Below is a snippet illustrating how to use a folder reference (see CommandRunner
for a full snippet):
FolderRef folder = FolderRef.qualifiedName("/MyNewFolder"); CreateFolderCommand command = new CreateFolderCommand(folder); myCommandRunner.run(command);
CommandRunner
,
CreateFolderCommand
Constructor and Description |
---|
FolderRef() |
Modifier and Type | Method and Description |
---|---|
static FolderRef |
name(FolderRef parentFolder,
String name)
Returns a reference to a folder based on its parent folder and its name.
|
static FolderRef |
qualifiedName(String qualifiedName)
Returns a reference to a folder based on its qualified name.
|
abstract ItemRef |
toItem()
Converts this folder reference to an item reference.
|
static FolderRef |
uniqueID(String uniqueID)
Returns a reference to a folder based on its DOORS unique ID.
|
static FolderRef |
url(String url)
Returns a reference to a folder based on its DOORS URL.
|
public static FolderRef qualifiedName(String qualifiedName)
Note that in case the folder is actually a DOORS project, its qualified name is the name of the project prefixed by a '/'
character (e.g. "/MyProject"
).
qualifiedName
- the qualified name of the folder.public static FolderRef name(FolderRef parentFolder, String name)
parentFolder
- a reference to the containing folder.name
- the name of the folder.public static FolderRef url(String url)
url
- the DOORS URL of the folder.public static FolderRef uniqueID(String uniqueID)
uniqueID
- the DOORS unique ID of the folder.public abstract ItemRef toItem()
DeleteItemCommand
, can be executed on both modules and folders
and therefore require a item reference.DeleteItemCommand
,
PurgeItemCommand