use of io.vertigo.account.authorization.metamodel.SecurityDimensionType in project vertigo by KleeGroup.
the class SecuredEntityDeserializer method deserializeSecurityDimensions.
private static SecurityDimension deserializeSecurityDimensions(final DtDefinition entityDefinition, final JsonObject advancedDimension, final JsonDeserializationContext context) {
final String name = advancedDimension.get("name").getAsString();
final SecurityDimensionType type = SecurityDimensionType.valueOf(advancedDimension.get("type").getAsString());
final List<String> fieldNames = deserializeList(advancedDimension.get("fields"), String.class, context);
final List<DtField> fields = fieldNames.stream().map(fieldName -> deserializeDtField(entityDefinition, fieldName)).collect(Collectors.toList());
final List<String> values = deserializeList(advancedDimension.get("values"), String.class, context);
return new SecurityDimension(name, type, fields, values);
}
Aggregations