return addComponentData(cd);
return cd;
  public ComponentData getComponentData() {    ComponentData cd = new GenericComponentData();    cd.setType(ComponentData.RECIPE);    cd.setClassName(RECIPE_CLASS);    cd.setName(getRecipeName());    cd.setOwner(null);    cd.setParent(null);    for(int i=0; i < getChildCount(); i++) {      ConfigurableComponent cc = (ConfigurableComponent)getChild(i);      if(cc instanceof AgentComponent) {        AgentComponentData ac = new AgentComponentData();        ac.setName(cc.getShortName());        ac.setClassName(ClusterImpl.class.getName());        ac.addParameter(cc.getShortName()); // Agents have one parameter, the agent name        ac.setOwner(cc);        ac.setParent(cd);        // Add any new Parameters...        Iterator iter = getLocalProperties();        while(iter.hasNext()) {          Property p = (Property)iter.next();          ac.addParameter(p);        }        cd.addChild((ComponentData)ac);      } else if (cc instanceof ComponentBase) {        GenericComponentData ac = new GenericComponentData();        ac.setName(cc.getShortName());        ac.setType(cc.getProperty(ComponentBase.PROP_TYPE).getValue().toString());        ac.setClassName(ClusterImpl.class.getName());        ac.setOwner(cc);        ac.setParent(cd);        cd.addChild((ComponentData)ac);      } else if (cc instanceof PropGroupComponent) {        // Need to create a dummy Agent as a container.        AgentComponentData ac = new AgentComponentData();        ac.setName(RECIPE_AGENT);        ac.setClassName(RECIPE_CLASS);        ac.setParent(cd);        AgentAssetData assetData = new AgentAssetData(null);        assetData.addPropertyGroup(((PropGroupComponent)cc).getPropGroupData());        ac.addAgentAssetData(assetData);        cd.addChild((ComponentData)ac);      } else if (cc instanceof RelationshipComponent) {        System.out.println("Have a RelationshipComponent");      }    }        // Now let all components add their data.    addComponentData(cd);    modifyComponentData(cd);    return addComponentData(cd);  }