Interface SequenceRuleAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SequenceRuleAdminSession extends OsidSession

This session creates and removes sequence rules. The data for create and update is provided via the SequenceRuleForm .

  • Method Details

    • getBankId

      Id getBankId()
      Gets the Bank Id associated with this session.
      Returns:
      the Bank Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getBank

      Gets the Bank associated with this session.
      Returns:
      the bank
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 a 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.
      Returns:
      false if SequenceRule creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateSequenceRuleWithRecordTypes

      boolean canCreateSequenceRuleWithRecordTypes(Type[] sequenceRuleRecordTypes)
      Tests if this user can create a single 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.
      Parameters:
      sequenceRuleRecordTypes - array of sequence rule record types
      Returns:
      true if SequenceRule creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - sequenceRuleRecordTypes is null
      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 part Id
      nextAssessmentPartId - the target assessment part Id
      sequenceRuleRecordTypes - array of sequence rule record types
      Returns:
      the sequence rule form
      Throws:
      InvalidArgumentException - assessmentPartId and nextAssessmentPartId not on the same assessment
      NotFoundException - assessmentPartId or nextAssessmentPartId is not found
      NullArgumentException - assessmentPartId, nextAssessmentPartId , or sequenceRuleRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • createSequenceRule

      Creates a new SequenceRule .
      Parameters:
      sequenceRuleForm - the form for this SequenceRule
      Returns:
      the new SequenceRule
      Throws:
      IllegalStateException - sequenceRuleForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - sequenceRuleForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - sequenceRuleForm did not originate from getSequenceRuleFormForCreate()
      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 a 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.
      Returns:
      false if SequenceRule modification is not authorized, true otherwise
      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 - the Id of the SequenceRule
      Returns:
      the sequence rule form
      Throws:
      NotFoundException - sequenceRuleId is not found
      NullArgumentException - sequenceRuleId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - 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 - sequenceRuleForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - sequenceRuleForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - sequenceRuleForm did not originate from getSequenceRuleFormForUpdate()
      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 a 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.
      Returns:
      false if SequenceRule deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteSequenceRule

      void deleteSequenceRule(Id sequenceRuleId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes a SequenceRule .
      Parameters:
      sequenceRuleId - the Id of the SequenceRule to remove
      Throws:
      NotFoundException - sequenceRuleId not found
      NullArgumentException - sequenceRuleId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageSequenceRuleAliases

      boolean canManageSequenceRuleAliases()
      Tests if this user can manage 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.
      Returns:
      false if SequenceRule aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasSequenceRule

      void aliasSequenceRule(Id sequenceRuleId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds a 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 .
      Parameters:
      sequenceRuleId - the Id of a SequenceRule
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - sequenceRuleId not found
      NullArgumentException - sequenceRuleId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canSequenceSequenceRules

      boolean canSequenceSequenceRules()
      Tests if this user can order 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.
      Returns:
      false if SequenceRule ordering is not authorized, true otherwise
      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 - the Id of a SequenceRule
      assessmentPartId - the Id of an AssessmentPart
      referenceId - the reference sequence rule Id
      Throws:
      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 request
      PermissionDeniedException - 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 - the Id of a SequenceRule
      assessmentPartId - the Id of an AssessmentPart
      referenceId - the reference sequence rule Id
      Throws:
      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 request
      PermissionDeniedException - 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 - the Ids for a set of SequenceRules
      assessmentPartId - the Id of an AssessmentPart
      Throws:
      NotFoundException - assessmentPartId not found or, a sequenceRuleId not related to assessmentPartId
      NullArgumentException - sequenceRuleIds or assessmentPartId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.