Search in sources :

Example 1 with InputParameterRestRep

use of com.emc.storageos.model.customservices.InputParameterRestRep in project coprhd-controller by CoprHD.

the class CustomServicesDBHelper method mapInput.

/**
 * @param inputGroups
 * @return
 */
private static StringSetMap mapInput(Map<String, InputGroup> inputGroups) {
    final StringSetMap input = new StringSetMap();
    if (null != inputGroups) {
        for (final Entry<String, InputGroup> inputGroup : inputGroups.entrySet()) {
            final StringSet set = new StringSet();
            for (final InputParameterRestRep param : inputGroup.getValue().getInputGroup()) {
                set.add(param.getName());
            }
            input.put(inputGroup.getKey(), set);
        }
    }
    return input;
}
Also used : InputGroup(com.emc.storageos.model.customservices.CustomServicesPrimitiveRestRep.InputGroup) StringSetMap(com.emc.storageos.db.client.model.StringSetMap) StringSet(com.emc.storageos.db.client.model.StringSet) InputParameterRestRep(com.emc.storageos.model.customservices.InputParameterRestRep)

Example 2 with InputParameterRestRep

use of com.emc.storageos.model.customservices.InputParameterRestRep in project coprhd-controller by CoprHD.

the class CustomServicesPrimitiveMapper method mapInputParameter.

private static InputParameterRestRep mapInputParameter(final BasicInputParameter<?> param) {
    InputParameterRestRep restRep = new InputParameterRestRep();
    restRep.setName(param.getName());
    restRep.setRequired(param.getRequired());
    restRep.setFieldType(param.getType().name());
    return restRep;
}
Also used : InputParameterRestRep(com.emc.storageos.model.customservices.InputParameterRestRep)

Example 3 with InputParameterRestRep

use of com.emc.storageos.model.customservices.InputParameterRestRep in project coprhd-controller by CoprHD.

the class CustomServicesPrimitiveMapper method mapInputGroup.

private static InputGroup mapInputGroup(final List<InputParameter> list) {
    final ImmutableList.Builder<InputParameterRestRep> builder = ImmutableList.<InputParameterRestRep>builder();
    if (list != null) {
        for (final InputParameter param : list) {
            builder.add(mapInputParameter(param.asBasicInputParameter()));
        }
    }
    final InputGroup inputGroup = new InputGroup();
    inputGroup.setInputGroup(builder.build());
    return inputGroup;
}
Also used : InputGroup(com.emc.storageos.model.customservices.CustomServicesPrimitiveRestRep.InputGroup) ImmutableList(com.google.common.collect.ImmutableList) InputParameterRestRep(com.emc.storageos.model.customservices.InputParameterRestRep) InputParameter(com.emc.storageos.primitives.input.InputParameter) BasicInputParameter(com.emc.storageos.primitives.input.BasicInputParameter)

Aggregations

InputParameterRestRep (com.emc.storageos.model.customservices.InputParameterRestRep)3 InputGroup (com.emc.storageos.model.customservices.CustomServicesPrimitiveRestRep.InputGroup)2 StringSet (com.emc.storageos.db.client.model.StringSet)1 StringSetMap (com.emc.storageos.db.client.model.StringSetMap)1 BasicInputParameter (com.emc.storageos.primitives.input.BasicInputParameter)1 InputParameter (com.emc.storageos.primitives.input.InputParameter)1 ImmutableList (com.google.common.collect.ImmutableList)1