Search in sources :

Example 1 with Niceable

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;
}
Also used : Niceable(eu.bcvsolutions.idm.core.api.domain.Niceable) Serializable(java.io.Serializable) Codeable(eu.bcvsolutions.idm.core.api.domain.Codeable) ConfigurationMap(eu.bcvsolutions.idm.core.api.domain.ConfigurationMap) GuardedString(eu.bcvsolutions.idm.core.security.api.domain.GuardedString) Identifiable(eu.bcvsolutions.idm.core.api.domain.Identifiable)

Aggregations

Codeable (eu.bcvsolutions.idm.core.api.domain.Codeable)1 ConfigurationMap (eu.bcvsolutions.idm.core.api.domain.ConfigurationMap)1 Identifiable (eu.bcvsolutions.idm.core.api.domain.Identifiable)1 Niceable (eu.bcvsolutions.idm.core.api.domain.Niceable)1 GuardedString (eu.bcvsolutions.idm.core.security.api.domain.GuardedString)1 Serializable (java.io.Serializable)1