Interface AuditEnablerAdminSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AuditEnablerAdminSession extends OsidSession

This session creates and removes audit enablers. The data for create and update is provided via the AuditEnablerForm .

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

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

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

      AuditEnablerForm getAuditEnablerFormForCreate(Type[] auditEnablerRecordTypes) throws OperationFailedException, PermissionDeniedException
      Gets the audit enabler form for creating new audit enablers. A new form should be requested for each create transinquiry.
      Parameters:
      auditEnablerRecordTypes - array of audit enabler record types
      Returns:
      the audit enabler form
      Throws:
      NullArgumentException - auditEnablerRecordTypes 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.
    • createAuditEnabler

      Creates a new AuditEnabler .
      Parameters:
      auditEnablerForm - the form for this AuditEnabler
      Returns:
      the new AuditEnabler
      Throws:
      IllegalStateException - auditEnablerForm already used in a create transinquiry
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - auditEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - auditEnablerForm did not originate from getAuditEnablerFormForCreate()
      Compliance:
      mandatory - This method must be implemented.
    • canUpdateAuditEnablers

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

      AuditEnablerForm getAuditEnablerFormForUpdate(Id auditEnablerId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the audit enabler form for updating an existing audit enabler. A new audit enabler form should be requested for each update transinquiry.
      Parameters:
      auditEnablerId - the Id of the AuditEnabler
      Returns:
      the audit enabler form
      Throws:
      NotFoundException - auditEnablerId is not found
      NullArgumentException - auditEnablerId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • updateAuditEnabler

      void updateAuditEnabler(AuditEnablerForm auditEnablerForm) throws OperationFailedException, PermissionDeniedException
      Updates an existing audit enabler.
      Parameters:
      auditEnablerForm - the form containing the elements to be updated
      Throws:
      IllegalStateException - auditEnablerForm already used in an update transinquiry
      InvalidArgumentException - the form contains an invalid value
      NullArgumentException - auditEnablerForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - auditEnablerForm did not originate from getAuditEnablerFormForUpdate()
      Compliance:
      mandatory - This method must be implemented.
    • canDeleteAuditEnablers

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

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

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

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