System.out.println(
"Note: Replaced already existing the servlet with the name '"
+ portlet.getName()
+ "' with the wrapper servlet.");
}
ServletDefinitionCtrl _servletCtrl =
(ServletDefinitionCtrl) controllerFactory.get(servlet);
_servletCtrl.setServletClass(
"org.apache.pluto.core.PortletServlet");
} else {
servlet =
servletDefinitionSetCtrl.add(
portlet.getName(),
"org.apache.pluto.core.PortletServlet");
}
ServletDefinitionCtrl servletCtrl =
(ServletDefinitionCtrl) controllerFactory.get(servlet);
DisplayNameImpl dispName = new DisplayNameImpl();
dispName.setDisplayName(portlet.getName() + " Wrapper");
dispName.setLocale(Locale.ENGLISH);
DisplayNameSetImpl dispSet = new DisplayNameSetImpl();
dispSet.add(dispName);
servletCtrl.setDisplayNames(dispSet);
DescriptionImpl desc = new DescriptionImpl();
desc.setDescription("Automated generated Portlet Wrapper");
desc.setLocale(Locale.ENGLISH);
DescriptionSetImpl descSet = new DescriptionSetImpl();
descSet.add(desc);
servletCtrl.setDescriptions(descSet);
ParameterSet parameters = servlet.getInitParameterSet();
ParameterSetCtrl parameterSetCtrl =
(ParameterSetCtrl) controllerFactory.get(parameters);