Search in sources :

Example 1 with ConfigurationFlagType

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlagType in project open-smart-grid-platform by OSGP.

the class ConfigurationObjectFactory method getFlags.

private static List<ConfigurationFlag> getFlags(final Set<ConfigurationFlagType> flagTypes, final boolean enabled) {
    if (CollectionUtils.isEmpty(flagTypes)) {
        return Collections.emptyList();
    }
    final List<ConfigurationFlag> configurationFlags = new ArrayList<>();
    for (final ConfigurationFlagType flagType : flagTypes) {
        final ConfigurationFlag configurationFlag = new ConfigurationFlag();
        configurationFlag.setConfigurationFlagType(flagType);
        configurationFlag.setEnabled(enabled);
        configurationFlags.add(configurationFlag);
    }
    return configurationFlags;
}
Also used : ArrayList(java.util.ArrayList) ConfigurationFlag(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlag) ConfigurationFlagType(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlagType)

Aggregations

ArrayList (java.util.ArrayList)1 ConfigurationFlag (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlag)1 ConfigurationFlagType (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlagType)1