public class DeletePictureFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.DeletePictureCommandImpl implements ShareModuleFragment
Once executed, the picture is removed but the object itself is left untouched. If the object itself needs to be deleted, a
SoftDeleteObjectFragment
fragment shall be used instead of this one.
If another picture is to be inserted to replace the existing one in the object, a ReplacePictureFragment
fragment should be used
instead.
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):
ModuleRef module = ModuleRef.qualifiedName("/MyFolder/MyModule"); EditModuleCommand command = new EditModuleCommand(module, TerminationMode.SAVE_AND_CLOSE); ObjectRef object = ObjectRef.absoluteNumber(5); command.add(new DeletePictureFragment(object)); myCommandRunner.run(command);
CommandRunner
,
EditModuleCommand
,
SoftDeleteObjectFragment
,
ReplacePictureFragment
Constructor and Description |
---|
DeletePictureFragment(ObjectRef object)
Instantiates a fragment to delete a picture contained in the specified object.
|
public DeletePictureFragment(ObjectRef object)
object
- the object which contains a picture to be deleted.