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 existingUseruidsFetches aUserby its emailFetches aUserby its external idFetches aUserby its loginvoidCreates a newUserwith the given uid.voidcreateWithExtId(String uid, String extId, User user) Creates a newUserwith the given uid.Deletes aUser.voidenablePerUserLog(String userUid, String endpoint, boolean enable) Toggle advanced per user logging for the specified productgetComplete(String uid) Fetches aUserby its unique idbyte[]Retrieves aUser's icon/avatarFetches aUserby its unique id, without vcard or mailboxGetUserlocalegetMultipleVcardOnly(List<String> uids) Fetches a list of UsergetResolvedRoles(String uid) Retrieves a list of all roles owned by aUser.Retrieves a list of all roles directly owned by aUsergetUsersWithRoles(List<String> roles) Deprecated.This method may return group entities as well.voidsetPassword(String uid, ChangePassword password) Update aUser's passwordvoidSets theUser's roles.voidModifies an existingUservoidupdateAccountType(String uid, BaseDirEntry.AccountType accountType) Modifies aUser'sinvalid reference
net.bluemind.directory.api.AccountTypevoidupdateVCard(String uid, VCard userVCard) Updates aUser's contact informationsMethods inherited from interface net.bluemind.directory.api.IDirEntryExtIdSupport
setExtIdMethods inherited from interface net.bluemind.directory.api.IDirEntryPhotoSupport
deletePhoto, getPhoto, setPhotoMethods inherited from interface net.bluemind.group.api.IGroupMember
memberOf, memberOfGroupsMethods inherited from interface net.bluemind.core.container.api.IRestoreSupport
get, itemValueExists, restore
-
Method Details
-
create
Creates a newUserwith 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 aUserby its unique id- Specified by:
getCompletein 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)
-
getMultipleVcardOnly
@POST @Path("_mgetvcardonly") List<ItemValue<User>> getMultipleVcardOnly(List<String> uids) throws ServerFault Fetches a list of User- Parameters:
uids- the user's unique ids- Returns:
- the list of users
- Throws:
ServerFault- standard error object (unchecked exception)
-
getLight
Fetches aUserby its unique id, without vcard or mailbox- Parameters:
uid-- Returns:
- Throws:
ServerFault
-
byEmail
@GET @Path("byEmail/{email}") ItemValue<User> byEmail(@PathParam("email") String email) throws ServerFault Fetches aUserby 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 aUserby 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 aUserby 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:
deletein interfaceIRestoreDirEntryWithMailboxSupport<User>- Parameters:
uid- the user's unique id- Throws:
ServerFault- standard error object (unchecked exception)
-
allUids
Retrieve all existingUseruids- Returns:
- a list of all existing
Useruids - 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 allUsers 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 itsGroupmemberships- 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:
getIconin 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
GetUserlocale- Returns:
- the locale language value
- Throws:
ServerFault
-