public class CreateDiscussionFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.CreateDiscussionFragmentImpl 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):
String summary = "My Summary" String firstComment = "My Initial Comment"; ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditDiscussionCommand command = new EditDiscussionCommand(module); command.add(new CreateDiscussionFragment(summary, firstComment)); myCommandRunner.run(command);
This class is not intended to be subclassed by clients but may be instantiated.
CommandRunner
,
EditDiscussionCommand
,
CreateCommentFragment
Constructor and Description |
---|
CreateDiscussionFragment(ObjectRef object,
String summary,
String text)
Instantiates a fragment to create a new discussion on the specified object.
|
CreateDiscussionFragment(String summary,
String text)
Instantiates a fragment to create a new discussion on the edited formal module.
|
public CreateDiscussionFragment(String summary, String text)
summary
- the summary of the discussion. If empty, the text of the first comment is used as summary.text
- the text of the first comment to add in the discussion.public CreateDiscussionFragment(ObjectRef object, String summary, String text)
object
- the object on which the discussion must be added.summary
- the summary of the discussion. If empty, the text of the first comment is used as summary.text
- the text of the first comment to add in the discussion.