public Set<Portlet> getPortlets() throws PortletInvokerException { Set<Portlet> federatedPortlets = new LinkedHashSet<Portlet>(); for (Portlet portlet : portletInvoker.getPortlets()) { Portlet federatedPortlet = new FederatedPortlet(this, reference(portlet.getContext()), portlet); federatedPortlets.add(federatedPortlet); } return federatedPortlets; }
public Iterable<WindowEvent> eventProduced(EventPhaseContext context, WindowEvent producedEvent, WindowEvent sourceEvent) { try { LinkedList<WindowEvent> toConsume = new LinkedList<WindowEvent>(); for (Portlet portlet : invoker.getPortlets()) { PortletInfo portletInfo = portlet.getInfo(); if (portletInfo.getEventing().getConsumedEvents().containsKey(producedEvent.getName())) { WindowEvent distributedEvent = new WindowEvent(producedEvent.getName(), producedEvent.getPayload(), portlet.getContext().getId()); toConsume.addLast(distributedEvent); } } return toConsume; } catch (PortletInvokerException e) { System.out.println("e = " + e); return null; } }
PortletInvocationResponse response = context.render(properties.getCookies(), pageNavigationalState, portlet.getContext().getId());
render.setTarget(window.portlet.getContext()); render.setRequest(req); render.setResponse(resp);
&& portlet.getInfo().getName().equals(portletName)) involvedPortlets.add(portlet.getContext().getId());
public PortletInvocationResponse invoke(String windowId, List<Cookie> requestCookies, RenderInvocation renderInvocation) throws PortletInvokerException { Portlet portlet = getPortlet(windowId); // renderInvocation.setClientContext(new AbstractClientContext(req, requestCookies)); renderInvocation.setServerContext(new AbstractServerContext(req, resp)); renderInvocation.setInstanceContext(new AbstractInstanceContext(portlet.getContext().getId())); renderInvocation.setUserContext(new AbstractUserContext(req)); renderInvocation.setWindowContext(new AbstractWindowContext(windowId)); renderInvocation.setPortalContext(PORTAL_CONTEXT); renderInvocation.setSecurityContext(new AbstractSecurityContext(req)); renderInvocation.setTarget(portlet.getContext()); // return invoke(renderInvocation); }
public PortletInvocationResponse invoke(String windowId, List<Cookie> requestCookies, EventInvocation eventInvocation) throws PortletInvokerException { Portlet portlet = getPortlet(windowId); // eventInvocation.setClientContext(new AbstractClientContext(req, requestCookies)); eventInvocation.setServerContext(new AbstractServerContext(req, resp)); eventInvocation.setInstanceContext(new AbstractInstanceContext(portlet.getContext().getId())); eventInvocation.setUserContext(new AbstractUserContext(req)); eventInvocation.setWindowContext(new AbstractWindowContext(windowId)); eventInvocation.setPortalContext(PORTAL_CONTEXT); eventInvocation.setSecurityContext(new AbstractSecurityContext(req)); eventInvocation.setTarget(portlet.getContext()); // return invoke(eventInvocation); }
public PortletInvocationResponse invoke(String windowId, ResourceInvocation resourceInvocation) throws PortletInvokerException { Portlet portlet = getPortlet(windowId); // resourceInvocation.setClientContext(new AbstractClientContext(req)); resourceInvocation.setServerContext(new AbstractServerContext(req, resp)); resourceInvocation.setInstanceContext(new AbstractInstanceContext(portlet.getContext().getId())); resourceInvocation.setUserContext(new AbstractUserContext(req)); resourceInvocation.setWindowContext(new AbstractWindowContext(windowId)); resourceInvocation.setPortalContext(PORTAL_CONTEXT); resourceInvocation.setSecurityContext(new AbstractSecurityContext(req)); resourceInvocation.setRequestContext(new AbstractRequestContext(req)); resourceInvocation.setTarget(portlet.getContext()); // return invoke(resourceInvocation); } }
public PortletInvocationResponse invoke(String windowId, ActionInvocation actionInvocation) throws PortletInvokerException { // Portlet portlet = getPortlet(windowId); // actionInvocation.setClientContext(new AbstractClientContext(req)); actionInvocation.setServerContext(new AbstractServerContext(req, resp)); actionInvocation.setInstanceContext(new AbstractInstanceContext(portlet.getContext().getId())); actionInvocation.setUserContext(new AbstractUserContext(req)); actionInvocation.setWindowContext(new AbstractWindowContext(windowId)); actionInvocation.setPortalContext(PORTAL_CONTEXT); actionInvocation.setSecurityContext(new AbstractSecurityContext(req)); actionInvocation.setRequestContext(new AbstractRequestContext(req)); actionInvocation.setTarget(portlet.getContext()); // return invoke(actionInvocation); }
resource.setTarget(window.portlet.getContext()); resource.setRequest(req); resource.setResponse(resp);
return getPortlet(contextToImport).getContext();
action.setTarget(window.portlet.getContext()); action.setRequest(req); action.setResponse(resp);
return getPortlet(originalPortletContext).getContext();//originalPortletContext;
@Override void invoke() throws IOException, ServletException { EmbedInvocationContext context = new EmbedInvocationContext(page, target, req, resp); EventInvocation event = new EventInvocation(context); // event.setName(name); event.setPayload(payload); event.setTarget(target.portlet.getContext()); event.setRequest(req); event.setResponse(resp); event.setUserContext(new AbstractUserContext(req)); event.setWindowContext(new AbstractWindowContext("" + target.id)); event.setServerContext(new AbstractServerContext(req, resp)); event.setSecurityContext(new AbstractSecurityContext(req)); event.setClientContext(new AbstractClientContext(req)); event.setPortalContext(new AbstractPortalContext()); event.setInstanceContext(new AbstractInstanceContext("" + target.id)); event.setWindowState(target.state != null ? target.state : WindowState.NORMAL); event.setMode(target.mode != null ? target.mode : Mode.VIEW); event.setNavigationalState(target.parameters != null ? ParametersStateString.create(target.parameters) : null); event.setPublicNavigationalState(page.parameters); // invoke(context, event); } }
getPropertiesFromMetaData(portlet.getContext(), newPrefs);