Package controllers.gui
Class StudyLinks
- java.lang.Object
-
- play.mvc.Results
-
- play.mvc.Controller
-
- controllers.gui.StudyLinks
-
- All Implemented Interfaces:
play.mvc.Http.HeaderNames,play.mvc.Http.Status
@Singleton public class StudyLinks extends play.mvc.ControllerController for all actions regarding study links, batches, and workers within the JATOS GUI.
-
-
Field Summary
-
Fields inherited from interface play.mvc.Http.HeaderNames
ACCEPT, ACCEPT_CHARSET, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ACCEPT_RANGES, ACCESS_CONTROL_ALLOW_CREDENTIALS, ACCESS_CONTROL_ALLOW_HEADERS, ACCESS_CONTROL_ALLOW_METHODS, ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_EXPOSE_HEADERS, ACCESS_CONTROL_MAX_AGE, ACCESS_CONTROL_REQUEST_HEADERS, ACCESS_CONTROL_REQUEST_METHOD, AGE, ALLOW, AUTHORIZATION, CACHE_CONTROL, CONNECTION, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_RANGE, CONTENT_SECURITY_POLICY, CONTENT_SECURITY_POLICY_REPORT_ONLY, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE, COOKIE, DATE, ETAG, EXPECT, EXPIRES, FORWARDED, FROM, HOST, IF_MATCH, IF_MODIFIED_SINCE, IF_NONE_MATCH, IF_RANGE, IF_UNMODIFIED_SINCE, LAST_MODIFIED, LINK, LOCATION, MAX_FORWARDS, ORIGIN, PRAGMA, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, RANGE, REFERER, REFERRER_POLICY, RETRY_AFTER, SERVER, SET_COOKIE, SET_COOKIE2, STRICT_TRANSPORT_SECURITY, TE, TRAILER, TRANSFER_ENCODING, UPGRADE, USER_AGENT, VARY, VIA, WARNING, WWW_AUTHENTICATE, X_CONTENT_SECURITY_POLICY_NONCE_HEADER, X_CONTENT_TYPE_OPTIONS, X_FORWARDED_FOR, X_FORWARDED_HOST, X_FORWARDED_PORT, X_FORWARDED_PROTO, X_FRAME_OPTIONS, X_PERMITTED_CROSS_DOMAIN_POLICIES, X_REQUESTED_WITH, X_XSS_PROTECTION
-
Fields inherited from interface play.mvc.Http.Status
ACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CONTINUE, CREATED, EXPECTATION_FAILED, FAILED_DEPENDENCY, FORBIDDEN, FOUND, GATEWAY_TIMEOUT, GONE, HTTP_VERSION_NOT_SUPPORTED, IM_A_TEAPOT, INSUFFICIENT_STORAGE, INTERNAL_SERVER_ERROR, LENGTH_REQUIRED, LOCKED, METHOD_NOT_ALLOWED, MOVED_PERMANENTLY, MULTI_STATUS, MULTIPLE_CHOICES, NETWORK_AUTHENTICATION_REQUIRED, NO_CONTENT, NON_AUTHORITATIVE_INFORMATION, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, NOT_MODIFIED, OK, PARTIAL_CONTENT, PAYMENT_REQUIRED, PERMANENT_REDIRECT, PRECONDITION_FAILED, PRECONDITION_REQUIRED, PROXY_AUTHENTICATION_REQUIRED, REQUEST_ENTITY_TOO_LARGE, REQUEST_HEADER_FIELDS_TOO_LARGE, REQUEST_TIMEOUT, REQUEST_URI_TOO_LONG, REQUESTED_RANGE_NOT_SATISFIABLE, RESET_CONTENT, SEE_OTHER, SERVICE_UNAVAILABLE, SWITCHING_PROTOCOLS, TEMPORARY_REDIRECT, TOO_MANY_REQUESTS, UNAUTHORIZED, UNPROCESSABLE_ENTITY, UNSUPPORTED_MEDIA_TYPE, UPGRADE_REQUIRED, USE_PROXY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description play.mvc.ResultbatchById(java.lang.Long studyId, java.lang.Long batchId)GET request that returns Batch data belonging to the given study as JSON.play.mvc.ResultbatchesByStudy(java.lang.Long studyId)GET request that returns the data of all Batches of the given study as JSON.play.mvc.ResultbatchProperties(java.lang.Long studyId, java.lang.Long batchId)GET request that returns Batch properties as JSONplay.mvc.ResulteditWorkerComment(play.mvc.Http.Request request, java.lang.Long workerId)POST request to change a Worker's comment.play.mvc.ResultremoveBatch(java.lang.Long studyId, java.lang.Long batchId)DELETE request to remove a Batchplay.mvc.ResultstudyLinks(play.mvc.Http.Request request, java.lang.Long studyId)GET request to get the Study Links pageplay.mvc.ResultstudyLinksData(java.lang.Long studyId, java.lang.Long batchId, java.lang.String workerType)GET request that returns a JSON object used in the Study Links page to fill the study links table for the Personal type workersplay.mvc.ResultstudyLinksSetupData(java.lang.Long studyId, java.lang.Long batchId)GET request that returns a JSON object use in the Study Links page with a list of data aggregated from StudyLink, Worker and Batchplay.mvc.ResultsubmitCreatedBatch(play.mvc.Http.Request request, java.lang.Long studyId)POST request to submit a newly created Batchplay.mvc.ResultsubmitEditedBatchProperties(play.mvc.Http.Request request, java.lang.Long studyId, java.lang.Long batchId)POST request to submit changed Batch propertiesplay.mvc.ResulttoggleAllowedWorkerType(java.lang.Long studyId, java.lang.Long batchId, java.lang.String workerType, java.lang.Boolean allow)POST request to allow or deny a worker type in a batch.play.mvc.ResulttoggleGroupFixed(java.lang.Long studyId, java.lang.Long groupResultId, boolean fixed)GET request to toggle the group state FIXED / STARTEDplay.mvc.ResulttoggleStudyLinkActive(java.lang.Long studyId, java.lang.Long batchId, java.lang.String studyCode, java.lang.Boolean active)POST request to change the property 'active' of a StudyLink.-
Methods inherited from class play.mvc.Controller
changeLang, changeLang, clearLang, ctx, flash, flash, flash, lang, request, response, session, session, session, TODO, TODO
-
Methods inherited from class play.mvc.Results
badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, badRequest, contentDispositionHeader, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, created, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, forbidden, found, found, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, internalServerError, movedPermanently, movedPermanently, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, networkAuthenticationRequired, noContent, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notAcceptable, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, notFound, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, ok, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, paymentRequired, permanentRedirect, permanentRedirect, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, preconditionRequired, redirect, redirect, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, requestHeaderFieldsTooLarge, seeOther, seeOther, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, status, temporaryRedirect, temporaryRedirect, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, tooManyRequests, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unauthorized, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType, unsupportedMediaType
-
-
-
-
Method Detail
-
studyLinks
public play.mvc.Result studyLinks(play.mvc.Http.Request request, java.lang.Long studyId) throws JatosGuiExceptionGET request to get the Study Links page- Throws:
JatosGuiException
-
batchById
public play.mvc.Result batchById(java.lang.Long studyId, java.lang.Long batchId) throws ForbiddenException, NotFoundExceptionGET request that returns Batch data belonging to the given study as JSON. It includes the count of its StudyResults and GroupResults.- Throws:
ForbiddenExceptionNotFoundException
-
batchesByStudy
public play.mvc.Result batchesByStudy(java.lang.Long studyId) throws ForbiddenException, NotFoundExceptionGET request that returns the data of all Batches of the given study as JSON. It includes the count of their StudyResults, count of their GroupResults, and the count of their Workers.- Throws:
ForbiddenExceptionNotFoundException
-
submitCreatedBatch
public play.mvc.Result submitCreatedBatch(play.mvc.Http.Request request, java.lang.Long studyId) throws ForbiddenException, NotFoundExceptionPOST request to submit a newly created Batch- Throws:
ForbiddenExceptionNotFoundException
-
toggleGroupFixed
public play.mvc.Result toggleGroupFixed(java.lang.Long studyId, java.lang.Long groupResultId, boolean fixed) throws ForbiddenException, NotFoundExceptionGET request to toggle the group state FIXED / STARTED- Throws:
ForbiddenExceptionNotFoundException
-
batchProperties
public play.mvc.Result batchProperties(java.lang.Long studyId, java.lang.Long batchId) throws ForbiddenException, NotFoundExceptionGET request that returns Batch properties as JSON- Throws:
ForbiddenExceptionNotFoundException
-
submitEditedBatchProperties
public play.mvc.Result submitEditedBatchProperties(play.mvc.Http.Request request, java.lang.Long studyId, java.lang.Long batchId) throws ForbiddenException, NotFoundExceptionPOST request to submit changed Batch properties- Throws:
ForbiddenExceptionNotFoundException
-
toggleAllowedWorkerType
public play.mvc.Result toggleAllowedWorkerType(java.lang.Long studyId, java.lang.Long batchId, java.lang.String workerType, java.lang.Boolean allow) throws BadRequestException, ForbiddenException, NotFoundExceptionPOST request to allow or deny a worker type in a batch.
-
removeBatch
public play.mvc.Result removeBatch(java.lang.Long studyId, java.lang.Long batchId) throws ForbiddenException, NotFoundExceptionDELETE request to remove a Batch- Throws:
ForbiddenExceptionNotFoundException
-
studyLinksSetupData
public play.mvc.Result studyLinksSetupData(java.lang.Long studyId, java.lang.Long batchId) throws ForbiddenException, NotFoundExceptionGET request that returns a JSON object use in the Study Links page with a list of data aggregated from StudyLink, Worker and Batch- Throws:
ForbiddenExceptionNotFoundException
-
studyLinksData
public play.mvc.Result studyLinksData(java.lang.Long studyId, java.lang.Long batchId, java.lang.String workerType) throws ForbiddenException, NotFoundExceptionGET request that returns a JSON object used in the Study Links page to fill the study links table for the Personal type workers- Throws:
ForbiddenExceptionNotFoundException
-
toggleStudyLinkActive
public play.mvc.Result toggleStudyLinkActive(java.lang.Long studyId, java.lang.Long batchId, java.lang.String studyCode, java.lang.Boolean active) throws ForbiddenException, NotFoundExceptionPOST request to change the property 'active' of a StudyLink.- Throws:
ForbiddenExceptionNotFoundException
-
editWorkerComment
public play.mvc.Result editWorkerComment(play.mvc.Http.Request request, java.lang.Long workerId) throws BadRequestExceptionPOST request to change a Worker's comment. Traditionally, comments are stored with the Worker and not with the StudyLink.- Throws:
BadRequestException
-
-