Parameter param = entry.getParameter(J2_ENTITY);
if (param == null)
{
PortletRegistry registryAccess =
(PortletRegistry)Jetspeed.getComponentManager().getComponent(PortletRegistry.class);
PortletEntityAccessComponent entityAccess =
(PortletEntityAccessComponent)Jetspeed.getComponentManager().getComponent(PortletEntityAccessComponent.class);
PortletDefinition portletDef = registryAccess.getPortletDefinitionByUniqueName(registryKey);
if (null == portletDef)
{
log.error("Could not find portlet definition in registry for " + registryKey);
continue;
}
PortletEntity entity = entityAccess.newPortletEntityInstance(portletDef);
try
{
entityAccess.storePortletEntity(entity);
param = new PsmlParameter();
param.setName(J2_ENTITY);
param.setValue(entity.getId().toString());
entry.addParameter(param);
count++;