Interface ActionEnablerAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes action enablers. The data for create
and update is provided via the ActionEnablerForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasActionEnabler(Id actionEnablerId, Id aliasId) Adds anIdto anActionEnablerfor the purpose of creating compatibility.booleanTests if this user can create action enablers.booleancanCreateActionEnablerWithRecordTypes(Type[] actionEnablerRecordTypes) Tests if this user can create a singleActionEnablerusing the desired record types.booleanTests if this user can delete action enablers.booleanTests if this user can manageIdaliases for action enablers.booleanTests if this user can update action enablers.createActionEnabler(ActionEnablerForm actionEnablerForm) Creates a newActionEnabler.voiddeleteActionEnabler(Id actionEnablerId) Deletes anActionEnabler.getActionEnablerFormForCreate(Type[] actionEnablerRecordTypes) Gets the action enabler form for creating new action enablers.getActionEnablerFormForUpdate(Id actionEnablerId) Gets the action enabler form for updating an existing action enabler.Gets theSystemassociated with this session.Gets theSystemIdassociated with this session.voidupdateActionEnabler(ActionEnablerForm actionEnablerForm) Updates an existing action 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
-
getSystemId
Id getSystemId()Gets theSystemIdassociated with this session.- Returns:
- the
System Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getSystem
Gets theSystemassociated with this session.- Returns:
- the system
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateActionEnabler
boolean canCreateActionEnabler()Tests if this user can create action enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anActionEnablerwill 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:
falseifActionEnablercreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateActionEnablerWithRecordTypes
Tests if this user can create a singleActionEnablerusing the desired record types. WhileControlRulesManager.getActionEnablerRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificActionEnabler. Providing an empty array tests if anActionEnablercan be created with no records.- Parameters:
actionEnablerRecordTypes- array of action enabler record types- Returns:
trueifActionEnablercreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-actionEnablerRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getActionEnablerFormForCreate
ActionEnablerForm getActionEnablerFormForCreate(Type[] actionEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the action enabler form for creating new action enablers. A new form should be requested for each create transaction.- Parameters:
actionEnablerRecordTypes- array of action enabler record types- Returns:
- the action enabler form
- Throws:
NullArgumentException-actionEnablerRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createActionEnabler
ActionEnabler createActionEnabler(ActionEnablerForm actionEnablerForm) throws OperationFailedException, PermissionDeniedException Creates a newActionEnabler.- Parameters:
actionEnablerForm- the form for thisActionEnabler- Returns:
- the new
ActionEnabler - Throws:
IllegalStateException-actionEnablerFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-actionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionEnablerForm did not originate from getActionEnablerFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateActionEnablers
boolean canUpdateActionEnablers()Tests if this user can update action enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anActionEnablerwill 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:
falseifActionEnablermodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getActionEnablerFormForUpdate
ActionEnablerForm getActionEnablerFormForUpdate(Id actionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action enabler form for updating an existing action enabler. A new action enabler form should be requested for each update transaction.- Parameters:
actionEnablerId- theIdof theActionEnabler- Returns:
- the action enabler form
- Throws:
NotFoundException-actionEnablerIdis not foundNullArgumentException-actionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateActionEnabler
void updateActionEnabler(ActionEnablerForm actionEnablerForm) throws OperationFailedException, PermissionDeniedException Updates an existing action enabler.- Parameters:
actionEnablerForm- the form containing the elements to be updated- Throws:
IllegalStateException-actionEnablerFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-actionEnablerFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionEnablerFormdid not originate fromgetActionEnablerFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteActionEnablers
boolean canDeleteActionEnablers()Tests if this user can delete action enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anActionEnablerwill 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:
falseifActionEnablerdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteActionEnabler
void deleteActionEnabler(Id actionEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anActionEnabler.- Parameters:
actionEnablerId- theIdof theActionEnablerto remove- Throws:
NotFoundException-actionEnablerIdnot foundNullArgumentException-actionEnablerIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageActionEnablerAliases
boolean canManageActionEnablerAliases()Tests if this user can manageIdaliases for action 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:
falseifActionEnableraliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasActionEnabler
void aliasActionEnabler(Id actionEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anActionEnablerfor the purpose of creating compatibility. The primaryIdof theActionEnableris determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another action enabler. it is reassigned to the given action enablerId.- Parameters:
actionEnablerId- theIdof anActionEnableraliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-actionEnablerIdnot foundNullArgumentException-actionEnablerIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-