Class SystemRI

java.lang.Object
mc.core.system.base.BaseBean
mc.core.domain.base.AbstractAPI
mc.core.domain.system.SystemRI

@Path("/") @Produces("application/json") public class SystemRI extends AbstractAPI
The system REST API provides REST enabled endpoints to relevant functions of the SystemAPI.
  • Constructor Details

    • SystemRI

      public SystemRI()
  • Method Details

    • userSessionLoginRI

      @GET @Path("login") public javax.ws.rs.core.Response userSessionLoginRI(@QueryParam("login") String login, @QueryParam("pwd") String pwd, @QueryParam("uiLocale") String uiLocale) throws UserException, ApplicationException
      GET: login?login=[userlogin]&pwd=[password]&uiLocale=[uiLocale]

      Login a user with given login, password and (optional) UI locale, creating a stateful session. Return valid session id or exception if login fails. Alternately, authentication details can be provided as an HTTP basic Auth header or as parameters with each request.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.userSessionLogin(String, String, String)
    • userSessionLogoutRI

      @GET @Path("logout") public javax.ws.rs.core.Response userSessionLogoutRI()
      GET: logout

      logout the current stateful session.

      See Also:
      • SystemAPI.userSessionLogout()
    • userSessionInfo

      @GET @Path("sessioninfo") public javax.ws.rs.core.Response userSessionInfo()
      GET: sessioninfo

      get map with basic session data information: sessionId, namespace, user, locales.

    • systemPropertyGet

      @GET @Path("systemproperty/{key}") @Produces("text/plain") public String systemPropertyGet(@PathParam("key") String key)
      GET: systemproperty/{key}

      Get a system property by key. "key" for a system property is always only the String e.g. "mc.host", not the Id of the corresponding CSSystemProperty entity in DB

      See Also:
      • SystemAPI.systemPropertyGet(String, Class, Object)
    • systemPropertySet

      @POST @Path("systemproperty/{key}/{value}") public void systemPropertySet(@PathParam("key") String key, @PathParam("value") String value)
      POST: systemproperty/{key}/{value}

      Set or update a given system property.

      See Also:
      • SystemAPI.systemPropertySet(String, Object)
    • systemPropertyDelete

      @DELETE @Path("systemproperty/{key}") public void systemPropertyDelete(@PathParam("key") String key)
      DELETE: systemproperty/{key}

      Delete a given system property.

      Parameters:
      key - mandatory
      See Also:
      • SystemAPI.systemPropertyDelete(String)
    • systemInfoRI

      @GET @Path("systeminfo") public javax.ws.rs.core.Response systemInfoRI() throws ApplicationException
      GET: systeminfo

      Get an overview of the system information, including number of active sessions, current memory usage, build version and more.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.systemInfo()
    • versionInfoRI

      @GET @Path("versioninfo") public javax.ws.rs.core.Response versionInfoRI() throws ApplicationException
      GET: versioninfo

      Get an overview of the system version info, MC version and build number.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.systemInfo()
    • ftiRebuild

      @POST @Path("fti/rebuild") public void ftiRebuild(@QueryParam("entityName") String entityName, @QueryParam("entityTypeKey") Set<String> entityTypeKey, @QueryParam("dateModified") String dateModified) throws ApplicationException
      POST: fti/rebuild?entityName=[entityName]&entityTypeKey=[key1]&entityTypeKey=[key2]&...

      Rebuild the fulltext index for a given entity type and a list entity type keys (e.g. node types, asset types, derivate types).

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.ftiRebuild(Class, java.util.List, Calendar)
    • ftiRebuild

      @POST @Path("fti/rebuild/{entityName}") public <T extends IBaseEntity> javax.ws.rs.core.Response ftiRebuild(@PathParam("entityName") String entityName, @QueryParam("filter") String filterAsJson) throws ApplicationException
      Rebuilds Lucene index for all entities matched by SearchFilter.
      Parameters:
      entityName - Name of entity class with org.hibernate.search.annotations.Indexed annotation.
      filterAsJson - JSON representation of SearchFilter.
      Returns:
      Status message.
      Throws:
      ApplicationException
    • ftiRebuildEntity

      @POST @Path("fti/rebuild/{entityName}/{id}") public <T extends IBaseEntity> javax.ws.rs.core.Response ftiRebuildEntity(@PathParam("entityName") String entityName, @PathParam("id") long id) throws ApplicationException
      Rebuilds Lucene index for a single entity.
      Parameters:
      entityName - Name of entity class with org.hibernate.search.annotations.Indexed annotation.
      id - Primary key of entity.
      Returns:
      Status message.
      Throws:
      ApplicationException
    • ftiConfig

      @GET @Path("fti/config/{entityName}") public javax.ws.rs.core.Response ftiConfig(@PathParam("entityName") String entityName) throws ApplicationException
      GET: fti/config/{entityName}

      EXPERIMENTAL: get FTI config for an entityClass.

      Parameters:
      entityName - mandatory
      Returns:
      map with FTI config for entityClass
      Throws:
      ApplicationException
    • startWorkflow

      @POST @Path("workflowtype/{key}/start") public javax.ws.rs.core.Response startWorkflow(@PathParam("key") String key) throws ApplicationException, IOException
      POST: workflowtype/{key}/start?data=[json]

      start given workflow type, optionally with parameters given in data map.

      Throws:
      ApplicationException
      IOException
      See Also:
      • SystemAPI.startWorkflow(WorkflowType, ActionParameterList)
    • startActionlet

      @POST @Path("actionlet/{class}/start") public javax.ws.rs.core.Response startActionlet(@PathParam("class") String actionletClassName) throws ApplicationException, IOException, ClassNotFoundException
      POST: actionlet/{class}/start?data=[json]

      start actionlet given by fully qualified class name, optionally with parameters given in data map. Parameters must fulfill demands of actionlet, see javadoc of actionlet class for details.

      Throws:
      ApplicationException
      IOException
      ClassNotFoundException
      See Also:
      • SystemAPI.startActionlet(Class, ActionParameterList)
    • basketInsert

      @POST @Path("basket") public javax.ws.rs.core.Response basketInsert() throws UserException, ApplicationException, IOException
      POST: basket?data=[jsonDataMap]

      insert empty basket and set it to active the parameter "itemObjectClass" in data map is mandatory

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.basketSave(Basket, mc.core.domain.base.map.DataMap)
    • basketEdit

      @POST @Path("basket/{basketKey}") public javax.ws.rs.core.Response basketEdit(@PathParam("basketKey") String basketKey) throws UserException, ApplicationException, IOException
      POST:basket/{basketKey}?data=[jsonDataMap]

      Save changes to a base data of node basket with data provided in the json data map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.basketSave(Basket, mc.core.domain.base.map.DataMap)
    • basketDelete

      @DELETE @Path("basket/{basketKey}") public void basketDelete(@PathParam("basketKey") String basketKey) throws UserException, ApplicationException, IOException
      DELETE: basket/{basketKey}

      Delete the basket if own, otherwise remove shared link from logged-in user

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.basketDelete(Basket)
    • notificationInsert

      @POST @Path("notification") public javax.ws.rs.core.Response notificationInsert() throws UserException, ApplicationException, IOException
      POST: notification?data=[json]

      Insert a new notification with the data from json map.

      for Example: data = {"topic":"test topic text","message":"test message text","receiver":[661952,662138]}
      with image attachment: data = {"topic":"betref","message":"test message text","receiver":[661952,662138], "_tr_relatedEntityClass": "mc.core.model.asset.Asset", "_tr_relatedEntityIds":"666565, 666560"}

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.notificationSave(Notification, mc.core.domain.base.map.DataMap)
    • notificationEdit

      @POST @Path("notification/{key}") public javax.ws.rs.core.Response notificationEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: notification/{key}?data=[json]

      Update a given notification with the data from json map.

      for Example: data = {"topic":"test topic text","message":"test message text","receiver":[661952,662138]}
      with image attachment: data = {"topic":"betref","message":"test message text","receiver":[661952,662138], "_tr_relatedEntityClass": "mc.core.model.asset.Asset", "_tr_relatedEntityIds":"666565, 666560"}

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.notificationSave(Notification, mc.core.domain.base.map.DataMap)
    • notificationDelete

      @DELETE @Path("notification/{key}") public void notificationDelete(@PathParam("key") String key) throws ApplicationException
      DELETE: notification/{key}

      Delete a given notification.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.notificationDelete(Notification)
    • workflowDataDelete

      @DELETE @Path("workflowdata/{key}") public void workflowDataDelete(@PathParam("key") String key) throws ApplicationException
      DELETE: workflowdata/{key}

      Delete a given workflow data item.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.workflowDataDelete(WorkflowData)
    • workflowDataInterrupt

      @POST @Path("workflowdata/{key}/interrupt") public void workflowDataInterrupt(@PathParam("key") String key) throws ApplicationException
      POST: workflowdata/{key}/interrupt

      Send an interrupt request to the given workflow data item.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.workflowDataInterrupt(WorkflowData)
    • workflowDataRestart

      @POST @Path("workflowdata/{key}/restart") @Produces("text/plain") public boolean workflowDataRestart(@PathParam("key") String key) throws ApplicationException
      POST: workflowdata/{key}/restart

      Restart the given workflow data item.

      Throws:
      ApplicationException
      See Also:
      • SystemAPI.workflowDataRestart(WorkflowData)
    • workflowTypeInsert

      @POST @Path("workflowtype") public javax.ws.rs.core.Response workflowTypeInsert() throws ApplicationException, IOException
      POST: workflowtype?data=[json]

      Insert workflow type with the data from json map.

      Throws:
      ApplicationException
      IOException
      See Also:
      • SystemAPI.workflowTypeSave(WorkflowType, mc.core.domain.base.map.DataMap)
    • workflowTypeEdit

      @POST @Path("workflowtype/{key}") public javax.ws.rs.core.Response workflowTypeEdit(@PathParam("key") String key) throws ApplicationException, IOException
      POST: workflowtype/{key}?data=[json]

      Update given workflow type with the data from json map.

      Throws:
      ApplicationException
      IOException
      See Also:
      • SystemAPI.workflowTypeSave(WorkflowType, mc.core.domain.base.map.DataMap)
    • workflowTypeCopy

      @POST @Path("workflowtype/{key}/copy") public javax.ws.rs.core.Response workflowTypeCopy(@PathParam("key") String key) throws ApplicationException, IOException
      POST: workflowtype/{key}/copy

      Copy given workflow type.

      Throws:
      ApplicationException
      IOException
      See Also:
      • SystemAPI.workflowTypeCopy(WorkflowType)
    • workflowTypeActivateTimerWf

      @POST @Path("workflowtype/{key}/activatetimer") public void workflowTypeActivateTimerWf(@PathParam("key") String key) throws UserException, ApplicationException
      POST: workflowtype/{key}/activatetimer

      Activate the timer for a given workflow type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.workflowTypeActivateTimerWf(WorkflowType)
    • workflowTypeCancelTimerWf

      @POST @Path("workflowtype/{key}/canceltimer") public void workflowTypeCancelTimerWf(@PathParam("key") String key) throws UserException, ApplicationException
      POST: workflowtype/{key}/canceltimer

      Cancel timer for a given workflow type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.workflowTypeCancelTimerWf(WorkflowType)
    • workflowTypeDelete

      @DELETE @Path("workflowtype/{key}") public void workflowTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: workflowtype/{key}

      Delete a given workflow type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.workflowTypeDelete(WorkflowType)
    • workflowTypeRemoveWfActionType

      @DELETE @Path("workflowtype/{key}/wfactiontype/{wfActionTypeKey}") public void workflowTypeRemoveWfActionType(@PathParam("key") String key, @PathParam("wfActionTypeKey") String wfActionTypeKey) throws UserException, ApplicationException
      DELETE: workflowtype/{key}/wfactiontype/{wfActionTypeKey}

      Delete a workflow action type for a given workflow type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.workflowTypeRemoveWfActionType(WorkflowType, WfActionType)
    • wfActionTypeInsert

      @POST @Path("wfactiontype") public javax.ws.rs.core.Response wfActionTypeInsert() throws UserException, ApplicationException, IOException
      POST: wfactiontype?data=[json]

      Insert a workflow action type with the data from json map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.wfActionTypeSave(WfActionType, mc.core.domain.base.map.DataMap)
    • wfActionTypeEdit

      @POST @Path("wfactiontype/{key}") public javax.ws.rs.core.Response wfActionTypeEdit(@PathParam("key") String key) throws UserException, ApplicationException, IOException
      POST: wfactiontype/{key}?data=[json]

      Update the given workflow action type with the data from json map.

      Throws:
      UserException
      ApplicationException
      IOException
      See Also:
      • SystemAPI.wfActionTypeSave(WfActionType, mc.core.domain.base.map.DataMap)
    • wfActionTypeDelete

      @DELETE @Path("wfactiontype/{key}") public void wfActionTypeDelete(@PathParam("key") String key) throws UserException, ApplicationException
      DELETE: wfactiontype/{key}

      Delete the given workflow action type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.wfActionTypeDelete(WfActionType)
    • wfActionTypeSetWfTransitionTypes

      @POST @Path("wfactiontype/{key}/transition") public javax.ws.rs.core.Response wfActionTypeSetWfTransitionTypes(@PathParam("key") String key) throws UserException, ApplicationException
      YET NOT IMPLEMENTED

      Set given workflow transitions for given workflow action type.

      Throws:
      UserException
      ApplicationException
    • wfActionTypeRemoveWfTransitionType

      @DELETE @Path("wfactiontype/{key}/transition/{transitionTypeKey}") public void wfActionTypeRemoveWfTransitionType(@PathParam("key") String key, @PathParam("transitionTypeKey") String wfTransitionTypeKey) throws UserException, ApplicationException
      DELETE: wfactiontype/{key}/transition/{transitionTypeKey}

      Remove a given workflow transition from a given workflow type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.wfActionTypeRemoveWfTransitionType(WfActionType, WfTransitionType)
    • wfActionTypeSetWfParameters

      @POST @Path("wfactiontype/{key}/parameter/{paramKey}/{paramValue}") public void wfActionTypeSetWfParameters(@PathParam("key") String key, @PathParam("paramKey") String paramKey, @PathParam("paramValue") String paramValue) throws UserException, ApplicationException
      YET NOT IMPLEMENTED

      Set given parameter for given workflow action type.

      Throws:
      UserException
      ApplicationException
    • wfActionTypeRemoveWfParameter

      @DELETE @Path("wfactiontype/{key}/parameter/{paramKey}") public void wfActionTypeRemoveWfParameter(@PathParam("key") String key, @PathParam("paramKey") String paramKey) throws UserException, ApplicationException
      DELETE: wfactiontype/{key}/parameter/{paramKey}

      Delete given parameter for given workflow action type.

      Throws:
      UserException
      ApplicationException
      See Also:
      • SystemAPI.wfActionTypeRemoveWfParameter(WfActionType, mc.core.model.system.WfParameter)
    • systemPropertyGet

      public <T> T systemPropertyGet(String key, Class<T> type, T defaultValue)
      Gets system property from configuration. system properties can either be set in the database through CSSystemProperty or in the namespace.properties file. if a property is set in both locations, the value in the database is used.
      Parameters:
      key - mandatory
      type - mandatory, target type for returned property. value is stored as String and must be convertible to the target type
      defaultValue - optional, returned if key is not set in configuration
      Returns:
      value for key from database oder properties file. defaultValue if not set
    • systemPropertyGetValues

      public List<String> systemPropertyGetValues(String key, String... defaultValues)
      Gets system property from configuration. get values if property is a comma separated list of single values.
      Parameters:
      key - mandatory
      defaultValues - optional, returned if property is not set in configuration
      Returns:
      list of the separated values. defaultValues if not set
    • systemPropertySet

      public void systemPropertySet(String key, Object value)
      Sets system property in configuration. always sets in database, the properties file is never changed by the application.
      Parameters:
      key - mandatory
      value - mandatory
    • systemInfo

      public mc.core.service.configuration.SystemInfo systemInfo()
      Gets system runtime information including configuration, version/build, memory and statistic data.
      Returns:
      map with system runtime information as key/value pairs.
    • userSessionLogin

      public void userSessionLogin(String login, String password, String uiJavaLocale) throws UserException, ApplicationException
      Login user to current session. if user is not a service user and session is stateful, session is stored in database in a CSUserSession entity and registered in SessionService.
      Parameters:
      login - mandatory
      password - mandatory
      uiJavaLocale - optional, if null uiLocale for current session is set from user profile or from system default locale
      Throws:
      UserException - if user credentials are invalid, account is disabled or password expired
      ApplicationException
    • userSessionLogin

      public void userSessionLogin(mc.core.system.session.SessionLoginParam loginParam) throws ApplicationException
      Login user to current session according to fields set in loginParam. if systemUser session is never stateful and therefore is not stored in database and not registered in session service.
      Parameters:
      loginParam - mandatory
      Throws:
      ApplicationException
    • userSessionLogout

      public void userSessionLogout()
      Logout the current user session. deletes user session from database and removes from session service. for stateless or service user session this does nothing.
    • userSessionLogout

      public void userSessionLogout(String sessionId)
      Logout a user session. deletes user session from database and removes from session service. for stateless or service user session this does nothing. Does not end a running web session: if corresponding web session is still active the user may encounter errors or will be redirected to login page. Use with care (system admin method)!
    • userSessionRefresh

      public void userSessionRefresh(boolean updateNotificationCount)
      refreshes the current user session by setting its last access date to avoid timeout.
    • ftiRebuild

      public void ftiRebuild(Class<ComplexEntity> entityClass, List<ComplexTypeEntity> entityTypes, Calendar dateModified) throws UserException, ApplicationException
      Starts background job to rebuild full text index of class and types. with entityClass null rebuild index of all configured classes.
      Parameters:
      entityClass - optional
      entityTypes - optional
      dateModified - optional
      Throws:
      UserException - to signal workflow started
      ApplicationException
    • fileGetContent

      public InputStream fileGetContent(String fileId) throws ApplicationException
      Get content of file from content store for given fileId.
      Parameters:
      fileId - mandatory, fileId is content store implementation dependent
      Returns:
      InputStream for file referenced by this fileId in content store. null if no file is found for the given fileId
      Throws:
      ApplicationException
    • fileGetContentFile

      public File fileGetContentFile(String fileId) throws ApplicationException
      get file from content store for given fileId.
      Parameters:
      fileId - mandatory, fileId is content store implementation dependent
      Returns:
      File referenced by this fileId in content store. null if no file is found for the given fileId
      Throws:
      ApplicationException
    • fileInsert

      public String fileInsert(InputStream inputStream, String filename) throws ApplicationException
      Stores content from input stream in content store.
      Parameters:
      inputStream - mandatory
      filename - optional, may be used by content store implementations to build filenames or create fileId
      Returns:
      fileId for stored content. fileId is content store implementation dependent
      Throws:
      ApplicationException
    • startWorkflow

      public Long startWorkflow(WorkflowType workflowType, mc.core.system.workflow.ActionParameterList apl) throws ApplicationException
      Start background job for given workflow type. the workflow is send to queue.
      Parameters:
      workflowType - mandatory
      apl - optional, must be given if action classes implementing the workflow expect parameters for execution. see the respective action implementation classes for details.
      Returns:
      workflow handle of started workflow
      Throws:
      ApplicationException
    • startActionlet

      public Long startActionlet(Class<? extends mc.core.system.workflow.Actionlet> actionletClass, mc.core.system.workflow.ActionParameterList apl) throws ApplicationException
      Start background job for given actionletClass. the workflow is send to queue.
      Parameters:
      actionletClass - mandatory
      apl - optional, must be given if actionlet class expects parameters for execution. see the respective actionlet class for details.
      Throws:
      ApplicationException
    • basketSave

      public Basket basketSave(Basket basket, DataMap dataMap) throws ApplicationException
      Inserts or updates given Basket by setting its fields from given paramMap.
      if basket is new sets current user as owner, sets a default name containing current date and sets this basket active.
      the parameter "itemObjectClass" in dataMap is mandatory for insert basket!
      Parameters:
      basket - mandatory
      dataMap - mandatory, contains values for the Basket's fields as key-value pairs
      Returns:
      inserted or updated Basket. If Basket has been inserted it contains now the newly created id
      Throws:
      ApplicationException
    • basketDelete

      public void basketDelete(Basket basket) throws ApplicationException
      Deletes Basket from database if own, else only shared link for current user be deleted.
      Parameters:
      basket - mandatory
      Throws:
      ApplicationException
    • systemPropertySave

      public CSSystemProperty systemPropertySave(CSSystemProperty property, DataMap dataMap) throws ApplicationException
      Inserts or updates given CSSystemProperty by setting its fields from given dataMap.
      Parameters:
      property - CSSystemProperty, mandatory
      dataMap - optional, contains values for the CSSystemProperty fields as key-value pairs
      Returns:
      inserted or updated CSSystemProperty
      Throws:
      ApplicationException
    • systemPropertyDelete

      public void systemPropertyDelete(CSSystemProperty property) throws ApplicationException
      Removes CSSystemProperty from database.
      Parameters:
      property - CSSystemProperty, mandatory
      Throws:
      ApplicationException
    • notificationSave

      public Notification notificationSave(Notification notification, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given notification by setting its fields from given dataMap. also inserts or update notification receiver and attachments.
      Parameters:
      notification - mandatory
      dataMap - optional, contains values for the notification's fields as key-value pairs
      Returns:
      inserted or updated Notification
      Throws:
      UserException - on edit if edit is not allowed (current user is not sender of notification), or if invalid ids for attachment entities are given in map
      ApplicationException
    • notificationDelete

      public void notificationDelete(Notification notification) throws ApplicationException
      Removes Notification from database.
      Parameters:
      notification - mandatory
      Throws:
      ApplicationException
    • workflowDataDelete

      public void workflowDataDelete(WorkflowData workflowData) throws ApplicationException
      Removes WorkflowData from database if not belonging to a currently running workflow.
      Parameters:
      workflowData - mandatory
      Throws:
      UserException - if current user is not owner of workflow or workflowData's workflow is running, or if user is not root
      ApplicationException
    • workflowDataDelete

      public void workflowDataDelete(List<WorkflowData> workflowData) throws ApplicationException
      Removes WorkflowData from database if not belonging to a currently running workflow. Optimized method for list
      Parameters:
      workflowData - mandatory
      Throws:
      UserException - if current user is not owner of workflow or workflowData's workflow is running, or if user is not root
      ApplicationException
    • workflowDataInterrupt

      public void workflowDataInterrupt(WorkflowData workflowData) throws ApplicationException
      Sends interrupt signal to a running workflow by setting the interrupt flag in it's corresponding workflowData object. does not guarantee to really interrupt the running workflow thread, cause concrete implementation of the workflow actions must support this feature. therefore set's the state of the workflow (and workflowData) to INTERRUPT_REQEUSTED. workflow terminates itself and workflow engine set's state to the final INTERRUPTED state.
      Parameters:
      workflowData - mandatory
      Throws:
      UserException - if current user is not owner of workflow or not root
      ApplicationException
    • workflowDataRestart

      public boolean workflowDataRestart(WorkflowData workflowData) throws ApplicationException
      Restart an ended workflow with it's original parameters.
      Parameters:
      workflowData - mandatory
      Returns:
      true if workflow has been restarted (sent to queue). false if still running or timer workflow.
      Throws:
      UserException - if current user is not owner of workflow or not root
      ApplicationException
    • workflowDataPause

      public void workflowDataPause(mc.core.system.search.SearchFilter sf) throws ApplicationException
      Sets workflows of actual search result defined by search filter to state PAUSED. Uses an action as background process. The search filter pageSize is set to 1000. Means 1000 workflows are PAUSED in one transaction.
      Parameters:
      sf - mandatory
      Throws:
      ApplicationException
    • workflowDataContinue

      public void workflowDataContinue(mc.core.system.search.SearchFilter sf) throws ApplicationException
      Sets workflows of actual search result defined by search filter to state QUEUED. Uses an action as background process. The search filter pageSize is set to 1000. Means 1000 workflows are QUEUED in one transaction.
      Parameters:
      sf - mandatory
      Throws:
      ApplicationException
    • wfActionletDataDelete

      public void wfActionletDataDelete(WfActionletData data) throws ApplicationException
      Removes WfActionletData from database if not belonging to a currently running actionlet.
      Parameters:
      data - mandatory
      Throws:
      UserException - if current user is not owner of workflow or workflowData's workflow is running, or if user is not root
      ApplicationException
    • workflowTypeSave

      public WorkflowType workflowTypeSave(WorkflowType workflowType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given workflowType by setting its fields from given dataMap. If the workflowType is a timer-associated workflow and is active starts the timer for this workflow. In case of update, if there was already a timer, cancels the old timer.
      Parameters:
      workflowType - mandatory
      dataMap - optional, contains values for the workflowType's fields as key-value pairs
      Returns:
      inserted or updated WorkflowType
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • workflowTypeCopy

      public WorkflowType workflowTypeCopy(WorkflowType workflowType) throws UserException, ApplicationException
      Creates a deep copy of given workflowType, including contained wfActionTypes and wfTransitionTypes.
      Parameters:
      workflowType - mandatory
      Returns:
      the copied WorkflowType
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • workflowTypeActivateTimerWf

      public void workflowTypeActivateTimerWf(WorkflowType workflowType) throws UserException
      Changes the timer start date and period according to data in given workflowType and sets this workflowType's timer to active. Cancels old timer for this workflowType if exists.
      Parameters:
      workflowType - mandatory, must be a timer Workflow.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • workflowTypeCancelTimerWf

      public void workflowTypeCancelTimerWf(WorkflowType workflowType) throws UserException
      Cancels old timer for this workflowType if exists and sets this workflowType's timer to inactive.
      Parameters:
      workflowType - mandatory, must be a timer Workflow.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • workflowTypeDelete

      public void workflowTypeDelete(WorkflowType workflowType) throws UserException, ApplicationException
      Checks if workflowType is used. If not removes it from database.
      Parameters:
      workflowType - mandatory
      Throws:
      UserException - if workflowType is in use or user has not role CONFIGADMIN
      ApplicationException
      See Also:
      • for usage of WorkflowType
    • workflowTypeRemoveWfActionType

      public void workflowTypeRemoveWfActionType(WorkflowType workflowType, WfActionType wfActionType) throws UserException, ApplicationException
      Removes wfActionType from workflowType.
      Parameters:
      workflowType - mandatory
      wfActionType - mandatory
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • workflowTypeSetWfParameters

      public void workflowTypeSetWfParameters(WorkflowType workflowType, List<WfParameter> wfParameters) throws UserException, ApplicationException
      Sets the wfParameters for this workflowType. The list must contain the whole set of the wfParameters for this workflowType, an old list is overwritten. wfParameter only belong to their workflowType and should be deleted when removed from workflowType.
      Parameters:
      workflowType - mandatory
      wfParameters - mandatory, if new they will be persisted. List is synchronized with list of existing parameters by Id or key, and parameter entity is reused if found. Each WfParameter must contain the necessary fields
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
      See Also:
    • workflowTypeRemoveWfParameter

      public void workflowTypeRemoveWfParameter(WorkflowType workflowType, WfParameter wfParameter) throws UserException, ApplicationException
      Removes wfParameter from workflowType and deletes it.
      Parameters:
      workflowType - mandatory
      wfParameter - mandatory, parameter is searched in list of existing parameters by Id or key, and deleted if found.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • wfActionTypeSave

      public WfActionType wfActionTypeSave(WfActionType wfActionType, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given wfActionType by setting its fields from given dataMap. If the WfActionType is new the workflowType must be set in wfActionType or given in dataMap. The implementing action class referenced by property 'className' in wfActionType is checked if exists in classpath.
      Parameters:
      wfActionType - mandatory
      dataMap - optional, contains values for the wfActionType's fields as key-value pairs
      Returns:
      inserted or updated WfActionType
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • wfActionTypeDelete

      public void wfActionTypeDelete(WfActionType wfActionType) throws UserException, ApplicationException
      Checks if wfActionType is referenced by workflowData or by wfTransitionType as toActionType. If not removes it from database.
      Parameters:
      wfActionType - mandatory
      Throws:
      UserException - if wfActionType is in use or user has not role CONFIGADMIN
      ApplicationException
      See Also:
      • for usage of WfActionType
    • wfActionTypeSetWfTransitionTypes

      public void wfActionTypeSetWfTransitionTypes(WfActionType wfActionType, List<WfTransitionType> wfTransitionTypes) throws UserException, ApplicationException
      Sets the wfTransitionTypes for this wfActionType. The wfTransitionTypes describe the transitions which are possible from this wfActionType. The list must contain the whole set of the wfTransitionTypes for this wfActionType, an old list is overwritten. wfTransitionTypes only belong to their wfActionType and should be deleted when removed from WfActionType.
      Parameters:
      wfActionType - mandatory
      wfTransitionTypes - mandatory, if new they will be inserted. Each WfTransitionType must contain the necessary fields
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
      See Also:
    • wfActionTypeRemoveWfTransitionType

      public void wfActionTypeRemoveWfTransitionType(WfActionType wfActionType, WfTransitionType wfTransitionType) throws UserException, ApplicationException
      Removes wfTransitionType from wfActionType and deletes it.
      Parameters:
      wfActionType - mandatory
      wfTransitionType - mandatory
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • wfActionTypeSetWfParameters

      public void wfActionTypeSetWfParameters(WfActionType wfActionType, List<WfParameter> wfParameters) throws UserException, ApplicationException
      Sets the wfParameters for this wfActionType. The list must contain the whole set of the wfParameters for this wfActionType, an old list is overwritten. wfParameter only belong to their wfActionType and should be deleted when removed from wfActionType.
      Parameters:
      wfActionType - mandatory
      wfParameters - mandatory, if new they will be persisted. List is synchronized with list of existing parameters by Id or key, and parameter entity is reused if found. Each WfParameter must contain the necessary fields
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
      See Also:
    • wfActionTypeRemoveWfParameter

      public void wfActionTypeRemoveWfParameter(WfActionType wfActionType, WfParameter wfParameter) throws UserException, ApplicationException
      Removes wfParameter from wfActionType and deletes it.
      Parameters:
      wfActionType - mandatory
      wfParameter - mandatory, parameter is searched in list of existing parameters by Id or key, and deleted if found.
      Throws:
      UserException - if user has not role CONFIGADMIN
      ApplicationException
    • reportingDelete

      public void reportingDelete(Reporting reporting) throws ApplicationException
      Deletes the reporting if session user is the owner, or root
      Parameters:
      reporting - mandatory
      Throws:
      ApplicationException
    • reportingSave

      public Reporting reportingSave(Reporting reporting, DataMap dataMap) throws UserException, ApplicationException
      Inserts or updates given Reporting by setting its fields from given dataMap. If the Reporting is new the definition field must be set in @reporting or given in dataMap.
      Parameters:
      reporting - mandatory
      dataMap - optional, contains values for the definition's fields as key-value pairs
      Returns:
      inserted or updated Reporting
      Throws:
      ApplicationException
      UserException
    • reportingCopy

      public Reporting reportingCopy(Reporting reporting) throws UserException, ApplicationException
      Throws:
      UserException
      ApplicationException
    • reportingSetProperties

      public void reportingSetProperties(Reporting reporting, DataMap dataMap)
    • reportingExecute

      public void reportingExecute(Reporting reporting) throws ApplicationException
      Execute the reporting
      Parameters:
      reporting - mandatory
      Throws:
      ApplicationException
    • reportingGetDefinitions

      public List<mc.core.service.reporting.ReportingDefinition> reportingGetDefinitions()
      Returns:
      map with possible reporting definitions for select
    • reportingGetDefinition

      public mc.core.service.reporting.ReportingDefinition reportingGetDefinition(Reporting reporting)
    • reportingGetProperties

      public List<mc.core.system.util.misc.Property<?>> reportingGetProperties(Reporting reporting)
    • reportingGetLastResult

      public mc.core.service.reporting.ReportingResult reportingGetLastResult(Reporting reporting)
    • reportingGetResults

      public List<mc.core.service.reporting.ReportingResult> reportingGetResults(Reporting reporting)
    • reportingGetRenderingDefinitionsForResult

      public List<mc.core.service.reporting.RenderingDefinition> reportingGetRenderingDefinitionsForResult(mc.core.service.reporting.ReportingResult result)
      get definitions of all matching renderer for result and it's resultTypes
    • reportingRemoveResult

      public void reportingRemoveResult(Reporting reporting, mc.core.service.reporting.ReportingResult result) throws ApplicationException
      Throws:
      ApplicationException
    • reportingRenderResult

      public void reportingRenderResult(Reporting reporting, mc.core.service.reporting.ReportingResult result, String rendererKey, OutputStream os) throws ApplicationException
      render result to given output stream
      Throws:
      ApplicationException