Search in sources :

Example 1 with DataAccessFeasibilityNotEnabled

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

the class DataAccessRequestResource method getFeasibility.

@Path("/feasibility/{feasibilityId}")
public DataAccessFeasibilityResource getFeasibility(@PathParam("id") String id, @PathParam("feasibilityId") String feasibilityId) {
    if (!dataAccessRequestService.isFeasibilityEnabled())
        throw new DataAccessFeasibilityNotEnabled();
    dataAccessRequestService.findById(id);
    DataAccessFeasibilityResource dataAccessFeasibilityResource = applicationContext.getBean(DataAccessFeasibilityResource.class);
    dataAccessFeasibilityResource.setParentId(id);
    dataAccessFeasibilityResource.setId(feasibilityId);
    return dataAccessFeasibilityResource;
}
Also used : DataAccessFeasibilityNotEnabled(org.obiba.mica.micaConfig.DataAccessFeasibilityNotEnabled)

Example 2 with DataAccessFeasibilityNotEnabled

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

the class DataAccessRequestResource method getFeasibilities.

@Path("/feasibilities")
public DataAccessFeasibilitiesResource getFeasibilities(@PathParam("id") String id) {
    if (!dataAccessRequestService.isFeasibilityEnabled())
        throw new DataAccessFeasibilityNotEnabled();
    dataAccessRequestService.findById(id);
    DataAccessFeasibilitiesResource dataAccessFeasibilitiesResource = applicationContext.getBean(DataAccessFeasibilitiesResource.class);
    dataAccessFeasibilitiesResource.setParentId(id);
    return dataAccessFeasibilitiesResource;
}
Also used : DataAccessFeasibilityNotEnabled(org.obiba.mica.micaConfig.DataAccessFeasibilityNotEnabled)

Aggregations

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