public interface IdAdminSession extends OsidSession
This session is used to manually create new Ids.
Modifier and Type | Method and Description |
---|---|
void |
aliasId(Id primaryId,
Id equivalentId)
Makes two
Ids equivalent. |
boolean |
canAliasIds()
Tests if this user can alias
Ids. |
boolean |
canCreateIds()
Tests if this user can create
Ids. |
Id |
createId(IdForm idForm)
Creates a new
Id. |
IdForm |
getIdFormForCreate()
Gets the
Id form for creating new Ids. |
void |
removeAlias(Id primaryId,
Id equivalentId)
Removes equivalence from two
Ids. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canCreateIds()
Ids.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known create methods in this session will result
in a PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer create operations. false
if create methods are not authorized,
true
otherwisemandatory
- This method must be implemented. IdForm getIdFormForCreate() throws OperationFailedException, PermissionDeniedException
Id
form for creating new Ids. A new form
should be requested for each create transaction. Id
formOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Id createId(IdForm idForm) throws AlreadyExistsException, OperationFailedException, PermissionDeniedException
Id.
A new IdForm
should be
requested for each create transaction.idForm
- the Id
form Id
AlreadyExistsException
- an Id
for the
authority, namespace, and identifier already existsIllegalStateException
- idForm
already
used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- idForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- idForm
did not
originate from getIdFormForCreate()
mandatory
- This method must be implemented. boolean canAliasIds()
Ids.
A return of true does
not guarantee successful authorization. A return of false indicates
that it is known add methods in this session will result in a
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer alias operations. false
if alias methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void aliasId(Id primaryId, Id equivalentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids
equivalent. The primary and equivalent
Ids
are already known to this service .
If the external Id
is already mapped to another
Id,
it is changed to map to the given primary Id.
Calls to IdLookupSession.getId(equivalentId)
return the primaryId.
primaryId
- the primary Id
equivalentId
- an Id
to be made equivalentNotFoundException
- primaryId
or
equivalentId
is not foundNullArgumentException
- primaryId
or
equivalentId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void removeAlias(Id primaryId, Id equivalentId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Ids.
primaryId
- the primary Id
equivalentId
- the equivalent Id
NotFoundException
- primaryId
or
equivalentId
is not found or equivalentId
not mapped to primaryId
NullArgumentException
- primaryId
or
equivalentId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.