Interface AuditConstrainerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AuditConstrainerAdminSession extends OsidSession

This session creates, updates, and deletes AuditConstrainers . 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 AuditConstrainer , an AuditConstrainerForm is requested using getAuditConstrainerFormForCreate() specifying the desired record Types or none if no record Types are needed. The returned AuditConstrainerForm 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 AuditConstrainerForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each AuditConstrainerForm corresponds to an attempted transaction.

For updates, AuditConstrainerForms are requested to the AuditConstrainer Id that is to be updated using getAuditConstrainerFormForUpdate() . Similarly, the AuditConstrainerForm has metadata about the data that can be updated and it can perform validation before submitting the update. The AuditConstrainerForm can only be used once for a successful update and cannot be reused.

The delete operations delete AuditConstrainers . To unmap an AuditConstrainer from the current Inquest , the AuditConstrainerInquestAssignmentSession should be used. These delete operations attempt to remove the AuditConstrainer itself thus removing it from all known Inquest catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id .

  • Method Details

    • getInquestId

      Id getInquestId()
      Gets the Inquest Id associated with this session.
      Returns:
      the Inquest Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getInquest

      Gets the Inquest associated with this session.
      Returns:
      the inquest
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canCreateAuditConstrainers

      boolean canCreateAuditConstrainers()
      Tests if this user can create AuditConstrainers . A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an AuditConstrainer will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if AuditConstrainer creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateAuditConstrainerWithRecordTypes

      boolean canCreateAuditConstrainerWithRecordTypes(Type[] auditConstrainerRecordTypes)
      Tests if this user can create a single AuditConstrainer using the desired record types. While InquiryRulesManager.getAuditConstrainerRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific AuditConstrainer . Providing an empty array tests if an AuditConstrainer can be cr eated with no records.
      Parameters:
      auditConstrainerRecordTypes - array of audit constrainer record types
      Returns:
      true if AuditConstrainer creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - auditConstrainerRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getAuditConstrainerFormForCreate

      AuditConstrainerForm getAuditConstrainerFormForCreate(Type[] auditConstrainerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the audit constrainer form for creating new audit constrainers. A new form should be requested for each create transaction.
      Parameters:
      auditConstrainerRecordTypes - array of audit constrainer record types
      Returns:
      the audit constrainer form
      Throws:
      NullArgumentException - auditConstrainerRecordTypes 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.
    • createAuditConstrainer

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

      boolean canUpdateAuditConstrainers()
      Tests if this user can update AuditConstrainers . A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an AuditConstrainer will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.
      Returns:
      false if AuditConstrainer modification is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAuditConstrainerFormForUpdate

      AuditConstrainerForm getAuditConstrainerFormForUpdate(Id auditConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the audit constrainer form for updating an existing audit constrainer. A new audit constrainer form should be requested for each update transaction.
      Parameters:
      auditConstrainerId - the Id of the AuditConstrainer
      Returns:
      the audit form
      Throws:
      NotFoundException - auditConstrainerId is not found
      NullArgumentException - auditConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateAuditConstrainer

      void updateAuditConstrainer(AuditConstrainerForm auditConstrainerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing audit constrainer.
      Parameters:
      auditConstrainerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - auditConstrainerForm already used in an update transaction
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - auditConstrainerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - auditConstrainerForm did not originate from getAuditConstrainerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteAuditConstrainers

      boolean canDeleteAuditConstrainers()
      Tests if this user can delete AuditConstrainers . A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an AuditConstrainer will result in a PERMISSION_DENIED. T his is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.
      Returns:
      false if AuditConstrainer deletion is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • deleteAuditConstrainer

      void deleteAuditConstrainer(Id auditConstrainerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Deletes an AuditConstrainer .
      Parameters:
      auditConstrainerId - the Id of the AuditConstrainer to remove
      Throws:
      NotFoundException - auditConstrainerId not found
      NullArgumentException - auditConstrainerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canManageAuditConstrainerAliases

      boolean canManageAuditConstrainerAliases()
      Tests if this user can manage Id aliases for AuditConstrainers 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 AuditConstrainer aliasing is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • aliasAuditConstrainer

      void aliasAuditConstrainer(Id auditConstrainerId, Id aliasId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an Id to an AuditConstrainer for the purpose of creating compatibility. The primary Id of the AuditConstrainer is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another audit constrainer, it is reassigned to the given audit constrainer Id.
      Parameters:
      auditConstrainerId - the Id of an AuditConstrainer
      aliasId - the alias Id
      Throws:
      AlreadyExistsException - aliasId is already assigned
      NotFoundException - auditConstrainerId not found
      NullArgumentException - auditConstrainerId or aliasId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.