Class ItemDefinitionRecordEngine
- java.lang.Object
-
- org.kie.workbench.common.dmn.client.editors.types.persistence.ItemDefinitionRecordEngine
-
- All Implemented Interfaces:
RecordEngine<DataType>,DataTypeRecordEngine
@ApplicationScoped public class ItemDefinitionRecordEngine extends Object implements DataTypeRecordEngine
-
-
Constructor Summary
Constructors Constructor Description ItemDefinitionRecordEngine(ItemDefinitionStore itemDefinitionStore, ItemDefinitionDestroyHandler itemDefinitionDestroyHandler, ItemDefinitionUpdateHandler itemDefinitionUpdateHandler, ItemDefinitionCreateHandler itemDefinitionCreateHandler, DataTypeDestroyHandler dataTypeDestroyHandler, DataTypeUpdateHandler dataTypeUpdateHandler, DataTypeCreateHandler dataTypeCreateHandler, DataTypeNameValidator dataTypeNameValidator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DataType>create(DataType dataType)Create a record.List<DataType>create(DataType record, DataType reference, CreationType creationType)Create record by usingCreationTypestrategy.List<DataType>destroy(DataType dataType)Destroys a recordList<DataType>destroyWithoutDependentTypes(DataType dataType)Destroy record, but keep all references nested to the reference.voiddoDestroy(DataType dataType)voiddoUpdate(DataType dataType, org.kie.workbench.common.dmn.api.definition.model.ItemDefinition itemDefinition)voidinit()booleanisValid(DataType dataType)Check if a record is valid.List<DataType>update(DataType dataType)Updates a record
-
-
-
Constructor Detail
-
ItemDefinitionRecordEngine
@Inject public ItemDefinitionRecordEngine(ItemDefinitionStore itemDefinitionStore, ItemDefinitionDestroyHandler itemDefinitionDestroyHandler, ItemDefinitionUpdateHandler itemDefinitionUpdateHandler, ItemDefinitionCreateHandler itemDefinitionCreateHandler, DataTypeDestroyHandler dataTypeDestroyHandler, DataTypeUpdateHandler dataTypeUpdateHandler, DataTypeCreateHandler dataTypeCreateHandler, DataTypeNameValidator dataTypeNameValidator)
-
-
Method Detail
-
init
@PostConstruct public void init()
-
update
public List<DataType> update(DataType dataType)
Description copied from interface:RecordEngineUpdates a record- Specified by:
updatein interfaceRecordEngine<DataType>- Returns:
- returning a list of all affected records by the update operation.
-
destroy
public List<DataType> destroy(DataType dataType)
Description copied from interface:RecordEngineDestroys a record- Specified by:
destroyin interfaceRecordEngine<DataType>- Returns:
- returning a list of all affected records by the destroy operation.
-
destroyWithoutDependentTypes
public List<DataType> destroyWithoutDependentTypes(DataType dataType)
Description copied from interface:DataTypeRecordEngineDestroy record, but keep all references nested to the reference.- Specified by:
destroyWithoutDependentTypesin interfaceDataTypeRecordEngine- Parameters:
dataType- represents the destroyedDataType- Returns:
- a list of all affected records by the destroy operation.
-
create
public List<DataType> create(DataType dataType)
Description copied from interface:RecordEngineCreate a record.- Specified by:
createin interfaceRecordEngine<DataType>- Returns:
- returning a list of all affected records by the create operation.
-
create
public List<DataType> create(DataType record, DataType reference, CreationType creationType)
Description copied from interface:DataTypeRecordEngineCreate record by usingCreationTypestrategy. The new record can be created above, below, or even nested to the reference.- Specified by:
createin interfaceDataTypeRecordEngine- Parameters:
record- represents the newDataTypereference- represents the referenceDataTypeused by the 'creationType'creationType- represents the strategy for creating a new type.- Returns:
- a list of all affected records by the create operation.
-
isValid
public boolean isValid(DataType dataType)
Description copied from interface:RecordEngineCheck if a record is valid.- Specified by:
isValidin interfaceRecordEngine<DataType>
-
doUpdate
public void doUpdate(DataType dataType, org.kie.workbench.common.dmn.api.definition.model.ItemDefinition itemDefinition)
-
doDestroy
public void doDestroy(DataType dataType)
-
-