Interface AuthorizationEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes authorization enablers. The data for
create and update is provided via the AuthorizationEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAuthorizationEnabler(Id authorizationEnablerId, Id aliasId) Adds anIdto anAuthorizationEnablerfor the purpose of creating compatibility.booleanTests if this user can create authorization enablers.booleancanCreateAuthorizationEnablerWithRecordTypes(Type[] authorizationEnablerRecordTypes) Tests if this user can create a singleAuthorizationEnablerusing the desired record types.booleanTests if this user can delete authorization enablers.booleanTests if this user can manageIdaliases for authorization enablers.booleanTests if this user can update authorization enablers.createAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) Creates a newAuthorizationEnabler.voiddeleteAuthorizationEnabler(Id authorizationEnablerId) Deletes anAuthorizationEnabler.getAuthorizationEnablerFormForCreate(Type[] authorizationEnablerRecordTypes) Gets the authorization enabler form for creating new authorization enablers.getAuthorizationEnablerFormForUpdate(Id authorizationEnablerId) Gets the authorization enabler form for updating an existing authorization enabler.getVault()Gets theVaultassociated with this session.Gets theVaultIdassociated with this session.voidupdateAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) Updates an existing authorization enabler.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
-
getVaultId
Id getVaultId()Gets theVaultIdassociated with this session.- Returns:
- the
Vault Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getVault
Gets theVaultassociated with this session.- Returns:
- the vault
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateAuthorizationEnabler
boolean canCreateAuthorizationEnabler()Tests if this user can create authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anAuthorizationEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.- Returns:
falseifAuthorizationEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateAuthorizationEnablerWithRecordTypes
Tests if this user can create a singleAuthorizationEnablerusing the desired record types. WhileAuthorizationRulesManager.getAuthorizationEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAuthorizationEnabler. Providing an empty array tests if anAuthorizationEnablercan be created with no records.- Parameters:
authorizationEnablerRecordTypes- array of authorization enabler record types- Returns:
trueifAuthorizationEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-authorizationEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getAuthorizationEnablerFormForCreate
AuthorizationEnablerForm getAuthorizationEnablerFormForCreate(Type[] authorizationEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the authorization enabler form for creating new authorization enablers. A new form should be requested for each create transaction.- Parameters:
authorizationEnablerRecordTypes- array of authorization enabler record types- Returns:
- the authorization enabler form
- Throws:
NullArgumentException-authorizationEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAuthorizationEnabler
AuthorizationEnabler createAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newAuthorizationEnabler.- Parameters:
authorizationEnablerForm- the form for thisAuthorizationEnabler- Returns:
- the new
AuthorizationEnabler - Throws:
IllegalStateException-authorizationEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-authorizationEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-authorizationEnablerFormdid not originate fromgetAuthorizationEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateAuthorizationEnablers
boolean canUpdateAuthorizationEnablers()Tests if this user can update authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anAuthorizationEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.- Returns:
falseifAuthorizationEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getAuthorizationEnablerFormForUpdate
AuthorizationEnablerForm getAuthorizationEnablerFormForUpdate(Id authorizationEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the authorization enabler form for updating an existing authorization enabler. A new authorization enabler form should be requested for each update transaction.- Parameters:
authorizationEnablerId- theIdof theAuthorizationEnabler- Returns:
- the authorization enabler form
- Throws:
NotFoundException-authorizationEnablerIdis not foundNullArgumentException-authorizationEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAuthorizationEnabler
void updateAuthorizationEnabler(AuthorizationEnablerForm authorizationEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing authorization enabler.- Parameters:
authorizationEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-authorizationEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-authorizationEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-authorizationEnablerFormdid not originate fromgetAuthorizationEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteAuthorizationEnablers
boolean canDeleteAuthorizationEnablers()Tests if this user can delete authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anAuthorizationEnablerwill result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.- Returns:
falseifAuthorizationEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAuthorizationEnabler
void deleteAuthorizationEnabler(Id authorizationEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAuthorizationEnabler.- Parameters:
authorizationEnablerId- theIdof theAuthorizationEnablerto remove- Throws:
NotFoundException-authorizationEnablerIdnot foundNullArgumentException-authorizationEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageAuthorizationEnablerAliases
boolean canManageAuthorizationEnablerAliases()Tests if this user can manageIdaliases for authorization enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifAuthorizationEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAuthorizationEnabler
void aliasAuthorizationEnabler(Id authorizationEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anAuthorizationEnablerfor the purpose of creating compatibility. The primaryIdof theAuthorizationEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another authorization enabler. it is reassigned to the given authorization enablerId.- Parameters:
authorizationEnablerId- theIdof anAuthorizationEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-authorizationEnablerIdnot foundNullArgumentException-authorizationEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-