Interface ActionGroupAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
- All Known Subinterfaces:
ActionGroupBatchAdminSession
This session creates, updates, and deletes ActionGroups . The
data for create and update is provided by the consumer via the form
object. OsidForms are requested for each create or update and may
not be reused.
Create and update operations differ in their usage. To create an
ActionGroup , an ActionGroupForm is requested using
getActionGroupFormForCreate() specifying the desired record Types
or none if no record Types are needed. The returned
ActionGroupForm will indicate that it is to be used with a create
operation and can be used to examine metdata or validate data prior to
creation. Once the ActionGroupForm is submiited to a create
operation, it cannot be reused with another create operation unless the
first operation was unsuccessful. Each ActionGroupForm corresponds
to an attempted transaction.
For updates, ActionGroupForms are requested to the
ActionGroup Id that is to be updated using
getActionGroupFormForUpdate() . Similarly, the ActionGroupForm
has metadata about the data that can be updated and it can perform
validation before submitting the update. The ActionGroupForm can
only be used once for a successful update and cannot be reused.
The delete operations delete ActionGroups . To unmap an
ActionGroup from the current System , the
ActionGroupSystemAssignmentSession should be used. These delete
operations attempt to remove the ActionGroup itself thus removing
it from all known System catalogs.
This session includes an Id aliasing mechanism to assign an
external Id to an internally assigned Id.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasAction(Id actionId, Id aliasId) Adds anIdto anActionfor the purpose of creating compatibility.voidaliasActionGroup(Id actionGroupId, Id aliasId) Adds anIdto anActionGroupfor the purpose of creating compatibility.booleanTests if this user can createActionGroups.booleancanCreateActionGroupWithRecordTypes(Type[] actionGroupRecordTypes) Tests if this user can create a singleActionGroupusing the desired record types.booleancanCreateActionWithRecordTypes(Type[] actionRecordTypes) Tests if this user can create a singleActionusing the desired record types.booleanTests if this user can deleteActionGroups.booleanTests if this user can deleteActions.booleanTests if this user can manageIdaliases forActions.booleanTests if this user can manageIdaliases forActionGroups.booleanTests if this user can orderActions.booleanTests if this user can updateActionGroups.booleanTests if this user can updateActions.createAction(ActionForm actionForm) Creates a newAction.createActionGroup(ActionGroupForm actionGroupForm) Creates a newActionGroup.voiddeleteAction(Id actionId) Deletes anAction.voiddeleteActionGroup(Id actionGroupId) Deletes anActionGroup.getActionFormForCreate(Id actionGroupId, Type[] actionRecordTypes) Gets the action form for creating new actions.getActionFormForUpdate(Id actionId) Gets the action form for updating an existing action.getActionGroupFormForCreate(Type[] actionGroupRecordTypes) Gets the action group form for creating new action groups.getActionGroupFormForUpdate(Id actionGroupId) Gets the action group form for updating an existing action group.Gets theSystemassociated with this session.Gets theSystemIdassociated with this session.voidmoveActionAhead(Id actionId, Id actionGroupId, Id referenceId) Reorders actions in an action grpup by moving the specified action in front of a reference action.voidmoveActionBehind(Id actionId, Id actionGroupId, Id referenceId) Reorders actions in an action group by moving the specified action behind a reference action.voidorderActions(Id[] actionIds, Id actionGroupId) Reorders a set of actions in an action group.voidupdateAction(ActionForm actionForm) Updates an existing action.voidupdateActionGroup(ActionGroupForm actionGroupForm) Updates an existing action group.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.
-
canCreateActionGroups
boolean canCreateActionGroups()Tests if this user can createActionGroups. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating anActionGroupwill 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:
falseifActionGroupcreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateActionGroupWithRecordTypes
Tests if this user can create a singleActionGroupusing the desired record types. WhileControlManager.getActionGroupRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificActionGroup. Providing an empty array tests if anActionGroupcan be created with no records.- Parameters:
actionGroupRecordTypes- array of action group record types- Returns:
trueifActionGroupcreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-actionGroupRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getActionGroupFormForCreate
ActionGroupForm getActionGroupFormForCreate(Type[] actionGroupRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the action group form for creating new action groups. A new form should be requested for each create transaction.- Parameters:
actionGroupRecordTypes- array of action group record types- Returns:
- the action group form
- Throws:
NullArgumentException-actionGroupRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createActionGroup
ActionGroup createActionGroup(ActionGroupForm actionGroupForm) throws OperationFailedException, PermissionDeniedException Creates a newActionGroup.- Parameters:
actionGroupForm- the form for thisActionGroup- Returns:
- the new
ActionGroup - Throws:
IllegalStateException-actionGroupFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-actionGroupFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionGroupFormdid not originate fromgetActionGroupFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateActionGroups
boolean canUpdateActionGroups()Tests if this user can updateActionGroups. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anActionGroupwill 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:
falseifActionGroupmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getActionGroupFormForUpdate
ActionGroupForm getActionGroupFormForUpdate(Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action group form for updating an existing action group. A new action group form should be requested for each update transaction.- Parameters:
actionGroupId- theIdof theActionGroup- Returns:
- the action group form
- Throws:
NotFoundException-actionGroupIdis not foundNullArgumentException-actionGroupIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateActionGroup
void updateActionGroup(ActionGroupForm actionGroupForm) throws OperationFailedException, PermissionDeniedException Updates an existing action group.- Parameters:
actionGroupForm- the form containing the elements to be updated- Throws:
IllegalStateException-actionGroupFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-actionGroupFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionGroupFormdid not originate fromgetActionGroupFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteActionGroups
boolean canDeleteActionGroups()Tests if this user can deleteActionGroups. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anActionGroupwill 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:
falseifActionGroupdeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteActionGroup
void deleteActionGroup(Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anActionGroup.- Parameters:
actionGroupId- theIdof theActionGroupto remove- Throws:
NotFoundException-actionGroupIdnot foundNullArgumentException-actionGroupIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageActionGroupAliases
boolean canManageActionGroupAliases()Tests if this user can manageIdaliases forActionGroups. 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:
falseifActionGroupaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasActionGroup
void aliasActionGroup(Id actionGroupId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anActionGroupfor the purpose of creating compatibility. The primaryIdof theActionGroupis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another action group, it is reassigned to the given action groupId.- Parameters:
actionGroupId- theIdof anActionGroupaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-actionGroupIdnot foundNullArgumentException-actionGroupIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateActionWithRecordTypes
Tests if this user can create a singleActionusing the desired record types. WhileControlManager.getActionRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificAction. Providing an empty array tests if anActioncan be created with no records.- Parameters:
actionRecordTypes- array of action record types- Returns:
trueifActioncreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-actionRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getActionFormForCreate
ActionForm getActionFormForCreate(Id actionGroupId, Type[] actionRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action form for creating new actions. A new form should be requested for each create transaction.- Parameters:
actionGroupId- an action groupIdactionRecordTypes- array of action record types- Returns:
- the action form
- Throws:
NotFoundException-actionGroupIdis not foundNullArgumentException-actionGroupIdoractionRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createAction
Action createAction(ActionForm actionForm) throws OperationFailedException, PermissionDeniedException Creates a newAction.- Parameters:
actionForm- the form for thisAction- Returns:
- the new
Action - Throws:
IllegalStateException-actionFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-actionFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionFormdid not originate fromgetActionFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateActions
boolean canUpdateActions()Tests if this user can updateActions. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating anActionwill 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:
falseifActionmodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getActionFormForUpdate
ActionForm getActionFormForUpdate(Id actionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action form for updating an existing action. A new action form should be requested for each update transaction.- Parameters:
actionId- theIdof theAction- Returns:
- the action form
- Throws:
NotFoundException-actionIdis not foundNullArgumentException-actionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateAction
Updates an existing action.- Parameters:
actionForm- the form containing the elements to be updated- Throws:
IllegalStateException-actionFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-actionFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-actionFormdid not originate fromgetActionFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteActions
boolean canDeleteActions()Tests if this user can deleteActions. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting anActionwill 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:
falseifActiondeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteAction
void deleteAction(Id actionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes anAction.- Parameters:
actionId- theIdof theActionto remove- Throws:
NotFoundException-actionIdnot foundNullArgumentException-actionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageActionAliases
boolean canManageActionAliases()Tests if this user can manageIdaliases forActions. 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:
falseifActionaliasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasAction
void aliasAction(Id actionId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds anIdto anActionfor the purpose of creating compatibility. The primaryIdof theActionis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another action, it is reassigned to the given actionId.- Parameters:
actionId- theIdof anActionaliasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-actionIdnot foundNullArgumentException-actionIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSequenceActions
boolean canSequenceActions()Tests if this user can orderActions. A return of true does not guarantee successful authorization. A return of false indicates that it is known sequencing operations will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer sequencing operations to an unauthorized user.- Returns:
falseifActionordering is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
moveActionAhead
void moveActionAhead(Id actionId, Id actionGroupId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders actions in an action grpup by moving the specified action in front of a reference action.- Parameters:
actionId- theIdof anActionactionGroupId- theIdof anActionGroupreferenceId- the reference actionId- Throws:
NotFoundException-actionId, actionGroupId, orreferenceIdnot found or,actionIdorreferenceIdnot related toactionGroupIdNullArgumentException-actionId, actionGroupId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
moveActionBehind
void moveActionBehind(Id actionId, Id actionGroupId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders actions in an action group by moving the specified action behind a reference action.- Parameters:
actionId- theIdof anActionactionGroupId- theIdof anActionGroupreferenceId- the reference actionId- Throws:
NotFoundException-actionId, actionGroupId, orreferenceIdnot found or,actionIdorreferenceIdnot related toactionGroupIdNullArgumentException-actionId, actionGroupId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
orderActions
void orderActions(Id[] actionIds, Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of actions in an action group.- Parameters:
actionIds- theIdsfor a set ofActiondactionGroupId- theIdof anActionGroup- Throws:
NotFoundException-actionGroupIdnot found or, anactionIdnot related toactionGroupIdNullArgumentException-actionIdsoractionGroupIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-