Interface IdAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
IdBatchAdminSession
This session is used to manually create new Ids .
-
Method Summary
Modifier and TypeMethodDescriptionvoidMakes twoIdsequivalent.booleanTests if this user can aliasIds.booleanTests if this user can createIds.Creates a newId.Gets theIdform for creating new Ids.voidremoveAlias(Id id, Id aliasId) Removes an alias.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canCreateIds
boolean canCreateIds()Tests if this user can createIds. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations.- Returns:
falseif create methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getIdFormForCreate
Gets theIdform for creating new Ids. A new form should be requested for each create transaction.- Returns:
- the
Idform - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
createId
Id createId(IdForm idForm) throws AlreadyExistsException, OperationFailedException, PermissionDeniedException Creates a newId. A newIdFormshould be requested for each create transaction.- Parameters:
idForm- theIdform- Returns:
- the created
Id - Throws:
AlreadyExistsException- anIdfor the authority, namespace, and identifier already existsIllegalStateException-idFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-idFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-idFormdid not originate fromgetIdFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canAliasIds
boolean canAliasIds()Tests if this user can aliasIds. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations.- Returns:
falseif alias methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasId
void aliasId(Id id, Id aliasId) throws NotFoundException, OperationFailedException, PermissionDeniedException Makes twoIdsequivalent. The primary and aliasIdsare already known to this service. If the aliasIdis already mapped to anotherId, it is changed to map to the given primaryId. Calls toIdLookupSession.getId(aliastId)return theid.- Parameters:
id- the primaryIdaliasId- theIdalias- Throws:
NotFoundException-idoraliasIdis not foundNullArgumentException-idoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
removeAlias
void removeAlias(Id id, Id aliasId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes an alias.- Parameters:
id- the primaryIdaliasId- the aliasId- Throws:
NotFoundException-idoraliasIdis not found oraliasIdnot mapped toidNullArgumentException-idoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-