public class IdentityAPIImpl extends Object implements IdentityAPI
Constructor and Description |
---|
IdentityAPIImpl() |
protected TenantServiceAccessor getTenantAccessor()
public User createUser(String userName, String password) throws AlreadyExistsException, CreationException
createUser
in interface UserAPI
AlreadyExistsException
CreationException
public User createUser(String userName, String password, String firstName, String lastName) throws AlreadyExistsException, CreationException
createUser
in interface UserAPI
AlreadyExistsException
CreationException
public User createUser(UserCreator creator) throws CreationException
createUser
in interface UserAPI
CreationException
public User updateUser(long userId, UserUpdater updater) throws UserNotFoundException, UpdateException
updateUser
in interface UserAPI
UserNotFoundException
UpdateException
public void deleteUser(long userId) throws DeletionException
deleteUser
in interface UserAPI
DeletionException
public void deleteUser(String userName) throws DeletionException
deleteUser
in interface UserAPI
DeletionException
public void deleteUsers(List<Long> userIds) throws DeletionException
deleteUsers
in interface UserAPI
DeletionException
public User getUser(long userId) throws UserNotFoundException
getUser
in interface UserAPI
UserNotFoundException
public User getUserByUserName(String userName) throws UserNotFoundException
getUserByUserName
in interface UserAPI
UserNotFoundException
public UserWithContactData getUserWithProfessionalDetails(long userId) throws UserNotFoundException
getUserWithProfessionalDetails
in interface UserAPI
UserNotFoundException
public ContactData getUserContactData(long userId, boolean personal) throws UserNotFoundException
getUserContactData
in interface UserAPI
UserNotFoundException
public long getNumberOfUsers()
getNumberOfUsers
in interface UserAPI
public List<User> getUsers(int startIndex, int maxResults, UserCriterion criterion)
public Map<String,User> getUsersByUsernames(List<String> userNames)
getUsersByUsernames
in interface UserAPI
public SearchResult<User> searchUsers(SearchOptions options) throws SearchException
searchUsers
in interface UserAPI
SearchException
public long getNumberOfUsersInRole(long roleId)
getNumberOfUsersInRole
in interface UserAPI
public List<User> getUsersInRole(long roleId, int startIndex, int maxResults, UserCriterion criterion)
getUsersInRole
in interface UserAPI
public List<User> getActiveUsersInRole(long roleId, int startIndex, int maxResults, UserCriterion criterion)
getActiveUsersInRole
in interface UserAPI
public List<User> getInactiveUsersInRole(long roleId, int startIndex, int maxResults, UserCriterion criterion)
getInactiveUsersInRole
in interface UserAPI
public List<User> getUsersWithManager(long managerId, int startIndex, int maxResults, UserCriterion criterion)
getUsersWithManager
in interface UserAPI
public List<User> getActiveUsersWithManager(long managerId, int startIndex, int maxResults, UserCriterion criterion)
getActiveUsersWithManager
in interface UserAPI
public List<User> getInactiveUsersWithManager(long managerId, int startIndex, int maxResults, UserCriterion criterion)
getInactiveUsersWithManager
in interface UserAPI
public long getNumberOfUsersInGroup(long groupId)
getNumberOfUsersInGroup
in interface UserAPI
public List<User> getUsersInGroup(long groupId, int startIndex, int maxResults, UserCriterion criterion)
getUsersInGroup
in interface UserAPI
public List<User> getActiveUsersInGroup(long groupId, int startIndex, int maxResults, UserCriterion criterion)
getActiveUsersInGroup
in interface UserAPI
public List<User> getInactiveUsersInGroup(long groupId, int startIndex, int maxResults, UserCriterion criterion)
getInactiveUsersInGroup
in interface UserAPI
public List<Long> getUserIdsWithCustomUserInfo(String infoName, String infoValue, boolean usePartialMatch, int startIndex, int maxResults)
getUserIdsWithCustomUserInfo
in interface UserAPI
public Role createRole(String roleName) throws AlreadyExistsException, CreationException
createRole
in interface RoleAPI
AlreadyExistsException
CreationException
public Role createRole(RoleCreator creator) throws AlreadyExistsException, CreationException
createRole
in interface RoleAPI
AlreadyExistsException
CreationException
public Role updateRole(long roleId, RoleUpdater updateDescriptor) throws RoleNotFoundException, UpdateException
updateRole
in interface RoleAPI
RoleNotFoundException
UpdateException
public void deleteRole(long roleId) throws DeletionException
deleteRole
in interface RoleAPI
DeletionException
public void deleteRoles(List<Long> roleIds) throws DeletionException
deleteRoles
in interface RoleAPI
DeletionException
public Role getRole(long roleId) throws RoleNotFoundException
getRole
in interface RoleAPI
RoleNotFoundException
public Role getRoleByName(String roleName) throws RoleNotFoundException
getRoleByName
in interface RoleAPI
RoleNotFoundException
public long getNumberOfRoles()
getNumberOfRoles
in interface RoleAPI
public List<Role> getRoles(int startIndex, int maxResults, RoleCriterion criterion)
public SearchResult<Role> searchRoles(SearchOptions options)
searchRoles
in interface RoleAPI
public Group createGroup(String name, String parentPath) throws CreationException
createGroup
in interface GroupAPI
CreationException
public Group createGroup(GroupCreator creator) throws CreationException
createGroup
in interface GroupAPI
CreationException
public Group updateGroup(long groupId, GroupUpdater updater) throws GroupNotFoundException, UpdateException, AlreadyExistsException
updateGroup
in interface GroupAPI
GroupNotFoundException
UpdateException
AlreadyExistsException
public void deleteGroup(long groupId) throws DeletionException
deleteGroup
in interface GroupAPI
DeletionException
public void deleteGroups(List<Long> groupIds) throws DeletionException
deleteGroups
in interface GroupAPI
DeletionException
public Group getGroup(long groupId) throws GroupNotFoundException
getGroup
in interface GroupAPI
GroupNotFoundException
public Group getGroupByPath(String groupPath) throws GroupNotFoundException
getGroupByPath
in interface GroupAPI
GroupNotFoundException
public long getNumberOfGroups()
getNumberOfGroups
in interface GroupAPI
public List<Group> getGroups(int startIndex, int maxResults, GroupCriterion pagingCriterion)
public SearchResult<Group> searchGroups(SearchOptions options) throws SearchException
searchGroups
in interface GroupAPI
SearchException
public UserMembership addUserMembership(long userId, long groupId, long roleId) throws AlreadyExistsException, CreationException
addUserMembership
in interface MembershipAPI
AlreadyExistsException
CreationException
public void addUserMemberships(List<Long> userIds, long groupId, long roleId) throws AlreadyExistsException, CreationException
addUserMemberships
in interface MembershipAPI
AlreadyExistsException
CreationException
public UserMembership updateUserMembership(long userMembershipId, long newGroupId, long newRoleId) throws UpdateException
updateUserMembership
in interface MembershipAPI
UpdateException
public void deleteUserMembership(long userMembershipId) throws DeletionException
deleteUserMembership
in interface MembershipAPI
DeletionException
public void deleteUserMembership(long userId, long groupId, long roleId) throws DeletionException
deleteUserMembership
in interface MembershipAPI
DeletionException
public void deleteUserMemberships(List<Long> userIds, long groupId, long roleId) throws DeletionException
deleteUserMemberships
in interface MembershipAPI
DeletionException
public UserMembership getUserMembership(long userMembershipId) throws MembershipNotFoundException
getUserMembership
in interface MembershipAPI
MembershipNotFoundException
public long getNumberOfUserMemberships(long userId)
getNumberOfUserMemberships
in interface MembershipAPI
public List<UserMembership> getUserMemberships(long userId, int startIndex, int maxResults, UserMembershipCriterion pagingCrterion)
getUserMemberships
in interface MembershipAPI
public List<UserMembership> getUserMembershipsByGroup(long groupId, int startIndex, int maxResults)
getUserMembershipsByGroup
in interface MembershipAPI
public List<UserMembership> getUserMembershipsByRole(long roleId, int startIndex, int maxResults)
getUserMembershipsByRole
in interface MembershipAPI
public void deleteOrganization() throws DeletionException
deleteOrganization
in interface OrganizationAPI
DeletionException
public void importOrganization(String organizationContent) throws OrganizationImportException
importOrganization
in interface OrganizationAPI
OrganizationImportException
public void importOrganization(String organizationContent, ImportPolicy policy) throws OrganizationImportException
importOrganization
in interface OrganizationAPI
OrganizationImportException
public List<String> importOrganizationWithWarnings(String organizationContent, ImportPolicy policy) throws OrganizationImportException
importOrganizationWithWarnings
in interface OrganizationAPI
OrganizationImportException
public String exportOrganization() throws OrganizationExportException
exportOrganization
in interface OrganizationAPI
OrganizationExportException
public CustomUserInfoDefinition createCustomUserInfoDefinition(CustomUserInfoDefinitionCreator creator) throws CreationException, AlreadyExistsException
createCustomUserInfoDefinition
in interface CustomUserInfoAPI
CreationException
AlreadyExistsException
public List<CustomUserInfoDefinition> getCustomUserInfoDefinitions(int startIndex, int maxResult) throws RetrieveException
getCustomUserInfoDefinitions
in interface CustomUserInfoAPI
RetrieveException
public long getNumberOfCustomInfoDefinitions()
getNumberOfCustomInfoDefinitions
in interface CustomUserInfoAPI
public void deleteCustomUserInfoDefinition(long id) throws DeletionException
deleteCustomUserInfoDefinition
in interface CustomUserInfoAPI
DeletionException
public List<CustomUserInfo> getCustomUserInfo(long userId, int startIndex, int maxResult)
getCustomUserInfo
in interface CustomUserInfoAPI
public SearchResult<CustomUserInfoValue> searchCustomUserInfoValues(SearchOptions options)
searchCustomUserInfoValues
in interface CustomUserInfoAPI
public CustomUserInfoValue setCustomUserInfoValue(long definitionId, long userId, String value) throws UpdateException
setCustomUserInfoValue
in interface CustomUserInfoAPI
UpdateException
public Icon getIcon(long id) throws NotFoundException
getIcon
in interface UserAPI
NotFoundException
Copyright © 2018 Bonitasoft S.A.. All rights reserved.