Package services.publix
Class StudyAuthorisation
- java.lang.Object
-
- services.publix.StudyAuthorisation
-
- Direct Known Subclasses:
GeneralMultipleStudyAuthorisation,GeneralSingleStudyAuthorisation,JatosStudyAuthorisation,MTStudyAuthorisation,PersonalMultipleStudyAuthorisation,PersonalSingleStudyAuthorisation
public abstract class StudyAuthorisation extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description StudyAuthorisation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcheckMaxTotalWorkers(Batch batch, Worker worker)Check if the max total worker number is reached for this batch.abstract voidcheckWorkerAllowedToDoStudy(play.mvc.Http.Session session, Worker worker, Study study, Batch batch)Checks whether the given worker is allowed to do this study in this batch.abstract voidcheckWorkerAllowedToStartStudy(play.mvc.Http.Session session, Worker worker, Study study, Batch batch)Checks whether the given worker is allowed to start this study in this batch.
-
-
-
Method Detail
-
checkWorkerAllowedToStartStudy
public abstract void checkWorkerAllowedToStartStudy(play.mvc.Http.Session session, Worker worker, Study study, Batch batch) throws ForbiddenPublixExceptionChecks whether the given worker is allowed to start this study in this batch. If the worker has no permission an ForbiddenPublixException is thrown. This method should only be used during the start of a study.- Throws:
ForbiddenPublixException
-
checkWorkerAllowedToDoStudy
public abstract void checkWorkerAllowedToDoStudy(play.mvc.Http.Session session, Worker worker, Study study, Batch batch) throws ForbiddenPublixExceptionChecks whether the given worker is allowed to do this study in this batch. If the worker has no permission an ForbiddenPublixException is thrown. This method can be used during all states of a StudyResult.- Throws:
ForbiddenPublixException
-
checkMaxTotalWorkers
public void checkMaxTotalWorkers(Batch batch, Worker worker) throws ForbiddenPublixException
Check if the max total worker number is reached for this batch. Only non-JatosWorker count here.- Throws:
ForbiddenPublixException
-
-