Package net.bluemind.domain.api
Interface IDomains
- All Known Subinterfaces:
IInCoreDomains
@Path("/domains")
public interface IDomains
Manage domain.
-
Method Summary
Modifier and TypeMethodDescriptionall()
Fetch all domains.void
Creates a newDomain
.void
Delete theDomain
item itself.deleteDomainItems
(String uid) Delete data linked to theDomain
.findByNameOrAliases
(String name) Fetch aDomain
by its name or one of its alias.Fetch aDomain
by its uid.getExternalUrl
(String domainUid) Get effective domain external-url.setAliases
(String uid, Set<String> aliases) Define domain aliases.void
setDefaultAlias
(String uid, String defaultAlias) Define the domain default alias.void
void
Modify an existingDomain
.
-
Method Details
-
create
Creates a newDomain
.- Parameters:
domain
-Domain
- Throws:
ServerFault
- standard error object
-
update
Modify an existingDomain
.- Parameters:
uid
-Domain
's unique iddomain
- updatedDomain
- Throws:
ServerFault
- standard error object
-
delete
Delete theDomain
item itself. You must call first deleteDomainItems to delete domain's data. This operation is forbidden if there are still linked data.- Parameters:
uid
-Domain
's unique id- Throws:
ServerFault
- standard error object
-
deleteDomainItems
@DELETE @Path("{uid}/_items") TaskRef deleteDomainItems(@PathParam("uid") String uid) throws ServerFault Delete data linked to theDomain
. You must call this operation before deleting the domain itself. According to the data quantity this operation can be very long, you can follow its progression with the returnedTaskRef
.- Parameters:
uid
-Domain
's unique id- Returns:
- a
TaskRef
to track operation progress - Throws:
ServerFault
- standard error object
-
get
Fetch aDomain
by its uid.- Parameters:
uid
-Domain
's unique id- Returns:
Domain
invalid reference
net.bluemind.core.container.api.ItemValue
Domain
does not exist- Throws:
ServerFault
- standard error object
-
all
Fetch all domains.- Returns:
- a list of all
Domain
invalid reference
net.bluemind.core.container.api.ItemValue
- Throws:
ServerFault
- standard error object
-
setAliases
@POST @Path("{uid}/_aliases") TaskRef setAliases(@PathParam("uid") String uid, Set<String> aliases) throws ServerFault Define domain aliases. If your domain already has aliases, you need to fetch them first and then call this setAliases operation with all desired aliases.- Parameters:
uid
-Domain
's unique idaliases
- set of aliases- Returns:
- a
TaskRef
to track operation progress - Throws:
ServerFault
- standard error object
-
setDefaultAlias
@POST @Path("{uid}/_default_alias") void setDefaultAlias(@PathParam("uid") String uid, String defaultAlias) throws ServerFault Define the domain default alias. The default alias is the name which appears in the adminconsole when adding/modifying a domain "name". The default alias is used as the default domain name to use when creating a new email account. The default alias must be contained within the domain aliases.- Parameters:
uid
-Domain
's unique iddefaultAlias
- default domain name- Throws:
ServerFault
- standard error object
-
findByNameOrAliases
@GET @Path("_lookup") ItemValue<Domain> findByNameOrAliases(@QueryParam("name") String name) throws ServerFault Fetch aDomain
by its name or one of its alias.- Parameters:
name
-Domain
's name or alias- Returns:
Domain
invalid reference
net.bluemind.core.container.api.ItemValue
Domain
match- Throws:
ServerFault
- standard error object
-
setRoles
@POST @Path("{uid}/roles") void setRoles(@PathParam("uid") String uid, Set<String> roles) throws ServerFault - Throws:
ServerFault
-
getRoles
- Throws:
ServerFault
-
getExternalUrl
Get effective domain external-url.- Parameters:
domainUid
-Domain
's unique id- Returns:
- domain external URL if defined, global external URL otherwisegitk
-