Interface UserService


public interface UserService
A service providing user based access to a project's data.
Since:
2.3
  • Method Details

    • getStore

      @NotNull @NotNull Store getStore(@NotNull Store.Type storeType, boolean release)
      Parameters:
      storeType - store type
      release - false for current (work) or true for 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 type
      forceRefresh - if true the server is queried for a new version
      release - false for current (work) or true for release state.
      Returns:
      the requested store
      Since:
      4.0.17
    • getTemplateStore

      TemplateStoreRoot getTemplateStore()
      Shortcut for getStore(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()
      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

      Task createTask(StoreElement storeElement, Workflow workflow, String comment)
      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 on
      workflow - The Workflow to start
      comment - 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 on
      workflow - The Workflow to start
      comment - The workflow start transition comment
      Returns:
      The new created task
      Since:
      3.0.135
    • createTask

      Task createTask(StoreElement storeElement, Workflow workflow, Task task)
      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 start
      task - The source task.
      Returns:
      The new created task
      Since:
      3.0.6
    • closeTask

      void closeTask(Task task)
      Close a running task and remove all task attributes from the associated StoreElement.
      Parameters:
      task - that shout be closed.
      Since:
      4.0.120
    • getTask

      @Nullable @Nullable Task getTask(long taskId)
      Returns the task specified by the given task id or null if 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

      void setTask(Task task)
      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 - the OutputStream with the export information.
      elements - an array with the StoreElement to 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 - the ZipFile to import.
      parent - the parent store element where the imported elements will be hooked in.
      importHandler - the importHandler
      Throws:
      IOException
      ElementDeletedException
      WorkflowLockException
      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

      ConversionTable getConversionTable(String name)
      Get the conversation table by name.
      Parameters:
      name - the name of the conversation table
      Returns:
      ConversionTable
      Since:
      4.0
    • getRemoteUserService

      @Nullable @Nullable UserService getRemoteUserService(String symbolicName)
      Connects the project defined in specified RemoteProjectConfiguration and returns it's UserService. Returns null if the configuration couldn't be found or if the connection couldn't be established.
      Parameters:
      symbolicName - specifies the RemoteProjectConfiguration by it's symbolic-name.
      Returns:
      remote UserService or null if it couldn't be found or accessed.
      Since:
      4.0.17
    • getRevision

      @Nullable @Nullable Revision 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