Interface SequenceRuleAdminSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session creates and removes sequence rules. The data for create
and update is provided via the SequenceRuleForm .
-
Method Summary
Modifier and TypeMethodDescriptionvoidaliasSequenceRule(Id sequenceRuleId, Id aliasId) Adds aIdto aSequenceRulefor the purpose of creating compatibility.booleanTests if this user can create sequence rules.booleancanCreateSequenceRuleWithRecordTypes(Type[] sequenceRuleRecordTypes) Tests if this user can create a singleSequenceRuleusing the desired record types.booleanTests if this user can delete sequence rules.booleanTests if this user can manageIdaliases for sequence rules.booleanTests if this user can orderSequenceRules.booleanTests if this user can update sequence rules.createSequenceRule(SequenceRuleForm sequenceRuleForm) Creates a newSequenceRule.voiddeleteSequenceRule(Id sequenceRuleId) Deletes aSequenceRule.getBank()Gets theBankassociated with this session.Gets theBankIdassociated with this session.getSequenceRuleFormForCreate(Id assessmentPartId, Id nextAssessmentPartId, Type[] sequenceRuleRecordTypes) Gets the sequence rule form for creating new sequence rules between two assessment parts.getSequenceRuleFormForUpdate(Id sequenceRuleId) Gets the sequence rule form for updating an existing sequence rule.voidmoveSequenceRuleAhead(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.voidmoveSequenceRuleBehind(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.voidorderSequenceRules(Id[] sequenceRuleIds, Id assessmentPartId) Reorders a set of sequence rules for an assessment part.voidupdateSequenceRule(SequenceRuleForm sequenceRuleForm) Updates an existing sequence rule.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
-
getBankId
Id getBankId()Gets theBankIdassociated with this session.- Returns:
- the
Bank Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getBank
Gets theBankassociated with this session.- Returns:
- the bank
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canCreateSequenceRule
boolean canCreateSequenceRule()Tests if this user can create sequence rules. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating aSequenceRulewill 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:
falseifSequenceRulecreation is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canCreateSequenceRuleWithRecordTypes
Tests if this user can create a singleSequenceRuleusing the desired record types. WhileAssessmentAuthoringManager.getSequenceRuleRecordTypes()can be used to examine which records are supported, this method tests which record(s) are required for creating a specificSequenceRule. Providing an empty array tests if aSequenceRulecan be created with no records.- Parameters:
sequenceRuleRecordTypes- array of sequence rule record types- Returns:
trueifSequenceRulecreation using the specified recordTypesis supported,falseotherwise- Throws:
NullArgumentException-sequenceRuleRecordTypesisnull- Compliance:
mandatory- This method must be implemented.
-
getSequenceRuleFormForCreate
SequenceRuleForm getSequenceRuleFormForCreate(Id assessmentPartId, Id nextAssessmentPartId, Type[] sequenceRuleRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the sequence rule form for creating new sequence rules between two assessment parts. A new form should be requested for each create transaction.- Parameters:
assessmentPartId- the source assessment partIdnextAssessmentPartId- the target assessment partIdsequenceRuleRecordTypes- array of sequence rule record types- Returns:
- the sequence rule form
- Throws:
InvalidArgumentException-assessmentPartIdandnextAssessmentPartIdnot on the same assessmentNotFoundException-assessmentPartIdornextAssessmentPartIdis not foundNullArgumentException-assessmentPartId, nextAssessmentPartId, orsequenceRuleRecordTypesisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException- unable to get form for requested record types- Compliance:
mandatory- This method must be implemented.
-
createSequenceRule
SequenceRule createSequenceRule(SequenceRuleForm sequenceRuleForm) throws OperationFailedException, PermissionDeniedException Creates a newSequenceRule.- Parameters:
sequenceRuleForm- the form for thisSequenceRule- Returns:
- the new
SequenceRule - Throws:
IllegalStateException-sequenceRuleFormalready used in a create transactionInvalidArgumentException- one or more of the form elements is invalidNullArgumentException-sequenceRuleFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-sequenceRuleFormdid not originate fromgetSequenceRuleFormForCreate()- Compliance:
mandatory- This method must be implemented.
-
canUpdateSequenceRules
boolean canUpdateSequenceRules()Tests if this user can update sequence rules. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating aSequenceRulewill 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:
falseifSequenceRulemodification is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getSequenceRuleFormForUpdate
SequenceRuleForm getSequenceRuleFormForUpdate(Id sequenceRuleId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the sequence rule form for updating an existing sequence rule. A new sequence rule form should be requested for each update transaction.- Parameters:
sequenceRuleId- theIdof theSequenceRule- Returns:
- the sequence rule form
- Throws:
NotFoundException-sequenceRuleIdis not foundNullArgumentException-sequenceRuleIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
updateSequenceRule
void updateSequenceRule(SequenceRuleForm sequenceRuleForm) throws OperationFailedException, PermissionDeniedException Updates an existing sequence rule.- Parameters:
sequenceRuleForm- the form containing the elements to be updated- Throws:
IllegalStateException-sequenceRuleFormalready used in an update transactionInvalidArgumentException- the form contains an invalid valueNullArgumentException-sequenceRuleFormisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failureUnsupportedException-sequenceRuleFormdid not originate fromgetSequenceRuleFormForUpdate()- Compliance:
mandatory- This method must be implemented.
-
canDeleteSequenceRules
boolean canDeleteSequenceRules()Tests if this user can delete sequence rules. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting aSequenceRulewill 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:
falseifSequenceRuledeletion is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
deleteSequenceRule
void deleteSequenceRule(Id sequenceRuleId) throws NotFoundException, OperationFailedException, PermissionDeniedException Deletes aSequenceRule.- Parameters:
sequenceRuleId- theIdof theSequenceRuleto remove- Throws:
NotFoundException-sequenceRuleIdnot foundNullArgumentException-sequenceRuleIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canManageSequenceRuleAliases
boolean canManageSequenceRuleAliases()Tests if this user can manageIdaliases 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.- Returns:
falseifSequenceRulealiasing is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
aliasSequenceRule
void aliasSequenceRule(Id sequenceRuleId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds aIdto aSequenceRulefor the purpose of creating compatibility. The primaryIdof theSequenceRuleis determined by the provider. The newIdperforms as an alias to the primaryId. If the alias is a pointer to another sequence rule. it is reassigned to the given sequence ruleId.- Parameters:
sequenceRuleId- theIdof aSequenceRulealiasId- the aliasId- Throws:
AlreadyExistsException-aliasIdis already assignedNotFoundException-sequenceRuleIdnot foundNullArgumentException-sequenceRuleIdoraliasIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canSequenceSequenceRules
boolean canSequenceSequenceRules()Tests if this user can orderSequenceRules. 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:
falseifSequenceRuleordering is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
moveSequenceRuleAhead
void moveSequenceRuleAhead(Id sequenceRuleId, Id assessmentPartId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders sequence rule for a source assessment part by moving the specified sequence rule in front of a reference sequence rule.- Parameters:
sequenceRuleId- theIdof aSequenceRuleassessmentPartId- theIdof anAssessmentPartreferenceId- the reference sequence ruleId- Throws:
NotFoundException-sequenceRuleId, assessmentPartId, orreferenceIdnot found or,sequenceRuleIdorreferenceIdnot related toassessmentPartIdNullArgumentException-sequenceRuleId, assessmentPartId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
moveSequenceRuleBehind
void moveSequenceRuleBehind(Id sequenceRuleId, Id assessmentPartId, Id referenceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders sequence rule for a source assessment part by moving the specified sequence rule behind a reference sequence rule.- Parameters:
sequenceRuleId- theIdof aSequenceRuleassessmentPartId- theIdof anAssessmentPartreferenceId- the reference sequence ruleId- Throws:
NotFoundException-sequenceRuleId, assessmentPartId, orreferenceIdnot found or,sequenceRuleIdorreferenceIdnot related toassessmentPartIdNullArgumentException-sequenceRuleId, assessmentPartId, orreferenceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
orderSequenceRules
void orderSequenceRules(Id[] sequenceRuleIds, Id assessmentPartId) throws NotFoundException, OperationFailedException, PermissionDeniedException Reorders a set of sequence rules for an assessment part.- Parameters:
sequenceRuleIds- theIdsfor a set ofSequenceRulesassessmentPartId- theIdof anAssessmentPart- Throws:
NotFoundException-assessmentPartIdnot found or, asequenceRuleIdnot related toassessmentPartIdNullArgumentException-sequenceRuleIdsorassessmentPartIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-