public interface SequenceRuleAdminSession extends OsidSession
This session creates and removes sequence rules. The data for create
and update is provided via the SequenceRuleForm.
Modifier and Type | Method and Description |
---|---|
void |
aliasSequenceRule(Id sequenceRuleId,
Id aliasId)
Adds a
Id to a SequenceRule for the
purpose of creating compatibility. |
boolean |
canCreateSequenceRule()
Tests if this user can create sequence rules.
|
boolean |
canCreateSequenceRuleWithRecordTypes(Type[] sequenceRuleRecordTypes)
Tests if this user can create a single
SequenceRule
using the desired record types. |
boolean |
canDeleteSequenceRules()
Tests if this user can delete sequence rules.
|
boolean |
canManageSequenceRuleAliases()
Tests if this user can manage
Id aliases for sequence
rules. |
boolean |
canSequenceSequenceRules()
Tests if this user can order
SequenceRules. |
boolean |
canUpdateSequenceRules()
Tests if this user can update sequence rules.
|
SequenceRule |
createSequenceRule(SequenceRuleForm sequenceRuleForm)
Creates a new
SequenceRule. |
void |
deleteSequenceRule(Id sequenceRuleId)
Deletes a
SequenceRule. |
Bank |
getBank()
Gets the
Bank associated with this session. |
Id |
getBankId()
Gets the
Bank Id associated with this
session. |
SequenceRuleForm |
getSequenceRuleFormForCreate(Id assessmentPartId,
Id nextAssessmentPartId,
Type[] sequenceRuleRecordTypes)
Gets the sequence rule form for creating new sequence rules between
two assessment parts.
|
SequenceRuleForm |
getSequenceRuleFormForUpdate(Id sequenceRuleId)
Gets the sequence rule form for updating an existing sequence rule.
|
void |
moveSequenceRuleAhead(Id sequenceRuleId,
Id assessmentPartId,
Id referenceId)
Reorders sequence rule for a source assessment part by moving the
specified sequence rule in front of a reference sequence rule.
|
void |
moveSequenceRuleBehind(Id sequenceRuleId,
Id assessmentPartId,
Id referenceId)
Reorders sequence rule for a source assessment part by moving the
specified sequence rule behind a reference sequence rule.
|
void |
orderSequenceRules(Id[] sequenceRuleIds,
Id assessmentPartId)
Reorders a set of sequence rules for an assessment part.
|
void |
updateSequenceRule(SequenceRuleForm sequenceRuleForm)
Updates an existing sequence rule.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBankId()
Bank
Id
associated with this
session. Bank Id
associated with this sessionmandatory
- This method must be implemented. Bank getBank() throws OperationFailedException, PermissionDeniedException
Bank
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canCreateSequenceRule()
SequenceRule
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 SequenceRule
creation
is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canCreateSequenceRuleWithRecordTypes(Type[] sequenceRuleRecordTypes)
SequenceRule
using the desired record types. While
AssessmentAuthoringManager.getSequenceRuleRecordTypes()
can be
used to examine which records are supported, this method tests which
record(s) are required for creating a specific SequenceRule.
Providing an empty array tests if a SequenceRule
can be created with no records.sequenceRuleRecordTypes
- array of sequence rule record types true
if SequenceRule
creation
using the specified record Types
is supported,
false
otherwiseNullArgumentException
- sequenceRuleRecordTypes
is null
mandatory
- This method must be implemented. SequenceRuleForm getSequenceRuleFormForCreate(Id assessmentPartId, Id nextAssessmentPartId, Type[] sequenceRuleRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
assessmentPartId
- the source assessment part Id
nextAssessmentPartId
- the target assessment part Id
sequenceRuleRecordTypes
- array of sequence rule record typesInvalidArgumentException
- assessmentPartId
and nextAssessmentPartId
not on the
same assessmentNotFoundException
- assessmentPartId
or
nextAssessmentPartId
is not foundNullArgumentException
- assessmentPartId,
nextAssessmentPartId
, or
sequenceRuleRecordTypes
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- unable to get form for requested
record typesmandatory
- This method must be implemented. SequenceRule createSequenceRule(SequenceRuleForm sequenceRuleForm) throws OperationFailedException, PermissionDeniedException
SequenceRule.
sequenceRuleForm
- the form for this SequenceRule
SequenceRule
IllegalStateException
- sequenceRuleForm
already used in a create transactionInvalidArgumentException
- one or more of the form
elements is invalidNullArgumentException
- sequenceRuleForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- sequenceRuleForm
did not originate from getSequenceRuleFormForCreate()
mandatory
- This method must be implemented. boolean canUpdateSequenceRules()
SequenceRule
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 SequenceRule
modification is not authorized, true
otherwisemandatory
- This method must be implemented. SequenceRuleForm getSequenceRuleFormForUpdate(Id sequenceRuleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sequenceRuleId
- the Id
of the
SequenceRule
NotFoundException
- sequenceRuleId
is
not foundNullArgumentException
- sequenceRuleId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void updateSequenceRule(SequenceRuleForm sequenceRuleForm) throws OperationFailedException, PermissionDeniedException
sequenceRuleForm
- the form containing the elements to be
updatedIllegalStateException
- sequenceRuleForm
already used in an update transactionInvalidArgumentException
- the form contains an invalid
valueNullArgumentException
- sequenceRuleForm
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failureUnsupportedException
- sequenceRuleForm
did not originate from getSequenceRuleFormForUpdate()
mandatory
- This method must be implemented. boolean canDeleteSequenceRules()
SequenceRule
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 SequenceRule
deletion
is not authorized, true
otherwisemandatory
- This method must be implemented. void deleteSequenceRule(Id sequenceRuleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
SequenceRule.
sequenceRuleId
- the Id
of the
SequenceRule
to removeNotFoundException
- sequenceRuleId
not
foundNullArgumentException
- sequenceRuleId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canManageSequenceRuleAliases()
Id
aliases for sequence
rules. 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 SequenceRule
aliasing
is not authorized, true
otherwisemandatory
- This method must be implemented. void aliasSequenceRule(Id sequenceRuleId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
Id
to a SequenceRule
for the
purpose of creating compatibility. The primary Id
of
the SequenceRule
is determined by the provider. The new
Id
performs as an alias to the primary Id
. If the alias is a pointer to another sequence rule. it is
reassigned to the given sequence rule Id.
sequenceRuleId
- the Id
of a SequenceRule
aliasId
- the alias Id
AlreadyExistsException
- aliasId
is
already assignedNotFoundException
- sequenceRuleId
not
foundNullArgumentException
- sequenceRuleId
or aliasId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canSequenceSequenceRules()
SequenceRules.
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 SequenceRule
ordering
is not authorized, true
otherwisemandatory
- This method must be implemented. void moveSequenceRuleAhead(Id sequenceRuleId, Id assessmentPartId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sequenceRuleId
- the Id
of a SequenceRule
assessmentPartId
- the Id
of an
AssessmentPart
referenceId
- the reference sequence rule Id
NotFoundException
- sequenceRuleId,
assessmentPartId,
or referenceId
not
found or, sequenceRuleId
or referenceId
not related to assessmentPartId
NullArgumentException
- sequenceRuleId,
assessmentPartId,
or referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void moveSequenceRuleBehind(Id sequenceRuleId, Id assessmentPartId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sequenceRuleId
- the Id
of a SequenceRule
assessmentPartId
- the Id
of an
AssessmentPart
referenceId
- the reference sequence rule Id
NotFoundException
- sequenceRuleId,
assessmentPartId,
or referenceId
not
found or, sequenceRuleId
or referenceId
not related to assessmentPartId
NullArgumentException
- sequenceRuleId,
assessmentPartId,
or referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void orderSequenceRules(Id[] sequenceRuleIds, Id assessmentPartId) throws NotFoundException, OperationFailedException, PermissionDeniedException
sequenceRuleIds
- the Ids
for a set of
SequenceRules
assessmentPartId
- the Id
of an
AssessmentPart
NotFoundException
- assessmentPartId
not
found or, a sequenceRuleId
not related to
assessmentPartId
NullArgumentException
- sequenceRuleIds
or assessmentPartId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.