Class IdentityAPIImpl

  • All Implemented Interfaces:
    org.bonitasoft.engine.api.CustomUserInfoAPI, org.bonitasoft.engine.api.GroupAPI, org.bonitasoft.engine.api.IdentityAPI, org.bonitasoft.engine.api.MembershipAPI, org.bonitasoft.engine.api.OrganizationAPI, org.bonitasoft.engine.api.RoleAPI, org.bonitasoft.engine.api.UserAPI

    public class IdentityAPIImpl
    extends java.lang.Object
    implements org.bonitasoft.engine.api.IdentityAPI
    Author:
    Matthieu Chaffotte, Elias Ricken de Medeiros, Feng Hui, Zhang Bole, Yanyan Liu, Lu Kai, Hongwen Zang, Celine Souchet
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentityAPIImpl()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.bonitasoft.engine.identity.UserMembership addUserMembership​(long userId, long groupId, long roleId)  
      void addUserMemberships​(java.util.List<java.lang.Long> userIds, long groupId, long roleId)  
      org.bonitasoft.engine.identity.CustomUserInfoDefinition createCustomUserInfoDefinition​(org.bonitasoft.engine.identity.CustomUserInfoDefinitionCreator creator)  
      org.bonitasoft.engine.identity.Group createGroup​(java.lang.String name, java.lang.String parentPath)  
      org.bonitasoft.engine.identity.Group createGroup​(org.bonitasoft.engine.identity.GroupCreator creator)  
      org.bonitasoft.engine.identity.Role createRole​(java.lang.String roleName)  
      org.bonitasoft.engine.identity.Role createRole​(org.bonitasoft.engine.identity.RoleCreator creator)  
      org.bonitasoft.engine.identity.User createUser​(java.lang.String userName, java.lang.String password)  
      org.bonitasoft.engine.identity.User createUser​(java.lang.String userName, java.lang.String password, java.lang.String firstName, java.lang.String lastName)  
      org.bonitasoft.engine.identity.User createUser​(org.bonitasoft.engine.identity.UserCreator creator)  
      void deleteCustomUserInfoDefinition​(long id)  
      void deleteGroup​(long groupId)  
      void deleteGroups​(java.util.List<java.lang.Long> groupIds)  
      void deleteOrganization()  
      void deleteRole​(long roleId)  
      void deleteRoles​(java.util.List<java.lang.Long> roleIds)  
      void deleteUser​(long userId)  
      void deleteUser​(java.lang.String userName)  
      void deleteUserMembership​(long userMembershipId)  
      void deleteUserMembership​(long userId, long groupId, long roleId)  
      void deleteUserMemberships​(java.util.List<java.lang.Long> userIds, long groupId, long roleId)  
      void deleteUsers​(java.util.List<java.lang.Long> userIds)  
      java.lang.String exportOrganization()  
      java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersInGroup​(long groupId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersInRole​(long roleId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersWithManager​(long managerId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.CustomUserInfo> getCustomUserInfo​(long userId, int startIndex, int maxResult)  
      java.util.List<org.bonitasoft.engine.identity.CustomUserInfoDefinition> getCustomUserInfoDefinitions​(int startIndex, int maxResult)  
      org.bonitasoft.engine.identity.Group getGroup​(long groupId)  
      org.bonitasoft.engine.identity.Group getGroupByPath​(java.lang.String groupPath)  
      java.util.List<org.bonitasoft.engine.identity.Group> getGroups​(int startIndex, int maxResults, org.bonitasoft.engine.identity.GroupCriterion pagingCriterion)  
      java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.Group> getGroups​(java.util.List<java.lang.Long> groupIds)  
      org.bonitasoft.engine.identity.Icon getIcon​(long id)  
      java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersInGroup​(long groupId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersInRole​(long roleId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersWithManager​(long managerId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      long getNumberOfCustomInfoDefinitions()  
      long getNumberOfGroups()  
      long getNumberOfRoles()  
      long getNumberOfUserMemberships​(long userId)  
      long getNumberOfUsers()  
      long getNumberOfUsersInGroup​(long groupId)  
      long getNumberOfUsersInRole​(long roleId)  
      org.bonitasoft.engine.identity.Role getRole​(long roleId)  
      org.bonitasoft.engine.identity.Role getRoleByName​(java.lang.String roleName)  
      java.util.List<org.bonitasoft.engine.identity.Role> getRoles​(int startIndex, int maxResults, org.bonitasoft.engine.identity.RoleCriterion criterion)  
      java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.Role> getRoles​(java.util.List<java.lang.Long> roleIds)  
      protected TenantServiceAccessor getTenantAccessor()  
      org.bonitasoft.engine.identity.User getUser​(long userId)  
      org.bonitasoft.engine.identity.User getUserByUserName​(java.lang.String userName)  
      org.bonitasoft.engine.identity.ContactData getUserContactData​(long userId, boolean personal)  
      java.util.List<java.lang.Long> getUserIdsWithCustomUserInfo​(java.lang.String infoName, java.lang.String infoValue, boolean usePartialMatch, int startIndex, int maxResults)  
      org.bonitasoft.engine.identity.UserMembership getUserMembership​(long userMembershipId)  
      java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMemberships​(long userId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserMembershipCriterion pagingCrterion)  
      java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMembershipsByGroup​(long groupId, int startIndex, int maxResults)  
      java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMembershipsByRole​(long roleId, int startIndex, int maxResults)  
      java.util.List<org.bonitasoft.engine.identity.User> getUsers​(int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.User> getUsers​(java.util.List<java.lang.Long> userIds)  
      java.util.Map<java.lang.String,​org.bonitasoft.engine.identity.User> getUsersByUsernames​(java.util.List<java.lang.String> userNames)  
      java.util.List<org.bonitasoft.engine.identity.User> getUsersInGroup​(long groupId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getUsersInRole​(long roleId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      java.util.List<org.bonitasoft.engine.identity.User> getUsersWithManager​(long managerId, int startIndex, int maxResults, org.bonitasoft.engine.identity.UserCriterion criterion)  
      org.bonitasoft.engine.identity.UserWithContactData getUserWithProfessionalDetails​(long userId)  
      void importOrganization​(java.lang.String organizationContent)  
      void importOrganization​(java.lang.String organizationContent, org.bonitasoft.engine.identity.ImportPolicy policy)  
      java.util.List<java.lang.String> importOrganizationWithWarnings​(java.lang.String organizationContent, org.bonitasoft.engine.identity.ImportPolicy policy)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.CustomUserInfoValue> searchCustomUserInfoValues​(org.bonitasoft.engine.search.SearchOptions options)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.Group> searchGroups​(org.bonitasoft.engine.search.SearchOptions options)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.Role> searchRoles​(org.bonitasoft.engine.search.SearchOptions options)  
      org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.User> searchUsers​(org.bonitasoft.engine.search.SearchOptions options)  
      org.bonitasoft.engine.identity.CustomUserInfoValue setCustomUserInfoValue​(long definitionId, long userId, java.lang.String value)  
      org.bonitasoft.engine.identity.Group updateGroup​(long groupId, org.bonitasoft.engine.identity.GroupUpdater updater)  
      org.bonitasoft.engine.identity.Role updateRole​(long roleId, org.bonitasoft.engine.identity.RoleUpdater updateDescriptor)  
      org.bonitasoft.engine.identity.User updateUser​(long userId, org.bonitasoft.engine.identity.UserUpdater updater)  
      org.bonitasoft.engine.identity.UserMembership updateUserMembership​(long userMembershipId, long newGroupId, long newRoleId)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdentityAPIImpl

        public IdentityAPIImpl()
    • Method Detail

      • createUser

        public org.bonitasoft.engine.identity.User createUser​(java.lang.String userName,
                                                              java.lang.String password)
                                                       throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                              org.bonitasoft.engine.exception.CreationException
        Specified by:
        createUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • createUser

        public org.bonitasoft.engine.identity.User createUser​(java.lang.String userName,
                                                              java.lang.String password,
                                                              java.lang.String firstName,
                                                              java.lang.String lastName)
                                                       throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                              org.bonitasoft.engine.exception.CreationException
        Specified by:
        createUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • createUser

        public org.bonitasoft.engine.identity.User createUser​(org.bonitasoft.engine.identity.UserCreator creator)
                                                       throws org.bonitasoft.engine.exception.CreationException
        Specified by:
        createUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
      • updateUser

        public org.bonitasoft.engine.identity.User updateUser​(long userId,
                                                              org.bonitasoft.engine.identity.UserUpdater updater)
                                                       throws org.bonitasoft.engine.identity.UserNotFoundException,
                                                              org.bonitasoft.engine.exception.UpdateException
        Specified by:
        updateUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.identity.UserNotFoundException
        org.bonitasoft.engine.exception.UpdateException
      • deleteUser

        public void deleteUser​(long userId)
                        throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteUser

        public void deleteUser​(java.lang.String userName)
                        throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteUsers

        public void deleteUsers​(java.util.List<java.lang.Long> userIds)
                         throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUsers in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getUser

        public org.bonitasoft.engine.identity.User getUser​(long userId)
                                                    throws org.bonitasoft.engine.identity.UserNotFoundException
        Specified by:
        getUser in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.identity.UserNotFoundException
      • getUserByUserName

        public org.bonitasoft.engine.identity.User getUserByUserName​(java.lang.String userName)
                                                              throws org.bonitasoft.engine.identity.UserNotFoundException
        Specified by:
        getUserByUserName in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.identity.UserNotFoundException
      • getUserWithProfessionalDetails

        public org.bonitasoft.engine.identity.UserWithContactData getUserWithProfessionalDetails​(long userId)
                                                                                          throws org.bonitasoft.engine.identity.UserNotFoundException
        Specified by:
        getUserWithProfessionalDetails in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.identity.UserNotFoundException
      • getUserContactData

        public org.bonitasoft.engine.identity.ContactData getUserContactData​(long userId,
                                                                             boolean personal)
                                                                      throws org.bonitasoft.engine.identity.UserNotFoundException
        Specified by:
        getUserContactData in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.identity.UserNotFoundException
      • getNumberOfUsers

        public long getNumberOfUsers()
        Specified by:
        getNumberOfUsers in interface org.bonitasoft.engine.api.UserAPI
      • getUsers

        public java.util.List<org.bonitasoft.engine.identity.User> getUsers​(int startIndex,
                                                                            int maxResults,
                                                                            org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getUsers in interface org.bonitasoft.engine.api.UserAPI
      • getUsers

        public java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.User> getUsers​(java.util.List<java.lang.Long> userIds)
        Specified by:
        getUsers in interface org.bonitasoft.engine.api.UserAPI
      • getUsersByUsernames

        public java.util.Map<java.lang.String,​org.bonitasoft.engine.identity.User> getUsersByUsernames​(java.util.List<java.lang.String> userNames)
        Specified by:
        getUsersByUsernames in interface org.bonitasoft.engine.api.UserAPI
      • searchUsers

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.User> searchUsers​(org.bonitasoft.engine.search.SearchOptions options)
                                                                                                   throws org.bonitasoft.engine.exception.SearchException
        Specified by:
        searchUsers in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • getNumberOfUsersInRole

        public long getNumberOfUsersInRole​(long roleId)
        Specified by:
        getNumberOfUsersInRole in interface org.bonitasoft.engine.api.UserAPI
      • getUsersInRole

        public java.util.List<org.bonitasoft.engine.identity.User> getUsersInRole​(long roleId,
                                                                                  int startIndex,
                                                                                  int maxResults,
                                                                                  org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getUsersInRole in interface org.bonitasoft.engine.api.UserAPI
      • getActiveUsersInRole

        public java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersInRole​(long roleId,
                                                                                        int startIndex,
                                                                                        int maxResults,
                                                                                        org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getActiveUsersInRole in interface org.bonitasoft.engine.api.UserAPI
      • getInactiveUsersInRole

        public java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersInRole​(long roleId,
                                                                                          int startIndex,
                                                                                          int maxResults,
                                                                                          org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getInactiveUsersInRole in interface org.bonitasoft.engine.api.UserAPI
      • getUsersWithManager

        public java.util.List<org.bonitasoft.engine.identity.User> getUsersWithManager​(long managerId,
                                                                                       int startIndex,
                                                                                       int maxResults,
                                                                                       org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getUsersWithManager in interface org.bonitasoft.engine.api.UserAPI
      • getActiveUsersWithManager

        public java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersWithManager​(long managerId,
                                                                                             int startIndex,
                                                                                             int maxResults,
                                                                                             org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getActiveUsersWithManager in interface org.bonitasoft.engine.api.UserAPI
      • getInactiveUsersWithManager

        public java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersWithManager​(long managerId,
                                                                                               int startIndex,
                                                                                               int maxResults,
                                                                                               org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getInactiveUsersWithManager in interface org.bonitasoft.engine.api.UserAPI
      • getNumberOfUsersInGroup

        public long getNumberOfUsersInGroup​(long groupId)
        Specified by:
        getNumberOfUsersInGroup in interface org.bonitasoft.engine.api.UserAPI
      • getUsersInGroup

        public java.util.List<org.bonitasoft.engine.identity.User> getUsersInGroup​(long groupId,
                                                                                   int startIndex,
                                                                                   int maxResults,
                                                                                   org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getUsersInGroup in interface org.bonitasoft.engine.api.UserAPI
      • getActiveUsersInGroup

        public java.util.List<org.bonitasoft.engine.identity.User> getActiveUsersInGroup​(long groupId,
                                                                                         int startIndex,
                                                                                         int maxResults,
                                                                                         org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getActiveUsersInGroup in interface org.bonitasoft.engine.api.UserAPI
      • getInactiveUsersInGroup

        public java.util.List<org.bonitasoft.engine.identity.User> getInactiveUsersInGroup​(long groupId,
                                                                                           int startIndex,
                                                                                           int maxResults,
                                                                                           org.bonitasoft.engine.identity.UserCriterion criterion)
        Specified by:
        getInactiveUsersInGroup in interface org.bonitasoft.engine.api.UserAPI
      • getUserIdsWithCustomUserInfo

        public java.util.List<java.lang.Long> getUserIdsWithCustomUserInfo​(java.lang.String infoName,
                                                                           java.lang.String infoValue,
                                                                           boolean usePartialMatch,
                                                                           int startIndex,
                                                                           int maxResults)
        Specified by:
        getUserIdsWithCustomUserInfo in interface org.bonitasoft.engine.api.UserAPI
      • createRole

        public org.bonitasoft.engine.identity.Role createRole​(java.lang.String roleName)
                                                       throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                              org.bonitasoft.engine.exception.CreationException
        Specified by:
        createRole in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • createRole

        public org.bonitasoft.engine.identity.Role createRole​(org.bonitasoft.engine.identity.RoleCreator creator)
                                                       throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                              org.bonitasoft.engine.exception.CreationException
        Specified by:
        createRole in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • updateRole

        public org.bonitasoft.engine.identity.Role updateRole​(long roleId,
                                                              org.bonitasoft.engine.identity.RoleUpdater updateDescriptor)
                                                       throws org.bonitasoft.engine.identity.RoleNotFoundException,
                                                              org.bonitasoft.engine.exception.UpdateException
        Specified by:
        updateRole in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.identity.RoleNotFoundException
        org.bonitasoft.engine.exception.UpdateException
      • deleteRole

        public void deleteRole​(long roleId)
                        throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteRole in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteRoles

        public void deleteRoles​(java.util.List<java.lang.Long> roleIds)
                         throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteRoles in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getRole

        public org.bonitasoft.engine.identity.Role getRole​(long roleId)
                                                    throws org.bonitasoft.engine.identity.RoleNotFoundException
        Specified by:
        getRole in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.identity.RoleNotFoundException
      • getRoleByName

        public org.bonitasoft.engine.identity.Role getRoleByName​(java.lang.String roleName)
                                                          throws org.bonitasoft.engine.identity.RoleNotFoundException
        Specified by:
        getRoleByName in interface org.bonitasoft.engine.api.RoleAPI
        Throws:
        org.bonitasoft.engine.identity.RoleNotFoundException
      • getNumberOfRoles

        public long getNumberOfRoles()
        Specified by:
        getNumberOfRoles in interface org.bonitasoft.engine.api.RoleAPI
      • getRoles

        public java.util.List<org.bonitasoft.engine.identity.Role> getRoles​(int startIndex,
                                                                            int maxResults,
                                                                            org.bonitasoft.engine.identity.RoleCriterion criterion)
        Specified by:
        getRoles in interface org.bonitasoft.engine.api.RoleAPI
      • getRoles

        public java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.Role> getRoles​(java.util.List<java.lang.Long> roleIds)
        Specified by:
        getRoles in interface org.bonitasoft.engine.api.RoleAPI
      • searchRoles

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.Role> searchRoles​(org.bonitasoft.engine.search.SearchOptions options)
        Specified by:
        searchRoles in interface org.bonitasoft.engine.api.RoleAPI
      • createGroup

        public org.bonitasoft.engine.identity.Group createGroup​(java.lang.String name,
                                                                java.lang.String parentPath)
                                                         throws org.bonitasoft.engine.exception.CreationException
        Specified by:
        createGroup in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
      • createGroup

        public org.bonitasoft.engine.identity.Group createGroup​(org.bonitasoft.engine.identity.GroupCreator creator)
                                                         throws org.bonitasoft.engine.exception.CreationException
        Specified by:
        createGroup in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
      • updateGroup

        public org.bonitasoft.engine.identity.Group updateGroup​(long groupId,
                                                                org.bonitasoft.engine.identity.GroupUpdater updater)
                                                         throws org.bonitasoft.engine.identity.GroupNotFoundException,
                                                                org.bonitasoft.engine.exception.UpdateException,
                                                                org.bonitasoft.engine.exception.AlreadyExistsException
        Specified by:
        updateGroup in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.identity.GroupNotFoundException
        org.bonitasoft.engine.exception.UpdateException
        org.bonitasoft.engine.exception.AlreadyExistsException
      • deleteGroup

        public void deleteGroup​(long groupId)
                         throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteGroup in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteGroups

        public void deleteGroups​(java.util.List<java.lang.Long> groupIds)
                          throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteGroups in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getGroup

        public org.bonitasoft.engine.identity.Group getGroup​(long groupId)
                                                      throws org.bonitasoft.engine.identity.GroupNotFoundException
        Specified by:
        getGroup in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.identity.GroupNotFoundException
      • getGroupByPath

        public org.bonitasoft.engine.identity.Group getGroupByPath​(java.lang.String groupPath)
                                                            throws org.bonitasoft.engine.identity.GroupNotFoundException
        Specified by:
        getGroupByPath in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.identity.GroupNotFoundException
      • getNumberOfGroups

        public long getNumberOfGroups()
        Specified by:
        getNumberOfGroups in interface org.bonitasoft.engine.api.GroupAPI
      • getGroups

        public java.util.Map<java.lang.Long,​org.bonitasoft.engine.identity.Group> getGroups​(java.util.List<java.lang.Long> groupIds)
        Specified by:
        getGroups in interface org.bonitasoft.engine.api.GroupAPI
      • getGroups

        public java.util.List<org.bonitasoft.engine.identity.Group> getGroups​(int startIndex,
                                                                              int maxResults,
                                                                              org.bonitasoft.engine.identity.GroupCriterion pagingCriterion)
        Specified by:
        getGroups in interface org.bonitasoft.engine.api.GroupAPI
      • searchGroups

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.Group> searchGroups​(org.bonitasoft.engine.search.SearchOptions options)
                                                                                                     throws org.bonitasoft.engine.exception.SearchException
        Specified by:
        searchGroups in interface org.bonitasoft.engine.api.GroupAPI
        Throws:
        org.bonitasoft.engine.exception.SearchException
      • addUserMembership

        public org.bonitasoft.engine.identity.UserMembership addUserMembership​(long userId,
                                                                               long groupId,
                                                                               long roleId)
                                                                        throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                                                               org.bonitasoft.engine.exception.CreationException
        Specified by:
        addUserMembership in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • addUserMemberships

        public void addUserMemberships​(java.util.List<java.lang.Long> userIds,
                                       long groupId,
                                       long roleId)
                                throws org.bonitasoft.engine.exception.AlreadyExistsException,
                                       org.bonitasoft.engine.exception.CreationException
        Specified by:
        addUserMemberships in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.AlreadyExistsException
        org.bonitasoft.engine.exception.CreationException
      • updateUserMembership

        public org.bonitasoft.engine.identity.UserMembership updateUserMembership​(long userMembershipId,
                                                                                  long newGroupId,
                                                                                  long newRoleId)
                                                                           throws org.bonitasoft.engine.exception.UpdateException
        Specified by:
        updateUserMembership in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.UpdateException
      • deleteUserMembership

        public void deleteUserMembership​(long userMembershipId)
                                  throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUserMembership in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteUserMembership

        public void deleteUserMembership​(long userId,
                                         long groupId,
                                         long roleId)
                                  throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUserMembership in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • deleteUserMemberships

        public void deleteUserMemberships​(java.util.List<java.lang.Long> userIds,
                                          long groupId,
                                          long roleId)
                                   throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteUserMemberships in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getUserMembership

        public org.bonitasoft.engine.identity.UserMembership getUserMembership​(long userMembershipId)
                                                                        throws org.bonitasoft.engine.identity.MembershipNotFoundException
        Specified by:
        getUserMembership in interface org.bonitasoft.engine.api.MembershipAPI
        Throws:
        org.bonitasoft.engine.identity.MembershipNotFoundException
      • getNumberOfUserMemberships

        public long getNumberOfUserMemberships​(long userId)
        Specified by:
        getNumberOfUserMemberships in interface org.bonitasoft.engine.api.MembershipAPI
      • getUserMemberships

        public java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMemberships​(long userId,
                                                                                                int startIndex,
                                                                                                int maxResults,
                                                                                                org.bonitasoft.engine.identity.UserMembershipCriterion pagingCrterion)
        Specified by:
        getUserMemberships in interface org.bonitasoft.engine.api.MembershipAPI
      • getUserMembershipsByGroup

        public java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMembershipsByGroup​(long groupId,
                                                                                                       int startIndex,
                                                                                                       int maxResults)
        Specified by:
        getUserMembershipsByGroup in interface org.bonitasoft.engine.api.MembershipAPI
      • getUserMembershipsByRole

        public java.util.List<org.bonitasoft.engine.identity.UserMembership> getUserMembershipsByRole​(long roleId,
                                                                                                      int startIndex,
                                                                                                      int maxResults)
        Specified by:
        getUserMembershipsByRole in interface org.bonitasoft.engine.api.MembershipAPI
      • deleteOrganization

        public void deleteOrganization()
                                throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteOrganization in interface org.bonitasoft.engine.api.OrganizationAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • importOrganization

        public void importOrganization​(java.lang.String organizationContent)
                                throws org.bonitasoft.engine.identity.OrganizationImportException
        Specified by:
        importOrganization in interface org.bonitasoft.engine.api.OrganizationAPI
        Throws:
        org.bonitasoft.engine.identity.OrganizationImportException
      • importOrganization

        public void importOrganization​(java.lang.String organizationContent,
                                       org.bonitasoft.engine.identity.ImportPolicy policy)
                                throws org.bonitasoft.engine.identity.OrganizationImportException
        Specified by:
        importOrganization in interface org.bonitasoft.engine.api.OrganizationAPI
        Throws:
        org.bonitasoft.engine.identity.OrganizationImportException
      • importOrganizationWithWarnings

        public java.util.List<java.lang.String> importOrganizationWithWarnings​(java.lang.String organizationContent,
                                                                               org.bonitasoft.engine.identity.ImportPolicy policy)
                                                                        throws org.bonitasoft.engine.identity.OrganizationImportException
        Specified by:
        importOrganizationWithWarnings in interface org.bonitasoft.engine.api.OrganizationAPI
        Throws:
        org.bonitasoft.engine.identity.OrganizationImportException
      • exportOrganization

        public java.lang.String exportOrganization()
                                            throws org.bonitasoft.engine.identity.OrganizationExportException
        Specified by:
        exportOrganization in interface org.bonitasoft.engine.api.OrganizationAPI
        Throws:
        org.bonitasoft.engine.identity.OrganizationExportException
      • createCustomUserInfoDefinition

        public org.bonitasoft.engine.identity.CustomUserInfoDefinition createCustomUserInfoDefinition​(org.bonitasoft.engine.identity.CustomUserInfoDefinitionCreator creator)
                                                                                               throws org.bonitasoft.engine.exception.CreationException,
                                                                                                      org.bonitasoft.engine.exception.AlreadyExistsException
        Specified by:
        createCustomUserInfoDefinition in interface org.bonitasoft.engine.api.CustomUserInfoAPI
        Throws:
        org.bonitasoft.engine.exception.CreationException
        org.bonitasoft.engine.exception.AlreadyExistsException
      • getCustomUserInfoDefinitions

        public java.util.List<org.bonitasoft.engine.identity.CustomUserInfoDefinition> getCustomUserInfoDefinitions​(int startIndex,
                                                                                                                    int maxResult)
                                                                                                             throws org.bonitasoft.engine.exception.RetrieveException
        Specified by:
        getCustomUserInfoDefinitions in interface org.bonitasoft.engine.api.CustomUserInfoAPI
        Throws:
        org.bonitasoft.engine.exception.RetrieveException
      • getNumberOfCustomInfoDefinitions

        public long getNumberOfCustomInfoDefinitions()
        Specified by:
        getNumberOfCustomInfoDefinitions in interface org.bonitasoft.engine.api.CustomUserInfoAPI
      • deleteCustomUserInfoDefinition

        public void deleteCustomUserInfoDefinition​(long id)
                                            throws org.bonitasoft.engine.exception.DeletionException
        Specified by:
        deleteCustomUserInfoDefinition in interface org.bonitasoft.engine.api.CustomUserInfoAPI
        Throws:
        org.bonitasoft.engine.exception.DeletionException
      • getCustomUserInfo

        public java.util.List<org.bonitasoft.engine.identity.CustomUserInfo> getCustomUserInfo​(long userId,
                                                                                               int startIndex,
                                                                                               int maxResult)
        Specified by:
        getCustomUserInfo in interface org.bonitasoft.engine.api.CustomUserInfoAPI
      • searchCustomUserInfoValues

        public org.bonitasoft.engine.search.SearchResult<org.bonitasoft.engine.identity.CustomUserInfoValue> searchCustomUserInfoValues​(org.bonitasoft.engine.search.SearchOptions options)
        Specified by:
        searchCustomUserInfoValues in interface org.bonitasoft.engine.api.CustomUserInfoAPI
      • setCustomUserInfoValue

        public org.bonitasoft.engine.identity.CustomUserInfoValue setCustomUserInfoValue​(long definitionId,
                                                                                         long userId,
                                                                                         java.lang.String value)
                                                                                  throws org.bonitasoft.engine.exception.UpdateException
        Specified by:
        setCustomUserInfoValue in interface org.bonitasoft.engine.api.CustomUserInfoAPI
        Throws:
        org.bonitasoft.engine.exception.UpdateException
      • getIcon

        public org.bonitasoft.engine.identity.Icon getIcon​(long id)
                                                    throws org.bonitasoft.engine.exception.NotFoundException
        Specified by:
        getIcon in interface org.bonitasoft.engine.api.UserAPI
        Throws:
        org.bonitasoft.engine.exception.NotFoundException