Search in sources :

Example 1 with PageError

use of com.evolveum.midpoint.web.page.error.PageError in project midpoint by Evolveum.

the class PageAttorneySelection method getAttorneySelectionQuery.

private ObjectQuery getAttorneySelectionQuery() {
    ModelInteractionService service = getModelInteractionService();
    Task task = createSimpleTask(OPERATION_GET_DONOR_FILTER);
    try {
        ObjectQuery query = PageAttorneySelection.this.getPrismContext().queryFactory().createQuery();
        // todo target authorization action
        ObjectFilter filter = service.getDonorFilter(UserType.class, null, null, task, task.getResult());
        query.addFilter(filter);
        return query;
    } catch (CommonException ex) {
        LOGGER.error("Couldn't get donor filter, reason: {}", ex.getMessage());
        LOGGER.debug("Couldn't get donor filter", ex);
        PageError error = new PageError(ex);
        throw new RestartResponseException(error);
    }
}
Also used : Task(com.evolveum.midpoint.task.api.Task) ModelInteractionService(com.evolveum.midpoint.model.api.ModelInteractionService) RestartResponseException(org.apache.wicket.RestartResponseException) PageError(com.evolveum.midpoint.web.page.error.PageError) CommonException(com.evolveum.midpoint.util.exception.CommonException) ObjectFilter(com.evolveum.midpoint.prism.query.ObjectFilter) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery)

Aggregations

ModelInteractionService (com.evolveum.midpoint.model.api.ModelInteractionService)1 ObjectFilter (com.evolveum.midpoint.prism.query.ObjectFilter)1 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 Task (com.evolveum.midpoint.task.api.Task)1 CommonException (com.evolveum.midpoint.util.exception.CommonException)1 PageError (com.evolveum.midpoint.web.page.error.PageError)1 RestartResponseException (org.apache.wicket.RestartResponseException)1