Interface ActionGroupBatchAdminSession
- All Superinterfaces:
ActionGroupAdminSession, AutoCloseable, Closeable, OsidSession, OsidSession
This session creates, updates, and deletes ActionGroups in
bulk. 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
getActionGroupFormsForCreate() specifying the desired record
Types or none if no record Types are needed. Each of the returned
ActionGroupForms 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 an 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.
The ActionGroupForms returned from
getActionGroupFormsForCreate() may be linked to the originating request
through the peer Ids of the ActionGroupForm . In the case
where there may be duplicates, any ActionGroupForm of the same
peer Ids may be used for a create operation.
Once a batch of ActionGroupForm are submitted for create, a
CreateActionGroup is returned for each ActionGroupForm ,
although the ordering is not defined. Only errors that pertain to the
entire create operation are returned from createActionGroups() ,
errors specific to an individual ActionGroupForm are indicated in
the corresponding CreateActionGroup . CreateActionGroups
may be linked to the originating ActionGroupForm through the
ActionGroupForm Id .
For updates, ActionGroupForms are requested to the
ActionGroup Id that is to be updated using
getActionGroupFormsForUpdate() where the reference Id in the
ActionGroupForm may be used to link the request. 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.
Once a batch of ActionGroupForms are submitted for update, an
UpdateActionGroup is returned for each ActionGroupForm ,
although the ordering is not defined. Only errors that pertain to the
entire update operation are returned from updateActionGroups() ,
errors specific to an individual ActionGroupForm are indicated in
the corresponding UpdateActionGroup . UpdateActionGroups
may be linked to the originating ActionGroupForm through the
ActionGroupForm Id .
The delete operations delete ActionGroups in bulk. 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. Bulk delete operations return
the results in DeleteActionGroups .
-
Method Summary
Modifier and TypeMethodDescriptionaliasActionGroups(AliasRequestList aliasRequests) Adds anIdto anActionGroupfor the purpose of creating compatibility.aliasActions(AliasRequestList aliasRequests) Adds anIdto aActionfor the purpose of creating compatibility.createActionGroups(ActionGroupBatchFormList actionGroupForms) Creates a new set ofActionGroups.createActions(ActionBatchFormList actionForms) Creates a new set ofActions.deleteActionGroups(IdList actionGroupIds) Deletes action groups for the givenIds.deleteActions(IdList actionIds) Deletes actions for the givenIds.deleteActionsForActionGroup(Id actionGroupId) Deletes actions for the givenActionGroup.Deletes allActionGroupsin thisSystem.Deletes allActionsin thisControl.getActionFormsForCreate(IdList actionGroupIds, Type[] actionRecordTypes) Gets the action forms for creating a bunch of new actions.getActionFormsForUpdate(IdList actionIds) Gets the action forms for updating an existing set of actions.getActionGroupFormsForCreate(long n, Type[] actionGroupRecordTypes) Gets the action group forms for creating a bunch of new action groups.getActionGroupFormsForUpdate(IdList actionGroupIds) Gets the action group forms for updating an existing set of action groups.updateActionGroups(ActionGroupBatchFormList actionGroupForms) Updates existing action groups.updateActions(ActionBatchFormList actionForms) Updates existing actions.Methods inherited from interface ActionGroupAdminSession
aliasAction, aliasActionGroup, canCreateActionGroups, canCreateActionGroupWithRecordTypes, canCreateActionWithRecordTypes, canDeleteActionGroups, canDeleteActions, canManageActionAliases, canManageActionGroupAliases, canSequenceActions, canUpdateActionGroups, canUpdateActions, createAction, createActionGroup, deleteAction, deleteActionGroup, getActionFormForCreate, getActionFormForUpdate, getActionGroupFormForCreate, getActionGroupFormForUpdate, getSystem, getSystemId, moveActionAhead, moveActionBehind, orderActions, updateAction, updateActionGroupModifier 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
-
getActionGroupFormsForCreate
ActionGroupBatchFormList getActionGroupFormsForCreate(long n, Type[] actionGroupRecordTypes) throws OperationFailedException, PermissionDeniedException Gets the action group forms for creating a bunch of new action groups.- Parameters:
n- the number of forms to retrieveactionGroupRecordTypes- array of action group record types to be included in each create operation or an empty list if none- Returns:
- the action group forms
- Throws:
NullArgumentException-actionGroupRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createActionGroups
CreateResponseList createActionGroups(ActionGroupBatchFormList actionGroupForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofActionGroups. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateActionGroup.- Parameters:
actionGroupForms- the action group forms- Returns:
- the create responses
- Throws:
NullArgumentException-actionGroupFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActionGroupFormsForUpdate
ActionGroupBatchFormList getActionGroupFormsForUpdate(IdList actionGroupIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action group forms for updating an existing set of action groups. A new action group form should be requested for each update transaction.- Parameters:
actionGroupIds- theIdsof theActionGroup- Returns:
- the action group form
- Throws:
NotFoundException- anactionGroupIdis not foundNullArgumentException-actionGroupIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateActionGroups
UpdateResponseList updateActionGroups(ActionGroupBatchFormList actionGroupForms) throws OperationFailedException, PermissionDeniedException Updates existing action groups. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateActionGroup.- Parameters:
actionGroupForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-actionGroupFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllActionGroups
DeleteResponseList deleteAllActionGroups() throws OperationFailedException, PermissionDeniedExceptionDeletes allActionGroupsin thisSystem.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteActionGroups
DeleteResponseList deleteActionGroups(IdList actionGroupIds) throws OperationFailedException, PermissionDeniedException Deletes action groups for the givenIds.- Parameters:
actionGroupIds- theIdsof the action groups to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-actionGroupIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasActionGroups
AliasResponseList aliasActionGroups(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto anActionGroupfor the purpose of creating compatibility. The primaryIdof theActionGroupis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another action group, it is reassigned to the given action groupId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActionFormsForCreate
ActionBatchFormList getActionFormsForCreate(IdList actionGroupIds, Type[] actionRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action forms for creating a bunch of new actions. A form is retrieved for each action group.- Parameters:
actionGroupIds- list of action groupsactionRecordTypes- array of action record types to be included in each create operation or an empty list if none- Returns:
- the action forms
- Throws:
NotFoundException- anactionGroupIdis not foundNullArgumentException-actionGroupIdsoractionRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to request forms with given record types- Compliance:
mandatory- This method must be implemented.
-
createActions
CreateResponseList createActions(ActionBatchFormList actionForms) throws OperationFailedException, PermissionDeniedException Creates a new set ofActions. This method returns an error if the entire operation fails. Otherwise, the status of an individual create operation is indicated in theBatchCreateAction.- Parameters:
actionForms- the action forms- Returns:
- the create responses
- Throws:
NullArgumentException-actionFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActionFormsForUpdate
ActionBatchFormList getActionFormsForUpdate(IdList actionIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the action forms for updating an existing set of actions. A new action form should be requested for each update transaction.- Parameters:
actionIds- theIdsof theAction- Returns:
- the action form
- Throws:
NotFoundException- aactionIdis not foundNullArgumentException-actionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateActions
UpdateResponseList updateActions(ActionBatchFormList actionForms) throws OperationFailedException, PermissionDeniedException Updates existing actions. This method returns an error if the entire operation fails. Otherwise, the status of an individual update operation is indicated in theBatchCreateAction.- Parameters:
actionForms- the form containing the elements to be updated- Returns:
- the update responses
- Throws:
NullArgumentException-actionFormsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteAllActions
Deletes allActionsin thisControl.- Returns:
- the delete responses
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteActions
DeleteResponseList deleteActions(IdList actionIds) throws OperationFailedException, PermissionDeniedException Deletes actions for the givenIds.- Parameters:
actionIds- theIdsof the actions to delete- Returns:
- the delete responses
- Throws:
NullArgumentException-actionIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
deleteActionsForActionGroup
DeleteResponseList deleteActionsForActionGroup(Id actionGroupId) throws OperationFailedException, PermissionDeniedException Deletes actions for the givenActionGroup.- Parameters:
actionGroupId- an action groupId- Returns:
- the delete responses
- Throws:
NullArgumentException-actionGroupIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
aliasActions
AliasResponseList aliasActions(AliasRequestList aliasRequests) throws OperationFailedException, PermissionDeniedException Adds anIdto aActionfor the purpose of creating compatibility. The primaryIdof theActionis determined by the provider. The newIdis an alias to the primaryId. If the alias is a pointer to another action, it is reassigned to the given actionId.- Parameters:
aliasRequests- the alias requests- Returns:
- the alias responses
- Throws:
NullArgumentException-aliasRequestsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-