public PortletInfo getInfo() { return next.getInfo(); }
public PortletInfo getInfo() { return next.getInfo(); }
public PortletInfo getInfo() { return portlet.getInfo(); }
public PortletInfo getPortletInfo(String windowId) { try { return getPortlet(windowId).getInfo(); } catch (PortletInvokerException e) { log.error("Could not access portlet invoker for locating window " + windowId, e); // return null; } }
/** * Returns the windows that can consume the wanted event name. * * @param wanted the wanted event name * @return the collection of windows that can consume the wanted event */ Collection<Window> getConsumers(QName wanted) { List<Window> consumers = null; for (Window window : windows.values()) { if (window.portlet != null) { for (QName name : window.portlet.getInfo().getEventing().getConsumedEvents().keySet()) { if (wanted.equals(name)) { if (consumers == null) { consumers = new ArrayList<Window>(); } consumers.add(window); } } } } return consumers == null ? Collections.<Window>emptyList() : consumers; } }
public String getDisplayName(String portletName, Locale locale) { String portletDisplayName = portletName; if (portletDisplayNames.get(portletName) != null) { portletDisplayName = portletDisplayNames.get(portletName).getValue(locale, true).getString(); } else if (!isPortletDisplayNamesImported) { PortletInvoker portletInvoker = (PortletInvoker) PortalContainer.getComponent(PortletInvoker.class); try { Set<org.gatein.pc.api.Portlet> portlets = portletInvoker.getPortlets(); for (org.gatein.pc.api.Portlet portlet : portlets) { portletDisplayNames.put(portlet.getInfo().getName(), portlet.getInfo().getMeta().getMetaValue(MetaInfo.DISPLAY_NAME)); } isPortletDisplayNamesImported = true; } catch (PortletInvokerException exception) { LOG.error("Error occurred when trying to import portlets", exception); } if (portletDisplayNames.get(portletName) != null) { portletDisplayName = portletDisplayNames.get(portletName).getValue(locale, true).getString(); } } return portletDisplayName; }
if (portlet.getInfo().getName().equals(segment.value))
PreferencesInfo prefs = portlet.getInfo().getPreferences();
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; } }
public PagePortletControllerContext( HttpServletRequest req, HttpServletResponse resp, PortletInvoker invoker, ServletContext servletContext, PortalPrepareResponse prepareResponse) throws IllegalRequestException, IOException, ServletException, PortletInvokerException { super(req, resp); // Map<Key, Portlet> portlets = new HashMap<Key, Portlet>(); for (Portlet portlet : invoker.getPortlets()) { PortletInfo portletInfo = portlet.getInfo(); String portletName = portletInfo.getName(); String applicationName = portletInfo.getApplicationName(); Key key = new Key(applicationName, portletName); portlets.put(key, portlet); } // this.invoker = invoker; this.portlets = portlets; this.prepareResponse = prepareResponse; this.stateControllerContext = new StateControllerContextImpl(this); this.eventControllerContext = new PageEventControllerContext(this, prepareResponse); this.serialization = new PortletPageNavigationalStateSerialization(stateControllerContext); }
PortletInfo portletInfo = portlet.getInfo();
PortletInfo referencedPortletInfo = referencedPortlet.getInfo();