{
PortletFilterObject portletFilterObject = new PortletFilterImpl(filterInfo);
PortletFilterContextImpl portletFilterContext = new PortletFilterContextImpl();
//
PortletFilterLifeCycle portletFilterLifeCycle = portletApplicationLifeCycle.addPortletFilter(portletFilterContext, portletFilterObject);
// Needed for the managed callbacks
portletFilterContext.managedPortletFilter = portletFilterLifeCycle;
}
//
for (ContainerPortletInfo containerInfo : builder.getPortlets())
{
PortletContainerObject portletContainerObject = new PortletContainerImpl(containerInfo);
PortletContainerContextImpl portletContainerContext = new PortletContainerContextImpl();
//
PortletContainerLifeCycle portletContainerLifeCycle = portletApplicationLifeCycle.addPortletContainer(portletContainerContext, portletContainerObject);
// Needed for the managed callbacks
portletContainerContext.managedPortletContainer = portletContainerLifeCycle;
// Now create deps
for (String filterRef : containerInfo.getFilterRefs())
{
PortletFilterLifeCycle portletFilterLifeCycle = portletApplicationLifeCycle.getManagedPortletFilter(filterRef);
//
if (portletFilterLifeCycle != null)
{
portletApplicationLifeCycle.addDependency(portletFilterLifeCycle, portletContainerLifeCycle);