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 Details

    • create

      @PUT @Path("{uid}") void create(@PathParam("uid") String uid, User user) throws ServerFault
      Creates a new User with the given uid. Also creates default calendar, todo elements and the User's mailbox if routing is internal
      Parameters:
      uid - the user's unique id
      user - 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
      Creates a new User with the given uid. Associates an external id to the User
      Parameters:
      uid - the user's unique id
      extId - an external id. Usually used to link the user to an external system
      user - user data
      Throws:
      ServerFault - standard error object
    • update

      @POST @Path("{uid}") void update(@PathParam("uid") String uid, User user) throws ServerFault
      Modifies an existing User
      Parameters:
      uid - the user's unique id
      user - 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 a User by its unique id
      Specified by:
      getComplete in interface IRestoreDirEntryWithMailboxSupport<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 a User 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 a User 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 a User 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

      @DELETE @Path("{uid}") TaskRef delete(@PathParam("uid") String uid) throws ServerFault
      Deletes a User. Also deletes all user related objects and the user's mailbox
      Specified by:
      delete in interface IRestoreDirEntryWithMailboxSupport<User>
      Parameters:
      uid - the user's unique id
      Throws:
      ServerFault - standard error object (unchecked exception)
    • allUids

      @GET @Path("_alluids") List<String> allUids() throws ServerFault
      Retrieve all existing User 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 the User's roles. Replaces all existing role assignments
      Parameters:
      uid - the user's unique id
      roles - 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. Use IDirectory.getByRoles(List) instead
      Retrieves a list of all Users 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 a User. Also includes roles indirectly assigned to the User, for example by its Group memberships
      Parameters:
      uid - the user's unique id
      Returns:
      a list of roles
      Throws:
      ServerFault - standard error object (unchecked exception)
    • getRoles

      @GET @Path("{uid}/roles") Set<String> getRoles(@PathParam("uid") String uid) throws ServerFault
      Retrieves a list of all roles directly owned by a User
      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 a User's password
      Parameters:
      uid - user's unique id
      password - 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 a User's icon/avatar
      Specified by:
      getIcon in interface IDirEntryPhotoSupport
      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 a User's contact informations
      Parameters:
      uid - user's unique id
      userVCard - the new contact informations
      Throws:
      ServerFault - standard error object (unchecked exception)
    • getVCard

      @GET @Path("{uid}/vcard") VCard getVCard(@PathParam("uid") String uid) throws ServerFault
      Retrieves a User's contact informations (VCard)
      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 id
      endpoint - endpoint name (IMAP,MAPI,POP3)
      enable -
    • updateAccountType

      @POST @Path("_updateAccountType/{uid}") void updateAccountType(@PathParam("uid") String uid, BaseDirEntry.AccountType accountType) throws ServerFault
      Modifies a User's
      invalid reference
      net.bluemind.directory.api.AccountType
      Parameters:
      uid - user's unique id
      accountType - the new account type
      Throws:
      ServerFault - standard error object (unchecked exception)
    • getLocale

      @GET @Path("{uid}/locale") String getLocale(@PathParam("uid") String uid) throws ServerFault
      Get User locale
      Returns:
      the locale language value
      Throws:
      ServerFault