Package de.espirit.firstspirit.access
Interface UserService
public interface UserService
A service providing user based access to a project's data.
- Since:
- 2.3
-
Method Summary
Modifier and TypeMethodDescriptionvoidClear all cached stores.voidClose a running task and remove all task attributes from the associated StoreElement.createTask(StoreElement storeElement, Workflow workflow, Task task) Clone a existing task on a StoreElement.createTask(StoreElement storeElement, Workflow workflow, String comment) Create task on StoreElement.createTask(StoreElement storeElement, Workflowable flowable, Workflow workflow, String comment) Create task on Workflowable.voidexportStoreElements(OutputStream out, StoreElement[] elements, @Nullable ExportHandler exportHandler) Exports the given store elements.Get the connection of this userservice.getConversionTable(String name) Get the conversation table by name.String[]Get the names of the conversation table.getDeletedElementInfos(long startRevisionId, int resultCount, Filter<ElementInfo> filter) Get a list of information objects for deleted elements matching the given filter.Returns the project this userservice belongs to.@Nullable UserServicegetRemoteUserService(String symbolicName) Connects the project defined in specifiedRemoteProjectConfigurationand returns it'sUserService.@Nullable RevisionGet the revision of this userservice.de.espirit.firstspirit.access.SecurityManagerGet the security manager belonging to this userservice.@NotNull StoregetStore(Store.Type storeType, boolean release) @NotNull StoregetStore(Store.Type storeType, boolean forceRefresh, boolean release) Returns the store with the given type belonging to this userservice.@Nullable TaskgetTask(long taskId) Returns the task specified by the given task id ornullif no task exists with the given id.Shortcut forgetStore(de.espirit.firstspirit.access.store.Store.Type, boolean)getStore(Store.Type.TEMPLATESTORE, false)}getUser()Shortcut forgetConnection().getUser()voidimportStoreElements(ZipFile exportFile, StoreElement parent, ImportHandler importHandler) Import of a file with store elements.voidSet the task.
-
Method Details
-
getStore
- Parameters:
storeType- store typerelease-falsefor current (work) ortruefor release state.- Returns:
- the requested store
- Since:
- 4.0.17
-
getStore
@NotNull @NotNull Store getStore(@NotNull Store.Type storeType, boolean forceRefresh, boolean release) Returns the store with the given type belonging to this userservice.- Parameters:
storeType- store typeforceRefresh- iftruethe server is queried for a new versionrelease-falsefor current (work) ortruefor release state.- Returns:
- the requested store
- Since:
- 4.0.17
-
getTemplateStore
TemplateStoreRoot getTemplateStore()Shortcut forgetStore(de.espirit.firstspirit.access.store.Store.Type, boolean)getStore(Store.Type.TEMPLATESTORE, false)}- Returns:
- the template store belonging to this userservice
- Since:
- 3.0.1
-
getProject
Project getProject()Returns the project this userservice belongs to.- Returns:
- the project of this userservice
- Since:
- 2.3
-
getUser
User getUser()Shortcut forgetConnection().getUser()- Returns:
- the user of the connection belonging to this userservice
- Since:
- 4.0.17
-
getSecurityManager
de.espirit.firstspirit.access.SecurityManager getSecurityManager()Get the security manager belonging to this userservice.- Returns:
- the security manager belonging to this userservice.
- Since:
- 2.3.10
-
createTask
Create task on StoreElement. Task attributes of the associated StoreElement will get updated and the StoreElement will get saved. Locking the StoreElement is recommended but not needed.- Parameters:
storeElement- The element to start the workflow onworkflow- The Workflow to startcomment- The workflow start transition comment- Returns:
- The new created task
- Since:
- 3.0.1
-
createTask
Task createTask(StoreElement storeElement, Workflowable flowable, Workflow workflow, String comment) Create task on Workflowable. Task attributes of the associated Workflowable will get updated.- Parameters:
storeElement- The context element. Used for calculating permissions.flowable- The Workflowable to start the workflow onworkflow- The Workflow to startcomment- The workflow start transition comment- Returns:
- The new created task
- Since:
- 3.0.135
-
createTask
Clone a existing task on a StoreElement. Task attributes of the associated StoreElement will get updated and the StoreElement will get saved. Locking the StoreElement is recommended but not needed.- Parameters:
storeElement- The element to start the workflow on.workflow- The Workflow to starttask- The source task.- Returns:
- The new created task
- Since:
- 3.0.6
-
closeTask
Close a running task and remove all task attributes from the associated StoreElement.- Parameters:
task- that shout be closed.- Since:
- 4.0.120
-
getTask
Returns the task specified by the given task id ornullif no task exists with the given id.- Parameters:
taskId- the id to get the task for- Returns:
- the task for the specified taskId or
null - Since:
- 4.0.120
-
setTask
Set the task.- Parameters:
task- set should be set.- Since:
- 3.0.1
-
exportStoreElements
void exportStoreElements(OutputStream out, StoreElement[] elements, @Nullable @Nullable ExportHandler exportHandler) throws IOException Exports the given store elements.- Parameters:
out- theOutputStreamwith the export information.elements- an array with theStoreElementto export.exportHandler- the ExportHandler- Throws:
IOException- Since:
- 3.0.7
-
importStoreElements
void importStoreElements(ZipFile exportFile, StoreElement parent, ImportHandler importHandler) throws IOException, ElementDeletedException, WorkflowLockException Import of a file with store elements.- Parameters:
exportFile- theZipFileto import.parent- the parent store element where the imported elements will be hooked in.importHandler- the importHandler- Throws:
IOExceptionElementDeletedExceptionWorkflowLockException- Since:
- 3.0.7
-
getDeletedElementInfos
List<DeletedElementsInfo> getDeletedElementInfos(long startRevisionId, int resultCount, Filter<ElementInfo> filter) Get a list of information objects for deleted elements matching the given filter.- Parameters:
startRevisionId- The ID of the revision to start taking into account.resultCount- The (maximum) number of results to collect.filter- The filter to be applied.- Returns:
- A list of
DeletedElementsInfos. - Since:
- 4.0.34
-
clearCache
void clearCache()Clear all cached stores.- Since:
- 3.0.1
-
getConversionTableNames
String[] getConversionTableNames()Get the names of the conversation table.- Returns:
- an array of
String - Since:
- 4.0
-
getConversionTable
Get the conversation table by name.- Parameters:
name- the name of the conversation table- Returns:
ConversionTable- Since:
- 4.0
-
getRemoteUserService
Connects the project defined in specifiedRemoteProjectConfigurationand returns it'sUserService. Returnsnullif the configuration couldn't be found or if the connection couldn't be established.- Parameters:
symbolicName- specifies theRemoteProjectConfigurationby it'ssymbolic-name.- Returns:
- remote
UserServiceornullif it couldn't be found or accessed. - Since:
- 4.0.17
-
getRevision
Get the revision of this userservice.- Returns:
Revision- Since:
- 4.0.17
-
getConnection
Connection getConnection()Get the connection of this userservice.- Returns:
- the
Connection - Since:
- 4.0.17
-