public interface OrganizationRealmAssignmentSession extends OsidSession
This session provides methods to re-assign Organizations
to Bilings.
An Organization
may map to
multiple Realms
and removing the last reference to an
Organization
is the equivalent of deleting it. Each
Realm
may have its own authorizations governing who is allowed to
operate on it.
Adding a reference of an Organization
to another
Realm
is not a copy operation (eg: does not change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignOrganizationToRealm(Id organizationId,
Id realmId)
Adds an existing
Organization to a Realm. |
boolean |
canAssignOrganizations()
Tests if this user can alter organization/realm mappings.
|
boolean |
canAssignOrganizationsToRealm(Id realmId)
Tests if this user can alter organization/realm mappings.
|
IdList |
getAssignableRealmIds(Id realmId)
Gets a list of realms including and under the given realm node in
which any organization can be assigned.
|
IdList |
getAssignableRealmIdsForOrganization(Id realmId,
Id organizationId)
Gets a list of realms including and under the given realm node in
which a specific organization can be assigned.
|
void |
unassignOrganizationFromRealm(Id organizationId,
Id realmId)
Removes an
Organization from a Realm. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignOrganizations()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer lookup operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignOrganizationsToRealm(Id realmId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.realmId
- the Id
of the Realm
false
if mapping is not authorized, true
otherwiseNullArgumentException
- realmId
is
null
mandatory
- This method must be implemented. IdList getAssignableRealmIds(Id realmId) throws OperationFailedException
realmId
- the Id
of the Realm
Ids
NullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableRealmIdsForOrganization(Id realmId, Id organizationId) throws OperationFailedException
realmId
- the Id
of the Realm
organizationId
- the Id
of the
Organization
Ids
NullArgumentException
- realmId
or
organizationId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignOrganizationToRealm(Id organizationId, Id realmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Organization
to a Realm.
organizationId
- the Id
of the
Organization
realmId
- the Id
of the Realm
AlreadyExistsException
- organizationId
already assigned to realmId
NotFoundException
- organizationId
or
realmId
not foundNullArgumentException
- organizationId
or realmId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignOrganizationFromRealm(Id organizationId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Organization
from a Realm.
organizationId
- the Id
of the
Organization
realmId
- the Id
of the Realm
NotFoundException
- organizationId
or
realmId
not found or organizationId
not mapped to realmId
NullArgumentException
- organizationId
or realmId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.