private Collection<Component> processHostGroupComponents(Stack stack, String groupName, HashSet<HashMap<String, String>>  componentProps) {
    if (componentProps == null || componentProps.isEmpty()) {
      throw new IllegalArgumentException("Host group '" + groupName + "' must contain at least one component");
    }

    Collection<String> stackComponentNames = getAllStackComponents(stack);
    Collection<Component> components = new ArrayList<>();

    for (HashMap<String, String> componentProperties : componentProps) {
      String componentName = componentProperties.get(COMPONENT_NAME_PROPERTY_ID);
      if (componentName == null || componentName.isEmpty()) {
        throw new IllegalArgumentException("Host group '" + groupName +
            "' contains a component with no 'name' property");
      }

      if (! stackComponentNames.contains(componentName)) {
        throw new IllegalArgumentException("The component '" + componentName + "' in host group '" +
            groupName + "' is not valid for the specified stack");
      }

      String componentProvisionAction = componentProperties.get(COMPONENT_PROVISION_ACTION_PROPERTY_ID);
      if (componentProvisionAction != null) {
        //TODO, might want to add some validation here, to only accept value enum types, rwn
        components.add(new Component(componentName, ProvisionAction.valueOf(componentProvisionAction)));
      } else {
        components.add(new Component(componentName));
      }
    }

    return components;
  }
Convert a map of properties to a blueprint entity.

@param properties  property map
@param securityConfiguration security related properties
@return new blueprint entity
ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java