public class CreateTypeFragment extends com.sodius.mdw.internal.metamodel.doors.io.commands.CreateTypeFragmentImpl implements EditModuleFragment
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); command.add(new CreateTypeFragment("myStringSubType", BaseTypeKind.STRING_LITERAL)); command.add(new CreateTypeFragment("myIntWithRange", 10, 22)); command.add(new CreateTypeFragment("myEnumeration", Arrays.asList("large", "small"))); myCommandRunner.run(command);
This class is not intended to be subclassed by clients but may be instantiated.
CommandRunner
,
EditModuleCommand
Constructor and Description |
---|
CreateTypeFragment(String name,
BaseTypeKind baseType)
Instantiates a fragment to create a new type in a DOORS module.
|
CreateTypeFragment(String name,
Date minValue,
Date maxValue)
Instantiates a fragment to create a new ranged Date type in a DOORS module.
|
CreateTypeFragment(String name,
float minValue,
float maxValue)
Instantiates a fragment to create a new ranged Real type in a DOORS module.
|
CreateTypeFragment(String name,
int minValue,
int maxValue)
Instantiates a fragment to create a new ranged Integer type in a DOORS module.
|
CreateTypeFragment(String name,
List<String> literals)
Instantiates a fragment to create a enumeration type in a DOORS module.
|
public CreateTypeFragment(String name, BaseTypeKind baseType)
name
- the name of the type to create.baseType
- the base typepublic CreateTypeFragment(String name, int minValue, int maxValue)
name
- the name of the type to create.minValue
- the type minimum allowed value.maxValue
- the type maximum allowed value.public CreateTypeFragment(String name, float minValue, float maxValue)
name
- the name of the type to create.minValue
- the type minimum allowed value.maxValue
- the type maximum allowed value.public CreateTypeFragment(String name, Date minValue, Date maxValue)
name
- the name of the type to create.minValue
- the type minimum allowed value.maxValue
- the type maximum allowed value.