Interface ActorMappingService

  • All Known Implementing Classes:
    ActorMappingServiceImpl

    public interface ActorMappingService
    Since:
    6.0
    Author:
    Matthieu Chaffotte, Elias Ricken de Medeiros, Celine Souchet
    • Method Detail

      • getActor

        SActor getActor​(java.lang.String actorName,
                        long scopeId)
                 throws SActorNotFoundException
        Get actor by actor name and scope id If the actor by a given actorName and scopeId is not found, it will throw SActorNotFoundException
        Parameters:
        actorName - Name of actor
        scopeId - Id of scope, it can be processDefinitionId
        Returns:
        SActor object corresponding to the given actorName and scopeId
        Throws:
        SActorNotFoundException - Error thrown if no actor have an id corresponding to the parameter.
      • getActors

        java.util.List<SActor> getActors​(java.util.Set<java.lang.Long> scopeIds,
                                         java.lang.Long userId)
                                  throws SBonitaReadException
        Get a list of all actors for the id specified user in certain scopes specified by scopeIds
        Parameters:
        scopeIds - Ids of scope, it can be processDefinitionId
        userId - Id of user which is added to actor
        Returns:
        The list of SActor Objects
        Throws:
        SBonitaReadException
      • deleteActors

        void deleteActors​(long scopeId)
                   throws SActorDeletionException
        Delete actors in the id specified scope
        Parameters:
        scopeId - Id of scope, it can be processDefinitionId
        Throws:
        SActorDeletionException - Error thrown if has exceptions while try to delete actors
      • getActorMembers

        java.util.List<SActorMember> getActorMembers​(long actorId,
                                                     int index,
                                                     int numberOfActorMembers)
                                              throws SBonitaReadException
        Get list of SActorMember objects by pagination
        Parameters:
        actorId - Id of actor
        index - Index of the record to be retrieved from. First record has pageNumber 0.
        numberOfActorMembers - Number of result we want to get. Maximum number of result returned.
        Returns:
        List of SActorMember objects, ordered by id ascending
        Throws:
        SBonitaReadException
      • getNumberOfActorMembers

        long getNumberOfActorMembers​(long actorId)
                              throws SBonitaReadException
        Get number of ActorMembers for give actorId
        Parameters:
        actorId - Id of actor
        Returns:
        the number of ActorMembers
        Throws:
        SBonitaReadException
      • getActorMembersOfUser

        java.util.List<SActorMember> getActorMembersOfUser​(long userId,
                                                           int fromIndex,
                                                           int numberOfActorMembers)
                                                    throws SBonitaReadException
        Get a list of SActorMember objects for given userId
        Parameters:
        userId - Id of user
        fromIndex - Index of the record to be retrieved from. First record has pageNumber 0.
        numberOfActorMembers - Number of result we want to get. Maximum number of result returned.
        Returns:
        List of SActorMember objects, ordered by id ascending
        Throws:
        SBonitaReadException
      • getActorMembersOfGroup

        java.util.List<SActorMember> getActorMembersOfGroup​(long groupId,
                                                            int index,
                                                            int numberOfActorMembers)
                                                     throws SBonitaReadException
        Get a list of SActorMember objects for given groupId
        Parameters:
        groupId - Id of group
        Returns:
        a list of SActorMember objects, ordered by id ascending
        Throws:
        SBonitaReadException
      • getActorMembersOfRole

        java.util.List<SActorMember> getActorMembersOfRole​(long roleId,
                                                           int fromIndex,
                                                           int numberOfActorMembers)
                                                    throws SBonitaReadException
        Get a list of SActorMember objects for given roleId
        Parameters:
        roleId - Id of role
        Returns:
        a list of SActorMember objects, ordered by id ascending
        Throws:
        SBonitaReadException
      • canUserStartProcessDefinition

        boolean canUserStartProcessDefinition​(long userId,
                                              long processDefinitionId)
                                       throws SBonitaReadException
        Is a specified user allowed to start a process?
        Parameters:
        userId - Id of user
        processDefinitionId - Id of processDefinition
        Returns:
        a list of SActor objects
        Throws:
        SBonitaReadException
      • getNumberOfUsersOfActor

        long getNumberOfUsersOfActor​(long actorId)
        Return the number of users corresponding to an actor
        Parameters:
        actorId - the id of the actor to retrieve the users from
        Returns:
        Number of users mapped to actor
      • getNumberOfRolesOfActor

        long getNumberOfRolesOfActor​(long actorId)
        Get the number of roles of an actor
        Parameters:
        actorId - the id corresponding to an actor
        Returns:
        Number of roles mapped to actor
      • getNumberOfGroupsOfActor

        long getNumberOfGroupsOfActor​(long actorId)
                               throws java.lang.RuntimeException
        Get the number of groups corresponding to an actor
        Parameters:
        actorId - the id of the actor to retrieve the groups from
        Returns:
        Number of groups mapped to actor
        Throws:
        java.lang.RuntimeException
      • getNumberOfMembershipsOfActor

        long getNumberOfMembershipsOfActor​(long actorId)
        Get the number of memberships (role and group) of an actor
        Parameters:
        actorId - the id of the actor to retrieve the memberships from
        Returns:
        Number of memberships mapped to actor
      • getActorMember

        SActorMember getActorMember​(long actorId,
                                    long userId,
                                    long groupId,
                                    long roleId)
                             throws SBonitaReadException
        Get the actor member
        Parameters:
        actorId - The identifier of the actor
        userId - The identifier of the user
        groupId - The identifier of the group
        roleId - The identifier of the role
        Returns:
        The corresponding actor member
        Throws:
        SBonitaReadException
        Since:
        6.3