@Singleton
public class Checker
extends java.lang.Object
Constructor and Description |
---|
Checker() |
Modifier and Type | Method and Description |
---|---|
void |
checkComponentResult(ComponentResult componentResult,
User user,
boolean studyMustNotBeLocked)
Checks a ComponentResult whether the belonging Study and Component are fine (checkStandard).
|
void |
checkComponentResults(java.util.List<ComponentResult> componentResultList,
User user,
boolean studyMustNotBeLocked)
Checks a list of ComponentResult.
|
void |
checkDefaultBatch(Batch batch)
Throws an ForbiddenException if this batch is the default batch of it's study.
|
void |
checkStandardForBatch(Batch batch,
Study study,
java.lang.Long batchId)
Checks the batch and throws an Exception in case of a problem.
|
void |
checkStandardForComponents(java.lang.Long studyId,
java.lang.Long componentId,
Component component)
Checks the component of this study and throws an Exception in case of a problem.
|
void |
checkStandardForGroup(GroupResult groupResult,
Study study,
java.lang.Long groupResultId)
Checks the group and throws an Exception in case of a problem.
|
void |
checkStandardForStudy(Study study,
java.lang.Long studyId,
User user)
Checks the study and throws an Exception in case of a problem.
|
void |
checkStudyLocked(Study study)
Throws an ForbiddenException if a study is locked.
|
void |
checkStudyResult(StudyResult studyResult,
User user,
boolean studyMustNotBeLocked)
Checks a StudyResult whether the belonging Study is fine, especially that the StudyResult belongs to this user.
|
void |
checkStudyResults(java.util.List<StudyResult> studyResultList,
User user,
boolean studyMustNotBeLocked)
Checks a list of StudyResult.
|
void |
checkWorker(Worker worker,
java.lang.Long workerId)
Throws a Exception in case the worker doesn't exist.
|
void |
isUserAllowedToAccessWorker(User user,
Worker worker) |
public void checkStandardForComponents(java.lang.Long studyId, java.lang.Long componentId, Component component) throws BadRequestException
BadRequestException
public void checkStandardForBatch(Batch batch, Study study, java.lang.Long batchId) throws ForbiddenException, BadRequestException
public void checkStandardForGroup(GroupResult groupResult, Study study, java.lang.Long groupResultId) throws ForbiddenException, BadRequestException
public void checkDefaultBatch(Batch batch) throws ForbiddenException
ForbiddenException
public void checkStudyLocked(Study study) throws ForbiddenException
ForbiddenException
public void checkStandardForStudy(Study study, java.lang.Long studyId, User user) throws ForbiddenException, BadRequestException
public void checkComponentResults(java.util.List<ComponentResult> componentResultList, User user, boolean studyMustNotBeLocked) throws ForbiddenException, BadRequestException
componentResultList
- A list of ComponentResultsuser
- The study that corresponds to the results must have this user otherwise
ForbiddenException will be thrown.studyMustNotBeLocked
- If true the study that corresponds to the results must not be locked and it will
throw an ForbiddenException.ForbiddenException
BadRequestException
public void checkComponentResult(ComponentResult componentResult, User user, boolean studyMustNotBeLocked) throws ForbiddenException, BadRequestException
componentResult
- A ComponentResultsuser
- The study that corresponds to the results must have this user otherwise
ForbiddenException will be thrown.studyMustNotBeLocked
- If true the study that corresponds to the results must not be locked and it will
throw an ForbiddenException.ForbiddenException
BadRequestException
public void checkStudyResult(StudyResult studyResult, User user, boolean studyMustNotBeLocked) throws ForbiddenException, BadRequestException
studyResult
- A StudyResultsuser
- The study that corresponds to the results must have this user otherwise
ForbiddenException will be thrown.studyMustNotBeLocked
- If true the study that corresponds to the results must not be locked and it will
throw an ForbiddenException.ForbiddenException
BadRequestException
public void checkStudyResults(java.util.List<StudyResult> studyResultList, User user, boolean studyMustNotBeLocked) throws ForbiddenException, BadRequestException
studyResultList
- A list of StudyResultsuser
- The study that corresponds to the results must have this user otherwise
ForbiddenException will be thrown.studyMustNotBeLocked
- If true the study that corresponds to the results must not be locked and it will
throw an ForbiddenException.ForbiddenException
BadRequestException
public void checkWorker(Worker worker, java.lang.Long workerId) throws BadRequestException
BadRequestException
public void isUserAllowedToAccessWorker(User user, Worker worker) throws ForbiddenException
ForbiddenException