public class CreateCommentFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.CreateCommentFragmentImpl implements ShareModuleFragment, EditDiscussionFragment
DOORS compatibility: Discussions are available starting with DOORS 9.0.
This fragment is intended to be combined into an EditDiscussionCommand
instance. Modifications made within this fragment are instantly
saved into DOORS client and cannot be reverted by aborting the command. The module must not have any unsaved changes in the DOORS client for this
fragment to succeed.
Below is a snippet illustrating how to use this fragment (see CommandRunner
for a full snippet):
DiscussionRef discussion = DiscussionRef.summaryAndCreator("My Existing Discussion", "myUser"); String text = "A new comment added to an existing discussion"; ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditDiscussionCommand command = new EditDiscussionCommand(module); command.add(new CreateCommentFragment(discussion, text)); myCommandRunner.run(command);
This class is not intended to be subclassed by clients but may be instantiated.
CommandRunner
,
EditDiscussionCommand
,
CreateDiscussionFragment
Constructor and Description |
---|
CreateCommentFragment(DiscussionRef discussion,
String text)
Instantiates a fragment to add a new comment in a discussion.
|
public CreateCommentFragment(DiscussionRef discussion, String text)
discussion
- the DOORS discussion on which the comment must be added.text
- the text of the comment to create.