Search in sources :

Example 1 with DataAccessAmendmentsNotEnabled

use of org.obiba.mica.micaConfig.DataAccessAmendmentsNotEnabled in project mica2 by obiba.

the class DataAccessRequestResource method getAmendments.

@Path("/amendments")
public DataAccessAmendmentsResource getAmendments(@PathParam("id") String id) {
    if (!dataAccessRequestService.isAmendmentsEnabled())
        throw new DataAccessAmendmentsNotEnabled();
    dataAccessRequestService.findById(id);
    DataAccessAmendmentsResource dataAccessAmendmentsResource = applicationContext.getBean(DataAccessAmendmentsResource.class);
    dataAccessAmendmentsResource.setParentId(id);
    return dataAccessAmendmentsResource;
}
Also used : DataAccessAmendmentsNotEnabled(org.obiba.mica.micaConfig.DataAccessAmendmentsNotEnabled)

Example 2 with DataAccessAmendmentsNotEnabled

use of org.obiba.mica.micaConfig.DataAccessAmendmentsNotEnabled in project mica2 by obiba.

the class DataAccessRequestResource method getAmendment.

@Path("/amendment/{amendmentId}")
public DataAccessAmendmentResource getAmendment(@PathParam("id") String id, @PathParam("amendmentId") String amendmentId) {
    if (!dataAccessRequestService.isAmendmentsEnabled())
        throw new DataAccessAmendmentsNotEnabled();
    dataAccessRequestService.findById(id);
    DataAccessAmendmentResource dataAccessAmendmentResource = applicationContext.getBean(DataAccessAmendmentResource.class);
    dataAccessAmendmentResource.setParentId(id);
    dataAccessAmendmentResource.setId(amendmentId);
    return dataAccessAmendmentResource;
}
Also used : DataAccessAmendmentsNotEnabled(org.obiba.mica.micaConfig.DataAccessAmendmentsNotEnabled)

Aggregations

DataAccessAmendmentsNotEnabled (org.obiba.mica.micaConfig.DataAccessAmendmentsNotEnabled)2