@Override
  public void resolve(ComponentModule parent, Map<String, StackModule> allStacks,
	    Map<String, ServiceModule> commonServices, Map<String, ExtensionModule> extensions) {
    if (parent != null) {
      ComponentInfo parentInfo = parent.getModuleInfo();
      if (!parent.isValid()) {
        setValid(false);
        addErrors(parent.getErrors());
      }

      if (componentInfo.getCommandScript() == null) {
        componentInfo.setCommandScript(parentInfo.getCommandScript());
      }
      if (componentInfo.getDisplayName() == null) {
        componentInfo.setDisplayName(parentInfo.getDisplayName());
      }
      if (componentInfo.getConfigDependencies() == null) {
        componentInfo.setConfigDependencies(parentInfo.getConfigDependencies());
      }
      if (componentInfo.getClientConfigFiles() == null) {
        componentInfo.setClientConfigFiles(parentInfo.getClientConfigFiles());
      }
      if (componentInfo.getClientsToUpdateConfigs() == null) {
        componentInfo.setClientsToUpdateConfigs(parentInfo.getClientsToUpdateConfigs());
      }
      if (componentInfo.getCategory() == null) {
        componentInfo.setCategory(parentInfo.getCategory());
      }
      if (componentInfo.getCardinality() == null) {
        componentInfo.setCardinality(parentInfo.getCardinality());
      }

      // Inherit versionAdvertised from the parent if the current Component Info has it as null or "inherit".
      if (null == componentInfo.getVersionAdvertisedField()) {
        componentInfo.setVersionAdvertised(parentInfo.isVersionAdvertised());
      } else {
        // Set to explicit boolean
        componentInfo.setVersionAdvertised(componentInfo.getVersionAdvertisedField().booleanValue());
      }

      if (componentInfo.getDecommissionAllowed() == null) {
        componentInfo.setDecommissionAllowed(parentInfo.getDecommissionAllowed());
      }

      if (componentInfo.getUnlimitedKeyJCERequired() == null) {
        componentInfo.setUnlimitedKeyJCERequired(parentInfo.getUnlimitedKeyJCERequired());
      }

      if (componentInfo.getAutoDeploy() == null) {
        componentInfo.setAutoDeploy(parentInfo.getAutoDeploy());
      }

      componentInfo.setRecoveryEnabled(parentInfo.isRecoveryEnabled());

      if (componentInfo.getBulkCommandDefinition() == null){
        componentInfo.setBulkCommands(parentInfo.getBulkCommandDefinition());
      }

      if (componentInfo.getReassignAllowed() == null) {
        componentInfo.setReassignAllowed(parentInfo.getReassignAllowed());
      }

      if (componentInfo.getTimelineAppid() == null) {
        componentInfo.setTimelineAppid(parentInfo.getTimelineAppid());
      }

      mergeComponentDependencies(parentInfo.getDependencies(),
              componentInfo.getDependencies());

      mergeCustomCommands(parentInfo.getCustomCommands(),
              componentInfo.getCustomCommands());

      mergeLogs(parentInfo.getLogs(), componentInfo.getLogs());
    } else {
      //set cardinality with default value "0+" if it was not provided and parent is absent.
      componentInfo.setCardinality("0+");
    }
  }
Constructor.

@param componentInfo  associated component info
ambari-server/src/main/java/org/apache/ambari/server/stack/ComponentModule.java