Search in sources :

Example 6 with ConfigurationFlag

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

the class SetConfigurationObjectRequestBuilder method getDefaultConfigurationFlag.

private ConfigurationFlag getDefaultConfigurationFlag() {
    final ConfigurationFlag configurationFlag = new ConfigurationFlag();
    configurationFlag.setConfigurationFlagType(DEFAULT_CONFIGURATION_FLAG_TYPE);
    configurationFlag.setEnabled(DEFAULT_CONFIGURATION_FLAG_ENABLED);
    return configurationFlag;
}
Also used : ConfigurationFlag(org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlag)

Example 7 with ConfigurationFlag

use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlag 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

ConfigurationFlag (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlag)7 ArrayList (java.util.ArrayList)3 ConfigurationFlags (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlags)3 ConfigurationObject (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationObject)2 Test (org.junit.jupiter.api.Test)1 ConfigurationFlagType (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.ConfigurationFlagType)1 SetConfigurationObjectRequest (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetConfigurationObjectRequest)1 SetConfigurationObjectRequestData (org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetConfigurationObjectRequestData)1