Create Command

Creates a new data object and initializes all it's direct properties with the default values from the repository.

images/download/attachments/43417848/CreateCommand_create.png

Operators

Type Identifier

Allows Combination

Allows Multiple

Generic Operator Identifier

PropertyInitializer

no

yes

n/a

Initializes an item property for command usage. Typical usage is to manipulate/resolve the property value based on the actual item.
For example, the main supplier which has an artificial ID of -10 will be resolved by the actual main supplier of the item using this operator.
This operator should not modify the data object.

PropertyValidator

yes

yes

ppm.std.operator.propertyValidator

Validates a single item property. The generic default implementation validates for everything which is defined in the repository. Lengths, ranges, enumerations, lower- and upperbound etc.
Since multiple contributions on multiple levels might be available for the same property, implementors are not allowed to change the value of the item property during a validation.
Other validators would not be able to work correctly in case the value changes depending on the order of validators. If you need to modify the value, you can do this with the PropertyInitializer operator.

PropertyPreSetter

yes

yes

n/a

Called before an item property will be set. Modification of the property value or the data object are possible here.

PropertySetter

no

no

ppm.std.operator.propertySetter

Sets the value of an item property to the data object's corresponding attribute using generic eSet methods on the EMF data objects.

PropertyPostSetter

yes

yes

n/a

Called after an item property has been successfully set

EntityPostCreator

yes

yes

n/a

Is called after all properties have been set to the data object. Can be used to perform entity validations which need to have access to multiple property values.

Use Cases

The create command is used by the ImportCommand as well as the PutCommand. Please see the respective documentation of these command for details.

The desktop client calls the CreateCommand as soon as you click on the "add" button in a table view to create a new row.