@Manager public class DefaultWorkObjectManager extends Object implements WorkObjectManager
Manages operations on WorkObjects
| 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)
WorkObjectManagerFind the work object by ambiguousId
getWorkObject in interface WorkObjectManagerworkObjectAmbiguousId - 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)
WorkObjectManagerFinds work objects of the given type according to the query with offset and limit
findWorkObjects in interface WorkObjectManagertype - 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)
WorkObjectManagerFinds child work objects of the given parent id and given type according to the query with offset and limit
findWorkObjectChildren in interface WorkObjectManagerparentId - 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)
WorkObjectManagerGets the work form of the work object by model global id or work object id
getWorkObjectWorkForm in interface WorkObjectManagerworkObjectAmbiguousId - model global id or work object idlocale - the locale to be used for translationpublic WorkObject createWorkObject(String typeParam, ValueMap workObjectData)
WorkObjectManagerCreates work object
createWorkObject in interface WorkObjectManagertypeParam - work object typeworkObjectData - work object data templatepublic WorkObject updateWorkObject(String type, String workObjectId, ValueMap workObjectData)
WorkObjectManagerUpdates given values on the work object instance
updateWorkObject in interface WorkObjectManagertype - work object type to updateworkObjectId - work object IdworkObjectData - work object values to updatepublic void deleteWorkObject(String type, String workObjectId)
WorkObjectManagerDelete given work object
deleteWorkObject in interface WorkObjectManagertype - work object type to deleteworkObjectId - work object identifierCopyright © 2010 - 2019 edorasware ag. All Rights Reserved.