@Manager public class DefaultWorkObjectManager extends Object implements WorkObjectManager
Manages operations on WorkObject
s
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_QUERY |
Constructor and Description |
---|
DefaultWorkObjectManager(SearchQueryParser searchQueryParser,
WorkObjectService workObjectService,
ModelManager modelManager,
AmbiguousIdHelper ambiguousIdHelper,
EntityTemplateManager entityTemplateManager,
FormDefinitionManager formDefinitionManager,
CurrentUserService currentUserService,
Optional<List<WorkObjectDecorator>> optionalWorkObjectDecorators) |
Modifier and Type | Method and Description |
---|---|
WorkObject |
createWorkObject(String typeParam,
ValueMap workObjectData)
Creates work object
|
void |
deleteWorkObject(String type,
String workObjectId)
Delete given work object
|
QueryResponse |
findWorkObjectChildren(String parentId,
String type,
String query,
Integer offset,
Integer limit,
ViewFilter view,
Collection<String> fields)
Finds child work objects of the given parent id and given type according to the query with offset and limit
|
QueryResponse |
findWorkObjects(String type,
String query,
Integer offset,
Integer limit,
ViewFilter view,
Collection<String> fields)
Finds work objects of the given type according to the query with offset and limit
|
ValueMap |
getWorkObject(String workObjectAmbiguousId,
ViewFilter view,
Collection<String> fields,
String... expectedTypes)
Find the work object by ambiguousId
|
Map<String,Object> |
getWorkObjectWorkForm(String workObjectAmbiguousId,
Locale locale)
Gets the work form of the work object by model global id or work object id
|
WorkObject |
updateWorkObject(String type,
String workObjectId,
ValueMap workObjectData)
Updates given values on the work object instance
|
public static final String DEFAULT_QUERY
public DefaultWorkObjectManager(SearchQueryParser searchQueryParser, WorkObjectService workObjectService, ModelManager modelManager, AmbiguousIdHelper ambiguousIdHelper, EntityTemplateManager entityTemplateManager, FormDefinitionManager formDefinitionManager, CurrentUserService currentUserService, Optional<List<WorkObjectDecorator>> optionalWorkObjectDecorators)
public ValueMap getWorkObject(String workObjectAmbiguousId, ViewFilter view, Collection<String> fields, String... expectedTypes)
WorkObjectManager
Find the work object by ambiguousId
getWorkObject
in interface WorkObjectManager
workObjectAmbiguousId
- work object ambiguousIdview
- view to apply to the responsefields
- fields to add to the responseexpectedTypes
- types which the returned workObject is expected of. In the case of empty collection any type is acceptablepublic QueryResponse findWorkObjects(String type, String query, Integer offset, Integer limit, ViewFilter view, Collection<String> fields)
WorkObjectManager
Finds work objects of the given type according to the query with offset and limit
findWorkObjects
in interface WorkObjectManager
type
- work object type to search forquery
- query to performoffset
- the start of the rows to fetchlimit
- the size of fetched dataview
- view to apply to the responsefields
- fields to add to the responsepublic QueryResponse findWorkObjectChildren(String parentId, String type, String query, Integer offset, Integer limit, ViewFilter view, Collection<String> fields)
WorkObjectManager
Finds child work objects of the given parent id and given type according to the query with offset and limit
findWorkObjectChildren
in interface WorkObjectManager
parentId
- parent work object idtype
- work object type to search forquery
- query to performoffset
- the start of the rows to fetchlimit
- the size of fetched dataview
- view to apply to the responsefields
- fields to add to the responsepublic Map<String,Object> getWorkObjectWorkForm(String workObjectAmbiguousId, Locale locale)
WorkObjectManager
Gets the work form of the work object by model global id or work object id
getWorkObjectWorkForm
in interface WorkObjectManager
workObjectAmbiguousId
- model global id or work object idlocale
- the locale to be used for translationpublic WorkObject createWorkObject(String typeParam, ValueMap workObjectData)
WorkObjectManager
Creates work object
createWorkObject
in interface WorkObjectManager
typeParam
- work object typeworkObjectData
- work object data templatepublic WorkObject updateWorkObject(String type, String workObjectId, ValueMap workObjectData)
WorkObjectManager
Updates given values on the work object instance
updateWorkObject
in interface WorkObjectManager
type
- work object type to updateworkObjectId
- work object IdworkObjectData
- work object values to updatepublic void deleteWorkObject(String type, String workObjectId)
WorkObjectManager
Delete given work object
deleteWorkObject
in interface WorkObjectManager
type
- work object type to deleteworkObjectId
- work object identifierCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.