Interface IDirectory


@Path("/directory/{domain}") public interface IDirectory
  • Method Details

    • getRoot

      @GET DirEntry getRoot() throws ServerFault
      Fetch the root DirEntry
      Returns:
      DirEntry
      Throws:
      ServerFault - common error object
    • getEntry

      @POST @Path("_entry") DirEntry getEntry(String path) throws ServerFault
      Fetch DirEntry by its path
      Parameters:
      path - path of the directory entry
      domainUid/kind/entryUid to find a particular entry
      domainUid/kind to find all entries of a particular kind
      domainUid to find all entries of a particular domain
      Returns:
      DirEntry or null if not found
      Throws:
      ServerFault - common error object
    • getEntries

      @POST @Path("_childs") List<DirEntry> getEntries(String path) throws ServerFault
      Fetch DirEntrys by their path
      Parameters:
      path - path of the directory entries
      domainUid/kind to find all entries of a particular kind
      domainUid to find all entries of a particular domain
      Returns:
      DirEntrys
      Throws:
      ServerFault - common error object
    • delete

      @DELETE @Path("{path}") TaskRef delete(@PathParam("path") String path) throws ServerFault
      Delete DirEntry by path
      Parameters:
      path - path of the directory entry (domainUid/kind/entryUid)
      This action will fail if a shorter form of the path (like domain or domain/kind) is used and returns multiple entries.
      Throws:
      ServerFault - common error object
    • getVCard

      @GET @Path("{uid}/_vcard") ItemValue<VCard> getVCard(@PathParam("uid") String uid) throws ServerFault
      Parameters:
      uid - the entry uid
      Throws:
      ServerFault - common error object
    • deleteByEntryUid

      @DELETE @Path("_byentryuid/{entryUid}") TaskRef deleteByEntryUid(@PathParam("entryUid") String entryUid) throws ServerFault
      Delete a DirEntry by uid
      Parameters:
      uid - the entry uid
      Throws:
      ServerFault - common error object
    • changeset

      @GET @Path("_changeset") ContainerChangeset<String> changeset(@QueryParam("since") Long since) throws ServerFault
      Get the domain's ContainerChangeset
      Parameters:
      since - timestamp of the first change we want to retrieve
      Returns:
      ContainerChangeset
      Throws:
      ServerFault - common error object
    • search

      @POST @Path("_search") ListResult<ItemValue<DirEntry>> search(DirEntryQuery query) throws ServerFault
      Parameters:
      query - the DirEntryQuery search parameters
      Returns:
      List of matching DirEntrys
      Throws:
      ServerFault - common error object
    • findByEntryUid

      @GET @Path("entry-uid/{entryUid}") DirEntry findByEntryUid(@PathParam("entryUid") String entryUid) throws ServerFault
      Get DirEntry by uid
      Parameters:
      entryUid - the unique DirEntry uid
      Returns:
      matching DirEntry or null if not found
      Throws:
      ServerFault - common error object
    • getEntryIcon

      @GET @Path("entry-uid/{entryUid}/icon") @Produces("image/png") byte[] getEntryIcon(@PathParam("entryUid") String entryUid) throws ServerFault
      Get a DirEntry's icon
      Parameters:
      entryUid - the unique DirEntry uid
      Returns:
      the image data in PNG format or null, if no icon is associated to the DirEntry
      Throws:
      ServerFault - common error object
    • getEntryPhoto

      @GET @Path("entry-uid/{entryUid}/photo") @Produces("image/png") byte[] getEntryPhoto(@PathParam("entryUid") String entryUid) throws ServerFault
      Get a DirEntry's photo
      Parameters:
      entryUid - the unique DirEntry uid
      Returns:
      the image data in PNG format or null, if no photo is associated to the DirEntry
      Throws:
      ServerFault - common error object
    • getIcon

      @GET @Path("_icon/{path}") @Produces("image/png") byte[] getIcon(@PathParam("path") String path) throws ServerFault
      Get a DirEntry's icon
      Parameters:
      path - path of the directory entry (domainUid/kind/entryUid)
      This action will fail if a shorter form of the path (like domain or domain/kind) is used and returns multiple entries.
      Returns:
      the image data in PNG format or null, if no icon is associated to the DirEntry
      Throws:
      ServerFault - common error object
    • getRolesForDirEntry

      @GET @Path("entry-uid/{entryUid}/rolesfor_") Set<String> getRolesForDirEntry(@PathParam("entryUid") String entryUid) throws ServerFault
      Get all the roles associated to an DirEntry
      Parameters:
      entryUid - the unique DirEntry uid
      Returns:
      a set containing all roles associated to a DirEntry
      Throws:
      ServerFault - common error object
    • getRolesForOrgUnit

      @GET @Path("ou-uid/{ouUid}/rolesfor_") Set<String> getRolesForOrgUnit(@PathParam("ouUid") String orgUnitUid) throws ServerFault
      Get all the roles associated to an OrgUnit
      Parameters:
      orgUnitUid - the unique OrgUnit's id
      Returns:
      a set containing all roles associated to an OrgUnit
      Throws:
      ServerFault - common error object
    • getByRoles

      @POST @Path("_byroles") List<ItemValue<DirEntry>> getByRoles(List<String> roles) throws ServerFault
      Parameters:
      roles -
      Returns:
      Throws:
      ServerFault
    • getByEmail

      @GET @Path("_byEmail/{email}") DirEntry getByEmail(@PathParam("email") String email)
      Fetch a DirEntry by its email address
      Parameters:
      email - the DirEntry's email address
      Returns:
      the matching DirEntry or null, if not found
    • getMultiple

      @POST @Path("_mget") List<ItemValue<DirEntry>> getMultiple(List<String> id)
      Fetch a list of net.bluemind.core.container.model(DirEntry) by their internal numerical ids
      Parameters:
      id - list of internal numerical ids
      Returns:
      list of matching DirEntry's