Class ScopeController

java.lang.Object
com.amos2020.javabackend.rest_service.controller.ScopeController

@Service
public class ScopeController
extends java.lang.Object
  • Field Details

  • Constructor Details

  • Method Details

    • addScope

      public java.util.List<BasicScopeResponse> addScope​(int auditId, java.util.List<java.lang.Integer> scope) throws javassist.NotFoundException
      Add new Scope for an existing Audit
      Parameters:
      auditId - int
      scope - List
      Returns:
      New Scope
      Throws:
      javassist.NotFoundException - If Audit id or facCrit id is invalid and can not be found
    • updateScope

      public BasicScopeResponse updateScope​(int auditId, int facCritId, boolean removed, java.lang.String note, java.lang.String change_note) throws java.lang.IllegalAccessException, javassist.NotFoundException
      Update an existing Scope object
      Parameters:
      auditId - int
      facCritId - int
      removed - bool
      note - String
      change_note - String
      Returns:
      Updated Scope object
      Throws:
      java.lang.IllegalAccessException - If Scope object has already been removed
      javassist.NotFoundException - If one or more ids are invalid and the scope object can not be found
    • getScopeByIds

      public BasicScopeResponse getScopeByIds​(int auditId, int faccritId) throws javassist.NotFoundException
      Get a Scope object by audit id and facCrit id
      Parameters:
      auditId - int
      faccritId - int
      Returns:
      Scope object
      Throws:
      javassist.NotFoundException - If the audit id or the facCrit id is invalid and can not be found
    • getScopesByAuditId

      public java.util.List<BasicScopeResponse> getScopesByAuditId​(int auditId) throws javassist.NotFoundException
      Get all Scope objects for an audit
      Parameters:
      auditId - int
      Returns:
      List of Scope obejcts
      Throws:
      javassist.NotFoundException - If the audit id is invalid and can not be found