use of eu.bcvsolutions.idm.core.api.domain.Niceable in project CzechIdMng by bcvsolutions.
the class DefaultRequestManager method makeNiceValue.
private Object makeNiceValue(Object value) {
if (value == null) {
return null;
}
if (value instanceof Codeable) {
Codeable codeable = (Codeable) value;
return codeable.getCode();
}
if (value instanceof Niceable) {
Niceable codeable = (Niceable) value;
return codeable.getNiceLabel();
}
if (value instanceof Identifiable) {
Identifiable identifiable = (Identifiable) value;
return identifiable.getId();
}
if (value instanceof ConfigurationMap) {
ConfigurationMap configurationMap = (ConfigurationMap) value;
Map<String, Serializable> map = configurationMap.toMap();
return map.toString();
}
return value;
}
Aggregations