Search in sources :

Example 6 with DataAccessFeasibility

use of org.obiba.mica.access.domain.DataAccessFeasibility in project mica2 by obiba.

the class DataAccessFeasibilityResource method getFeasibility.

@GET
@Timed
public Mica.DataAccessRequestDto getFeasibility() {
    subjectAclService.checkPermission(getParentResourcePath(), "VIEW", parentId);
    DataAccessFeasibility feasibility = dataAccessFeasibilityService.findById(id);
    return dtos.asFeasibilityDto(feasibility);
}
Also used : DataAccessFeasibility(org.obiba.mica.access.domain.DataAccessFeasibility) Timed(com.codahale.metrics.annotation.Timed)

Example 7 with DataAccessFeasibility

use of org.obiba.mica.access.domain.DataAccessFeasibility in project mica2 by obiba.

the class DataAccessFeasibilityResource method setVariablesSet.

@PUT
@Path("/variables")
public Response setVariablesSet() {
    subjectAclService.checkPermission(getResourcePath(), "EDIT", id);
    DataAccessFeasibility feasibility = getService().findById(id);
    feasibility.setVariablesSet(createOrUpdateVariablesSet(feasibility));
    dataAccessFeasibilityService.save(feasibility);
    return Response.noContent().build();
}
Also used : DataAccessFeasibility(org.obiba.mica.access.domain.DataAccessFeasibility)

Aggregations

DataAccessFeasibility (org.obiba.mica.access.domain.DataAccessFeasibility)7 Timed (com.codahale.metrics.annotation.Timed)2 DataAccessRequest (org.obiba.mica.access.domain.DataAccessRequest)2 DataAccessEntityStatus (org.obiba.mica.access.domain.DataAccessEntityStatus)1 DataAccessFeasibilityUpdatedEvent (org.obiba.mica.access.event.DataAccessFeasibilityUpdatedEvent)1