Class ScopeController
java.lang.Object
com.amos2020.javabackend.rest_service.controller.ScopeController
@Service
public class ScopeController
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description (package private) AuditServiceauditService(package private) ScopeServicescopeService -
Constructor Summary
Constructors Constructor Description ScopeController(ScopeService scopeService, AuditService auditService) -
Method Summary
Modifier and Type Method Description java.util.List<BasicScopeResponse>addScope(int auditId, java.util.List<java.lang.Integer> scope)Add new Scope for an existing AuditBasicScopeResponsegetScopeByIds(int auditId, int faccritId)Get a Scope object by audit id and facCrit idjava.util.List<BasicScopeResponse>getScopesByAuditId(int auditId)Get all Scope objects for an auditBasicScopeResponseupdateScope(int auditId, int facCritId, boolean removed, java.lang.String note, java.lang.String change_note)Update an existing Scope 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.NotFoundExceptionAdd new Scope for an existing Audit- Parameters:
auditId- intscope- 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.NotFoundExceptionUpdate an existing Scope object- Parameters:
auditId- intfacCritId- intremoved- boolnote- Stringchange_note- String- Returns:
- Updated Scope object
- Throws:
java.lang.IllegalAccessException- If Scope object has already been removedjavassist.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.NotFoundExceptionGet a Scope object by audit id and facCrit id- Parameters:
auditId- intfaccritId- 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.NotFoundExceptionGet 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
-