Package net.bluemind.directory.api
Interface IDirectory
@Path("/directory/{domain}")
public interface IDirectory
-
Method Summary
Modifier and TypeMethodDescriptionGet the domain'sContainerChangeset
DeleteDirEntry
by pathdeleteByEntryUid
(String entryUid) Delete aDirEntry
by uidfindByEntryUid
(String entryUid) GetDirEntry
by uidgetByEmail
(String email) Fetch aDirEntry
by its email addressgetByRoles
(List<String> roles) getEntries
(String path) FetchDirEntry
s by their pathFetchDirEntry
by its pathbyte[]
getEntryIcon
(String entryUid) Get aDirEntry
's iconbyte[]
getEntryPhoto
(String entryUid) Get aDirEntry
's photobyte[]
Get aDirEntry
's icongetMultiple
(List<String> id) Fetch a list ofnet.bluemind.core.container.model
(DirEntry
) by their internal numerical idsgetRolesForDirEntry
(String entryUid) Get all the roles associated to anDirEntry
getRolesForOrgUnit
(String orgUnitUid) Get all the roles associated to anOrgUnit
getRoot()
Fetch the rootDirEntry
search
(DirEntryQuery query) SearchDirEntry
s byDirEntryQuery
-
Method Details
-
getRoot
Fetch the rootDirEntry
- Returns:
DirEntry
- Throws:
ServerFault
- common error object
-
getEntry
FetchDirEntry
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
FetchDirEntry
s 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:
DirEntry
s- Throws:
ServerFault
- common error object
-
delete
DeleteDirEntry
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 aDirEntry
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'sContainerChangeset
- 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 SearchDirEntry
s byDirEntryQuery
- Parameters:
query
- theDirEntryQuery
search parameters- Returns:
- List of matching
DirEntry
s - Throws:
ServerFault
- common error object
-
findByEntryUid
@GET @Path("entry-uid/{entryUid}") DirEntry findByEntryUid(@PathParam("entryUid") String entryUid) throws ServerFault GetDirEntry
by uid- Parameters:
entryUid
- the uniqueDirEntry
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 aDirEntry
's icon- Parameters:
entryUid
- the uniqueDirEntry
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 aDirEntry
's photo- Parameters:
entryUid
- the uniqueDirEntry
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 aDirEntry
'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 anDirEntry
- Parameters:
entryUid
- the uniqueDirEntry
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 anOrgUnit
- Parameters:
orgUnitUid
- the uniqueOrgUnit
's id- Returns:
- a set containing all roles associated to an
OrgUnit
- Throws:
ServerFault
- common error object
-
getByRoles
- Parameters:
roles
-- Returns:
- Throws:
ServerFault
-
getByEmail
Fetch aDirEntry
by its email address -
getMultiple
Fetch a list ofnet.bluemind.core.container.model
(DirEntry
) by their internal numerical ids- Parameters:
id
- list of internal numerical ids- Returns:
- list of matching
DirEntry
's
-
xfer
@POST @Path("_xfer/{entryUid}/{serverUid}") TaskRef xfer(@PathParam("entryUid") String entryUid, @PathParam("serverUid") String serverUid) throws ServerFault Transfer aDirEntry
to a differentServer
This transfers all database related data as well as all emails to the new server. This action can potentially take a very long time- Parameters:
entryUid
- the uniqueDirEntry
uidserverUid
- the uniqueServer
uid- Returns:
- a
TaskRef
referencing this operation - Throws:
ServerFault
- common error object
-