public interface PersonRealmAssignmentSession extends OsidSession
This session provides methods to re-assign Persons
to
Bilings.
A Person
may map to multiple
Realms
and removing the last reference to a Person
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 a Person
to another Realm
is not a copy operation (eg: does not change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignPersonToRealm(Id personId,
Id realmId)
Adds an existing
Person to a Realm. |
boolean |
canAssignPersons()
Tests if this user can alter person/realm mappings.
|
boolean |
canAssignPersonsToRealm(Id realmId)
Tests if this user can alter person/realm mappings.
|
IdList |
getAssignableRealmIds(Id realmId)
Gets a list of realms including and under the given realm node in
which any person can be assigned.
|
IdList |
getAssignableRealmIdsForPerson(Id realmId,
Id personId)
Gets a list of realms including and under the given realm node in
which a specific person can be assigned.
|
void |
unassignPersonFromRealm(Id personId,
Id realmId)
Removes a
Person from a Realm. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignPersons()
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 canAssignPersonsToRealm(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 getAssignableRealmIdsForPerson(Id realmId, Id personId) throws OperationFailedException
realmId
- the Id
of the Realm
personId
- the Id
of the Person
Ids
NullArgumentException
- realmId
or
personId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignPersonToRealm(Id personId, Id realmId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Person
to a Realm.
personId
- the Id
of the Person
realmId
- the Id
of the Realm
AlreadyExistsException
- personId
already assigned to realmId
NotFoundException
- personId
or
realmId
not foundNullArgumentException
- personId
or
realmId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignPersonFromRealm(Id personId, Id realmId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Person
from a Realm.
personId
- the Id
of the Person
realmId
- the Id
of the Realm
NotFoundException
- personId
or
realmId
not found or personId
not
mapped to realmId
NullArgumentException
- personId
or
realmId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.