public class CreateExternalLinkFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.CreateExternalLinkFragmentImpl implements ShareModuleFragment
This fragment is intended to be combined into an EditModuleCommand
instance.
Below is a snippet illustrating how to use this fragment (see CommandRunner
for a full snippet):
ObjectRef object = ObjectRef.absoluteNumber(1); String name = "Link to SODIUS web site"; String description = "My Description"; ExternalLinkDirectionKind direction = ExternalLinkDirectionKind.OUTWARD_LITERAL; ExternalLinkOperationKind operation = ExternalLinkOperationKind.OPEN_AS_URL_LITERAL; String linkPath = "http://www.sodius.com"; ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditModuleCommand command = new EditModuleCommand(module, TerminationMode.SAVE_AND_CLOSE); command.add(new CreateExternalLinkFragment(object, name, description, direction, operation, linkPath)); myCommandRunner.run(command);
This class is not intended to be subclassed by clients but may be instantiated.
CommandRunner
,
EditModuleCommand
Constructor and Description |
---|
CreateExternalLinkFragment(ObjectRef object,
String name,
String description,
ExternalLinkDirectionKind direction,
ExternalLinkOperationKind operation,
String linkPath)
Instantiates a fragment to create a new external link on a DOORS object.
|
public CreateExternalLinkFragment(ObjectRef object, String name, String description, ExternalLinkDirectionKind direction, ExternalLinkOperationKind operation, String linkPath)
object
- the object on which the external link must be added.name
- the name of the link to create.description
- the description of the link to createdirection
- determines whether this is an outgoing link
(OUTWARD_LITERAL
) or incoming link (INWARD_LITERAL
).operation
- determine the behavior of the link when activated on DOORS client
(NONE
or OPEN_AS_URL_LITERAL
).linkPath
- the target of the link, usually a URL or a path in a file system.