Package net.bluemind.user.api
Interface IUser
- All Superinterfaces:
IDirEntryExtIdSupport
,IDirEntryPhotoSupport
,IGroupMember
,IRestoreDirEntryWithMailboxSupport<User>
,IRestoreSupport<User>
@Path("/users/{domainUid}")
public interface IUser
extends IDirEntryPhotoSupport, IDirEntryExtIdSupport, IRestoreDirEntryWithMailboxSupport<User>, IGroupMember
User
API. {domainUid} corresponds to the fully qualified domain name-
Method Summary
Modifier and TypeMethodDescriptionallUids()
Retrieve all existingUser
uidsFetches aUser
by its emailFetches aUser
by its external idFetches aUser
by its loginvoid
Creates a newUser
with the given uid.void
createWithExtId
(String uid, String extId, User user) Creates a newUser
with the given uid.Deletes aUser
.void
enablePerUserLog
(String userUid, String endpoint, boolean enable) Toggle advanced per user logging for the specified productgetComplete
(String uid) Fetches aUser
by its unique idbyte[]
Retrieves aUser
's icon/avatarGetUser
localegetResolvedRoles
(String uid) Retrieves a list of all roles owned by aUser
.Retrieves a list of all roles directly owned by aUser
getUsersWithRoles
(List<String> roles) Deprecated.This method may return group entities as well.void
setPassword
(String uid, ChangePassword password) Update aUser
's passwordvoid
Sets theUser
's roles.void
Modifies an existingUser
void
updateAccountType
(String uid, BaseDirEntry.AccountType accountType) Modifies aUser
'sinvalid reference
net.bluemind.directory.api.AccountType
void
updateVCard
(String uid, VCard userVCard) Updates aUser
's contact informationsMethods inherited from interface net.bluemind.directory.api.IDirEntryExtIdSupport
setExtId
Methods inherited from interface net.bluemind.directory.api.IDirEntryPhotoSupport
deletePhoto, getPhoto, setPhoto
Methods inherited from interface net.bluemind.group.api.IGroupMember
memberOf, memberOfGroups
Methods inherited from interface net.bluemind.core.container.api.IRestoreSupport
get, restore
-
Method Details
-
create
Creates a newUser
with the given uid. Also creates default calendar, todo elements and theUser
's mailbox if routing is internal- Parameters:
uid
- the user's unique iduser
- user data- Throws:
ServerFault
- standard error object (unchecked exception)
-
createWithExtId
@PUT @Path("{uid}/{extid}/createwithextid") void createWithExtId(@PathParam("uid") String uid, @PathParam("extid") String extId, User user) throws ServerFault - Parameters:
uid
- the user's unique idextId
- an external id. Usually used to link the user to an external systemuser
- user data- Throws:
ServerFault
- standard error object
-
update
Modifies an existingUser
- Parameters:
uid
- the user's unique iduser
- the new user values- Throws:
ServerFault
- standard error object (unchecked exception)
-
getComplete
@GET @Path("{uid}/complete") ItemValue<User> getComplete(@PathParam("uid") String uid) throws ServerFault Fetches aUser
by its unique id- Specified by:
getComplete
in interfaceIRestoreDirEntryWithMailboxSupport<User>
- Parameters:
uid
- the user's unique id- Returns:
- the user item value, or null if the user does not exist
- Throws:
ServerFault
- standard error object (unchecked exception)
-
byEmail
@GET @Path("byEmail/{email}") ItemValue<User> byEmail(@PathParam("email") String email) throws ServerFault Fetches aUser
by its email- Parameters:
email
- the user's email- Returns:
- the user item value, or null if the user does not exist
- Throws:
ServerFault
- standard error object (unchecked exception)
-
byExtId
@GET @Path("byExtId/{extid}") ItemValue<User> byExtId(@PathParam("extid") String extId) throws ServerFault Fetches aUser
by its external id- Parameters:
extId
- the user's external id- Returns:
- the user item value, or null if the user does not exist
- Throws:
ServerFault
- standard error object (unchecked exception)
-
byLogin
@GET @Path("byLogin/{login}") ItemValue<User> byLogin(@PathParam("login") String login) throws ServerFault Fetches aUser
by its login- Parameters:
login
- the user's login- Returns:
- the user item value, or null if the user does not exist
- Throws:
ServerFault
- standard error object (unchecked exception)
-
delete
Deletes aUser
. Also deletes all user related objects and the user's mailbox- Specified by:
delete
in interfaceIRestoreDirEntryWithMailboxSupport<User>
- Parameters:
uid
- the user's unique id- Throws:
ServerFault
- standard error object (unchecked exception)
-
allUids
Retrieve all existingUser
uids- Returns:
- a list of all existing
User
uids - Throws:
ServerFault
- standard error object (unchecked exception)
-
setRoles
@POST @Path("{uid}/roles") void setRoles(@PathParam("uid") String uid, Set<String> roles) throws ServerFault Sets theUser
's roles. Replaces all existing role assignments- Parameters:
uid
- the user's unique idroles
- a set of roles to be assigned to the user- Throws:
ServerFault
- standard error object (unchecked exception)
-
getUsersWithRoles
@Deprecated @POST @Path("_roleusers") Set<String> getUsersWithRoles(List<String> roles) throws ServerFault Deprecated.This method may return group entities as well. UseIDirectory.getByRoles(List)
insteadRetrieves a list of allUser
s owning all of the provided roles- Parameters:
roles
- a list of roles- Returns:
- a list of users owning all provided roles
- Throws:
ServerFault
- standard error object (unchecked exception)
-
getResolvedRoles
@GET @Path("{uid}/roles_resolved") Set<String> getResolvedRoles(@PathParam("uid") String uid) throws ServerFault Retrieves a list of all roles owned by aUser
. Also includes roles indirectly assigned to theUser
, for example by itsGroup
memberships- Parameters:
uid
- the user's unique id- Returns:
- a list of roles
- Throws:
ServerFault
- standard error object (unchecked exception)
-
getRoles
Retrieves a list of all roles directly owned by aUser
- Parameters:
the
- user's unique id- Returns:
- a list of roles
- Throws:
ServerFault
- standard error object (unchecked exception)
-
setPassword
@POST @Path("{uid}/password_") void setPassword(@PathParam("uid") String uid, ChangePassword password) throws ServerFault Update aUser
's password- Parameters:
uid
- user's unique idpassword
- object containing the current and new password- Throws:
ServerFault
- standard error object (unchecked exception)
-
getIcon
@GET @Path("{uid}/icon") @Produces("image/png") byte[] getIcon(@PathParam("uid") String uid) throws ServerFault Retrieves aUser
's icon/avatar- Specified by:
getIcon
in interfaceIDirEntryPhotoSupport
- Parameters:
uid
- user's unique id- Returns:
- a byte array containing an icon in png format
- Throws:
ServerFault
- standard error object (unchecked exception)
-
updateVCard
@POST @Path("{uid}/vcard") void updateVCard(@PathParam("uid") String uid, VCard userVCard) throws ServerFault Updates aUser
's contact informations- Parameters:
uid
- user's unique iduserVCard
- the new contact informations- Throws:
ServerFault
- standard error object (unchecked exception)
-
getVCard
- Parameters:
uid
- user's unique id- Returns:
- the user's contact informations
- Throws:
ServerFault
- standard error object (unchecked exception)
-
enablePerUserLog
@POST @Path("{userUid}/_logging/{endpoint}") void enablePerUserLog(@PathParam("userUid") String userUid, @PathParam("endpoint") String endpoint, boolean enable) Toggle advanced per user logging for the specified product- Parameters:
userUid
- user's unique idendpoint
- endpoint name (IMAP,MAPI,POP3)enable
-
-
updateAccountType
@POST @Path("_updateAccountType/{uid}") void updateAccountType(@PathParam("uid") String uid, BaseDirEntry.AccountType accountType) throws ServerFault Modifies aUser
'sinvalid reference
net.bluemind.directory.api.AccountType
- Parameters:
uid
- user's unique idaccountType
- the new account type- Throws:
ServerFault
- standard error object (unchecked exception)
-
getLocale
GetUser
locale- Returns:
- the locale language value
- Throws:
ServerFault
-