copyDesc.setDescription(desc.getDescription());
}
for (InitParam initParam : source.getInitParams())
{
InitParam copyInitParam = copy.addInitParam(initParam.getParamName());
copyInitParam.setParamValue(initParam.getParamValue());
for (Description desc : initParam.getDescriptions())
{
Description copyDesc = copyInitParam.addDescription(desc.getLang());
copyDesc.setDescription(desc.getDescription());
}
}
InitParam parentPortlet = copy.getInitParam(PortletDefinition.CLONE_PARENT_INIT_PARAM);
if (parentPortlet == null)
{
parentPortlet = copy.addInitParam(PortletDefinition.CLONE_PARENT_INIT_PARAM);
}
parentPortlet.setParamValue(source.getPortletName());
for (EventDefinitionReference eventDefRef : source.getSupportedProcessingEvents())
{
copy.addSupportedProcessingEvent(eventDefRef.getQName());
}