public interface ActionGroupAdminSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
void |
aliasAction(Id actionId,
Id aliasId)
Adds an
Id to an Action for the purpose
of creating compatibility. |
void |
aliasActionGroup(Id actionGroupId,
Id aliasId)
Adds an
Id to an ActionGroup for the
purpose of creating compatibility. |
boolean |
canCreateActionGroups()
Tests if this user can create
ActionGroups. |
boolean |
canCreateActionGroupWithRecordTypes(Type[] actionGroupRecordTypes)
Tests if this user can create a single
ActionGroup
using the desired record types. |
boolean |
canCreateActionWithRecordTypes(Type[] actionRecordTypes)
Tests if this user can create a single
Action using the
desired record types. |
boolean |
canDeleteActionGroups()
Tests if this user can delete
ActionGroups. |
boolean |
canDeleteActions()
Tests if this user can delete
Actions. |
boolean |
canManageActionAliases()
Tests if this user can manage
Id aliases for
Actions. |
boolean |
canManageActionGroupAliases()
Tests if this user can manage
Id aliases for
ActionGroups. |
boolean |
canSequenceActions()
Tests if this user can order
Actions. |
boolean |
canUpdateActionGroups()
Tests if this user can update
ActionGroups. |
boolean |
canUpdateActions()
Tests if this user can update
Actions. |
Action |
createAction(ActionForm actionForm)
Creates a new
Action. |
ActionGroup |
createActionGroup(ActionGroupForm actionGroupForm)
Creates a new
ActionGroup. |
void |
deleteAction(Id actionId)
Deletes an
Action. |
void |
deleteActionGroup(Id actionGroupId)
Deletes an
ActionGroup. |
ActionForm |
getActionFormForCreate(Id actionGroupId,
Type[] actionRecordTypes)
Gets the action form for creating new actions.
|
ActionForm |
getActionFormForUpdate(Id actionId)
Gets the action form for updating an existing action.
|
ActionGroupForm |
getActionGroupFormForCreate(Type[] actionGroupRecordTypes)
Gets the action group form for creating new action groups.
|
ActionGroupForm |
getActionGroupFormForUpdate(Id actionGroupId)
Gets the action group form for updating an existing action group.
|
System |
getSystem()
Gets the
System associated with this session. |
Id |
getSystemId()
Gets the
System Id associated with this
session. |
void |
moveActionAhead(Id actionId,
Id actionGroupId,
Id referenceId)
Reorders actions in an action grpup by moving the specified action in
front of a reference action.
|
void |
moveActionBehind(Id actionId,
Id actionGroupId,
Id referenceId)
Reorders actions in an action group by moving the specified action
behind a reference action.
|
void |
orderActions(Id[] actionIds,
Id actionGroupId)
Reorders a set of actions in an action group.
|
void |
updateAction(ActionForm actionForm)
Updates an existing action.
|
void |
updateActionGroup(ActionGroupForm actionGroupForm)
Updates an existing action group.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getSystemId()
System
Id
associated with this
session. System Id
associated with this sessionmandatory
- This method must be implemented. System getSystem() throws OperationFailedException, PermissionDeniedException
System
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateActionGroups()
ActionGroups.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known creating an ActionGroup
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer create operations to
an unauthorized user. false
if ActionGroup
creation is
not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateActionGroupWithRecordTypes(Type[] actionGroupRecordTypes)
ActionGroup
using the desired record types. While
ControlManager.getActionGroupRecordTypes()
can be used to
examine which records are supported, this method tests which record(s)
are required for creating a specific ActionGroup.
Providing an empty array tests if an ActionGroup
can be
created with no records.actionGroupRecordTypes
- array of action group record types true
if ActionGroup
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- actionGroupRecordTypes
is null
mandatory
- This method must be implemented. ActionGroupForm getActionGroupFormForCreate(Type[] actionGroupRecordTypes) throws OperationFailedException, PermissionDeniedException
actionGroupRecordTypes
- array of action group record typesNullArgumentException
- actionGroupRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. ActionGroup createActionGroup(ActionGroupForm actionGroupForm) throws OperationFailedException, PermissionDeniedException
ActionGroup.
actionGroupForm
- the form for this ActionGroup
ActionGroup
IllegalStateException
- actionGroupForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- actionGroupForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- actionGroupForm
did not originate from getActionGroupFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateActionGroups()
ActionGroups.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known updating an ActionGroup
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user. false
if ActionGroup
modification is not authorized, true
otherwisemandatory
- This method must be implemented. ActionGroupForm getActionGroupFormForUpdate(Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionGroupId
- the Id
of the ActionGroup
NotFoundException
- actionGroupId
is not
foundNullArgumentException
- actionGroupId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateActionGroup(ActionGroupForm actionGroupForm) throws OperationFailedException, PermissionDeniedException
actionGroupForm
- the form containing the elements to be updatedIllegalStateException
- actionGroupForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- actionGroupForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- actionGroupForm
did not originate from getActionGroupFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteActionGroups()
ActionGroups.
A return of
true does not guarantee successful authorization. A return of false
indicates that it is known deleting an ActionGroup
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer delete operations to
an unauthorized user. false
if ActionGroup
deletion is
not authorized, true
otherwisemandatory
- This method must be implemented. void deleteActionGroup(Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ActionGroup.
actionGroupId
- the Id
of the ActionGroup
to removeNotFoundException
- actionGroupId
not
foundNullArgumentException
- actionGroupId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageActionGroupAliases()
Id
aliases for
ActionGroups.
A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if ActionGroup
aliasing is
not authorized, true
otherwisemandatory
- This method must be implemented. void aliasActionGroup(Id actionGroupId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to an ActionGroup
for the
purpose of creating compatibility. The primary Id
of
the ActionGroup
is determined by the provider. The new
Id
performs as an alias to the primary Id.
If the alias is a pointer to another action group, it is
reassigned to the given action group Id.
actionGroupId
- the Id
of an ActionGroup
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- actionGroupId
not
foundNullArgumentException
- actionGroupId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateActionWithRecordTypes(Type[] actionRecordTypes)
Action
using the
desired record types. While
ControlManager.getActionRecordTypes()
can be used to examine
which records are supported, this method tests which record(s) are
required for creating a specific Action.
Providing an
empty array tests if an Action
can be created with no
records.actionRecordTypes
- array of action record types true
if Action
creation using
the specified record Types
is supported,
false
otherwiseNullArgumentException
- actionRecordTypes
is null
mandatory
- This method must be implemented. ActionForm getActionFormForCreate(Id actionGroupId, Type[] actionRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionGroupId
- an action group Id
actionRecordTypes
- array of action record typesNotFoundException
- actionGroupId
is not
foundNullArgumentException
- actionGroupId
or
actionRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. Action createAction(ActionForm actionForm) throws OperationFailedException, PermissionDeniedException
Action.
actionForm
- the form for this Action
Action
IllegalStateException
- actionForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- actionForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- actionForm
did
not originate from getActionFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateActions()
Actions.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known updating an Action
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer update operations to
an unauthorized user. false
if Action
modification is
not authorized, true
otherwisemandatory
- This method must be implemented. ActionForm getActionFormForUpdate(Id actionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionId
- the Id
of the Action
NotFoundException
- actionId
is not
foundNullArgumentException
- actionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateAction(ActionForm actionForm) throws OperationFailedException, PermissionDeniedException
actionForm
- the form containing the elements to be updatedIllegalStateException
- actionForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- actionForm
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- actionForm
did
not originate from getActionFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteActions()
Actions.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known deleting an Action
will
result in a PERMISSION_DENIED.
This is intended as a
hint to an application that may opt not to offer delete operations to
an unauthorized user. false
if Action
deletion is not
authorized, true
otherwisemandatory
- This method must be implemented. void deleteAction(Id actionId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Action.
actionId
- the Id
of the Action
to
removeNotFoundException
- actionId
not foundNullArgumentException
- actionId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageActionAliases()
Id
aliases for
Actions.
A return of true does not guarantee successful
authorization. A return of false indicates that it is known changing
an alias will result in a PERMISSION_DENIED.
This is
intended as a hint to an application that may opt not to offer alias
operations to an unauthorized user. false
if Action
aliasing is not
authorized, true
otherwisemandatory
- This method must be implemented. void aliasAction(Id actionId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to an Action
for the purpose
of creating compatibility. The primary Id
of the
Action
is determined by the provider. The new Id
performs as an alias to the primary Id.
If the
alias is a pointer to another action, it is reassigned to the given
action Id.
actionId
- the Id
of an Action
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- actionId
not foundNullArgumentException
- actionId
or
aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canSequenceActions()
Actions.
A return of true
does not guarantee successful authorization. A return of false
indicates that it is known sequencing operations will result in a
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer sequencing operations to an
unauthorized user. false
if Action
ordering is not
authorized, true
otherwisemandatory
- This method must be implemented. void moveActionAhead(Id actionId, Id actionGroupId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionId
- the Id
of an Action
actionGroupId
- the Id
of an ActionGroup
referenceId
- the reference action Id
NotFoundException
- actionId, actionGroupId,
or referenceId
not found or,
actionId
or referenceId
not related to
actionGroupId
NullArgumentException
- actionId, actionGroupId,
or referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void moveActionBehind(Id actionId, Id actionGroupId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionId
- the Id
of an Action
actionGroupId
- the Id
of an ActionGroup
referenceId
- the reference action Id
NotFoundException
- actionId, actionGroupId,
or referenceId
not found or,
actionId
or referenceId
not related to
actionGroupId
NullArgumentException
- actionId, actionGroupId,
or referenceId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void orderActions(Id[] actionIds, Id actionGroupId) throws NotFoundException, OperationFailedException, PermissionDeniedException
actionIds
- the Ids
for a set of Actiond
actionGroupId
- the Id
of an ActionGroup
NotFoundException
- actionGroupId
not
found or, an actionId
not related to
actionGroupId
NullArgumentException
- actionIds
or
actionGroupId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.