public class DefaultMaintenanceService extends Object implements MaintenanceService
This class provides the default maintenance functionality based on the maintenance persistence.
Constructor and Description |
---|
DefaultMaintenanceService(MaintenancePersistence maintenancePersistence) |
Modifier and Type | Method and Description |
---|---|
void |
deleteHiddenWorkObjectVariable(String workObjectId,
String variableId)
Deletes a hidden work object variable.
|
void |
deleteWorkObjectDefinition(String definitionId)
Deletes the work object definition with the given id.
|
void |
deleteWorkObjectDefinitionProperties(Collection<Property> properties)
Deletes all specified work object definition properties.
|
void |
deleteWorkObjectDefinitionsResourceString(Collection<String> workObjectDefinitionIds)
Set resource string in work object definition to null.
|
void |
insertWorkObjectDefinitionProperties(Collection<Property> properties)
Inserts all specified work object definition properties.
|
void |
updateDefinitionKey(String definitionId,
String newDefinitionKey)
Updates the definition key.
|
void |
updateDefinitionProperties(PropertyName<String> propertyName,
String oldValue,
String newValue)
Updates all definition properties with the given name and value.
|
void |
updateTypeOfAnyWorkObjects(Set<String> anyGearWorkObjectIds,
String newType)
Updates the Type of the work objects with the given WorkObjectIds with the given new type.
|
void |
updateWorkObjectDefinitionIdOnWorkObjects(Set<String> currentWorkObjectDefinitionIds,
String newWorkObjectDefinitionId)
Sets the specified new work object definition id on all work objects which point to one of the given current work object definition ids.
|
void |
updateWorkObjectGlobalId(String workObjectId,
String newGlobalId)
Sets the work object global id on a specific work object.
|
void |
updateWorkObjectVariables()
Updates all work object variables by reading them and writing them again.
|
public DefaultMaintenanceService(MaintenancePersistence maintenancePersistence)
public void updateWorkObjectGlobalId(String workObjectId, String newGlobalId)
MaintenanceService
Sets the work object global id on a specific work object.
updateWorkObjectGlobalId
in interface MaintenanceService
workObjectId
- the work object id of the work object to be updatednewGlobalId
- the new work object global idpublic void updateWorkObjectDefinitionIdOnWorkObjects(Set<String> currentWorkObjectDefinitionIds, String newWorkObjectDefinitionId)
MaintenanceService
Sets the specified new work object definition id on all work objects which point to one of the given current work object definition ids.
updateWorkObjectDefinitionIdOnWorkObjects
in interface MaintenanceService
currentWorkObjectDefinitionIds
- the work object definition ids of those work objects that need to be updatednewWorkObjectDefinitionId
- the new work object definition id to set on the matching work objectspublic void updateWorkObjectVariables()
MaintenanceService
Updates all work object variables by reading them and writing them again. This ensures that the latest variable converters are applied on the write-operation.
updateWorkObjectVariables
in interface MaintenanceService
public void deleteHiddenWorkObjectVariable(String workObjectId, String variableId)
MaintenanceService
Deletes a hidden work object variable.
deleteHiddenWorkObjectVariable
in interface MaintenanceService
public void updateTypeOfAnyWorkObjects(Set<String> anyGearWorkObjectIds, String newType)
MaintenanceService
Updates the Type of the work objects with the given WorkObjectIds with the given new type. This only works for AnyWorkObject
s.
updateTypeOfAnyWorkObjects
in interface MaintenanceService
anyGearWorkObjectIds
- the ids of the AnyWorkObject
s for which to change the typenewType
- the new work object typepublic void deleteWorkObjectDefinitionsResourceString(Collection<String> workObjectDefinitionIds)
MaintenanceService
Set resource string in work object definition to null.
deleteWorkObjectDefinitionsResourceString
in interface MaintenanceService
workObjectDefinitionIds
- the work object definitions to update resource string inpublic void insertWorkObjectDefinitionProperties(Collection<Property> properties)
MaintenanceService
Inserts all specified work object definition properties.
insertWorkObjectDefinitionProperties
in interface MaintenanceService
properties
- the properties to insertpublic void deleteWorkObjectDefinitionProperties(Collection<Property> properties)
MaintenanceService
Deletes all specified work object definition properties.
deleteWorkObjectDefinitionProperties
in interface MaintenanceService
properties
- the properties to deletepublic void deleteWorkObjectDefinition(String definitionId)
MaintenanceService
Deletes the work object definition with the given id. It first deletes the properties which have the given #definitionId
as parent and then removes the definition
itself.
deleteWorkObjectDefinition
in interface MaintenanceService
definitionId
- the id of the definition to deletepublic void updateDefinitionProperties(PropertyName<String> propertyName, String oldValue, String newValue)
MaintenanceService
Updates all definition properties with the given name and value.
updateDefinitionProperties
in interface MaintenanceService
propertyName
- the property name to be updatedoldValue
- the old property value to be replacednewValue
- the new property valuepublic void updateDefinitionKey(String definitionId, String newDefinitionKey)
MaintenanceService
Updates the definition key.
updateDefinitionKey
in interface MaintenanceService
definitionId
- the definition ID to be updatednewDefinitionKey
- the new definition keyCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.