Interface SequenceRuleEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface SequenceRuleEnablerAdminSession extends OsidSession

This session creates and removes sequence rule enablers. The data for create and update is provided via the SequenceRuleEnablerForm .

  • 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.
    • canCreateSequenceRuleEnabler

      boolean canCreateSequenceRuleEnabler()
      Tests if this user can create sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a SequenceRuleEnabler 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 SequenceRuleEnabler creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateSequenceRuleEnablerWithRecordTypes

      boolean canCreateSequenceRuleEnablerWithRecordTypes(Type[] sequenceRuleEnablerRecordTypes)
      Tests if this user can create a single SequenceRuleEnabler using the desired record types. While AssessmentAuthoringManager.getSequenceRuleEnablerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific SequenceRuleEnabler . Providing an empty array tests if a SequenceRuleEnabler can be created with no records.
      Parameters:
      sequenceRuleEnablerRecordTypes - array of sequence rule enabler record types
      Returns:
      true if SequenceRuleEnabler creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - sequenceRuleEnablerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getSequenceRuleEnablerFormForCreate

      SequenceRuleEnablerForm getSequenceRuleEnablerFormForCreate(Type[] sequenceRuleEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the sequence rule enabler form for creating new sequence rule enablers. A new form should be requested for each create transaction.
      Parameters:
      sequenceRuleEnablerRecordTypes - array of sequence rule enabler record types
      Returns:
      the sequence rule enabler form
      Throws:
      NullArgumentException - sequenceRuleEnablerRecordTypes 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.
    • createSequenceRuleEnabler

      SequenceRuleEnabler createSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) throws OperationFailedException, PermissionDeniedException
      Creates a new SequenceRuleEnabler .
      Parameters:
      sequenceRuleEnablerForm - the form for this SequenceRuleEnabler
      Returns:
      the new SequenceRuleEnabler
      Throws:
      IllegalStateException - sequenceRuleEnablerForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - sequenceRuleEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - sequenceRuleEnablerForm did not originate from getSequenceRuleEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateSequenceRuleEnablers

      boolean canUpdateSequenceRuleEnablers()
      Tests if this user can update sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a SequenceRuleEnabler 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 SequenceRuleEnabler modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSequenceRuleEnablerFormForUpdate

      SequenceRuleEnablerForm getSequenceRuleEnablerFormForUpdate(Id sequenceRuleEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the sequence rule enabler form for updating an existing sequence rule enabler. A new sequence rule enabler form should be requested for each update transaction.
      Parameters:
      sequenceRuleEnablerId - the Id of the SequenceRuleEnabler
      Returns:
      the sequence rule enabler form
      Throws:
      NotFoundException - sequenceRuleEnablerId is not found
      NullArgumentException - sequenceRuleEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateSequenceRuleEnabler

      void updateSequenceRuleEnabler(SequenceRuleEnablerForm sequenceRuleEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing sequence rule enabler.
      Parameters:
      sequenceRuleEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - sequenceRuleEnablerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - sequenceRuleEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - sequenceRuleEnablerForm did not originate from getSequenceRuleEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteSequenceRuleEnablers

      boolean canDeleteSequenceRuleEnablers()
      Tests if this user can delete sequence rule enablers. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a SequenceRuleEnabler 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 SequenceRuleEnabler deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteSequenceRuleEnabler

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

      boolean canManageSequenceRuleEnablerAliases()
      Tests if this user can manage Id aliases for sequence rule enablers. 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 SequenceRuleEnabler aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasSequenceRuleEnabler

      void aliasSequenceRuleEnabler(Id sequenceRuleEnablerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds a Id to a SequenceRuleEnabler for the purpose of creating compatibility. The primary Id of the SequenceRuleEnabler 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 enabler. it is reassigned to the given sequence rule enabler Id .
      Parameters:
      sequenceRuleEnablerId - the Id of a SequenceRuleEnabler
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - sequenceRuleEnablerId not found
      NullArgumentException - sequenceRuleEnablerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.