Class WorkObjectEngineWrapper

java.lang.Object
com.flowable.workobject.engine.impl.wrapper.WorkObjectEngineWrapper
All Implemented Interfaces:
NativeEngineWrapper

public class WorkObjectEngineWrapper
extends java.lang.Object
implements NativeEngineWrapper
Encapsulates WorkObject operations
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String WORKOBJECT_IDENTITY_LINK_SCOPE_TYPE  
  • Constructor Summary

    Constructors 
    Constructor Description
    WorkObjectEngineWrapper()  
  • Method Summary

    Modifier and Type Method Description
    java.util.Optional<NativeEngineWrapper> accepts​(java.lang.String workObjectId)
    Flag to allow to choose the right wrapper for the given workObject
    void addIdentityLinkToWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)
    Add identity link to the WorkObject, without params validation
    void deleteIdentityLinkForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)
    Delete identity link for the WorkObject
    java.util.List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
    Get HistoricIdentityLink for the WorkObject
    HistoricWorkObject getHistoricWorkObjectByIdAndTenant​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, HistoricWorkObjectQuery historicWorkObjectQuery)
    Get historic workObject by given Id
    java.util.List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
    Get identity links for the WorkObject, without params validation
    java.lang.String getParentId​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
    Get parent WorkObject identifier
    WorkObject getWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, WorkObjectQuery workObjectQuery)
    Get workObject by given id and tenant
    protected boolean noIdentityLink​(java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • accepts

      public java.util.Optional<NativeEngineWrapper> accepts​(java.lang.String workObjectId)
      Description copied from interface: NativeEngineWrapper
      Flag to allow to choose the right wrapper for the given workObject
      Specified by:
      accepts in interface NativeEngineWrapper
      Parameters:
      workObjectId - workObject identifier
      Returns:
      optionally returns NativeEngineWrapper which is able to handle request.
    • getHistoricWorkObjectByIdAndTenant

      public HistoricWorkObject getHistoricWorkObjectByIdAndTenant​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, HistoricWorkObjectQuery historicWorkObjectQuery)
      Description copied from interface: NativeEngineWrapper
      Get historic workObject by given Id
      Specified by:
      getHistoricWorkObjectByIdAndTenant in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is done
      historicWorkObjectQuery - historic workObject query
      Returns:
      native historic object wrapped in the HistoricWorkObject implementation
    • getWorkObject

      public WorkObject getWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, WorkObjectQuery workObjectQuery)
      Description copied from interface: NativeEngineWrapper
      Get workObject by given id and tenant
      Specified by:
      getWorkObject in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectQuery - query to search for
      Returns:
      workObject according to given query.
    • addIdentityLinkToWorkObject

      public void addIdentityLinkToWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)
      Description copied from interface: NativeEngineWrapper
      Add identity link to the WorkObject, without params validation
      Specified by:
      addIdentityLinkToWorkObject in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectId - workObject identifier
      userId - user identifier
      groupId - group identifier
      identityLinkType - identity link type
    • deleteIdentityLinkForWorkObject

      public void deleteIdentityLinkForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)
      Description copied from interface: NativeEngineWrapper
      Delete identity link for the WorkObject
      Specified by:
      deleteIdentityLinkForWorkObject in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectId - workObject identifier
      userId - user identifier
      groupId - group identifier
      identityLinkType - identity link type
    • getIdentityLinksForWorkObject

      public java.util.List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
      Description copied from interface: NativeEngineWrapper
      Get identity links for the WorkObject, without params validation
      Specified by:
      getIdentityLinksForWorkObject in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectId - workObject identifier
    • getHistoricIdentityLinksForWorkObject

      public java.util.List<org.flowable.identitylink.api.history.HistoricIdentityLink> getHistoricIdentityLinksForWorkObject​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
      Description copied from interface: NativeEngineWrapper
      Get HistoricIdentityLink for the WorkObject
      Specified by:
      getHistoricIdentityLinksForWorkObject in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectId - workObject identifier
    • getParentId

      public java.lang.String getParentId​(org.flowable.common.engine.impl.interceptor.CommandContext commandContext, java.lang.String workObjectId)
      Description copied from interface: NativeEngineWrapper
      Get parent WorkObject identifier
      Specified by:
      getParentId in interface NativeEngineWrapper
      Parameters:
      commandContext - command context under which query is performed
      workObjectId - workObject identifier
      Returns:
      parent workObjectId or null in the case when workObject is null
    • noIdentityLink

      protected boolean noIdentityLink​(java.lang.String workObjectId, java.lang.String userId, java.lang.String groupId, java.lang.String identityLinkType)