use of eu.bcvsolutions.idm.core.security.api.dto.AuthorizationEvaluatorDto in project CzechIdMng by bcvsolutions.
the class DefaultAuthorizationManager method getSupportedEvaluators.
@Override
@SuppressWarnings({ "rawtypes" })
public List<AuthorizationEvaluatorDto> getSupportedEvaluators() {
List<AuthorizationEvaluatorDto> evaluators = new ArrayList<>();
for (Entry<String, AuthorizationEvaluator> entry : context.getBeansOfType(AuthorizationEvaluator.class).entrySet()) {
AuthorizationEvaluator<?> evaluator = entry.getValue();
AuthorizationEvaluatorDto evaluatorDto = new AuthorizationEvaluatorDto();
evaluatorDto.setEntityType(evaluator.getEntityClass().getCanonicalName());
evaluatorDto.setEvaluatorType(evaluator.getClass().getCanonicalName());
evaluatorDto.setModule(evaluator.getModule());
evaluatorDto.setParameters(evaluator.getParameterNames());
evaluatorDto.setSupportsPermissions(evaluator.supportsPermissions());
// resolve documentation
evaluatorDto.setDescription(AutowireHelper.getBeanDescription(entry.getKey()));
evaluators.add(evaluatorDto);
}
return evaluators;
}
Aggregations