public EventDefinitionReference addSupportedPublishingEvent(String name) { QName qname = new QName(getApplication().getDefaultNamespace(), name); return this.addSupportedPublishingEvent(qname); }
public EventDefinitionReference addSupportedProcessingEvent(String name) { QName qname = new QName(getApplication().getDefaultNamespace(), name); return this.addSupportedProcessingEvent(qname); }
private boolean isDeclaredAsPublishingEvent(PortletWindow portletWindow, QName qname) { PortletDefinition pd = portletWindow.getPortletDefinition(); List<? extends EventDefinitionReference> events = pd.getSupportedPublishingEvents(); if (events != null) { String defaultNamespace = pd.getApplication().getDefaultNamespace(); for (EventDefinitionReference ref : events) { QName name = ref.getQualifiedName(defaultNamespace); if (name == null) { continue; } if (qname.equals(name)) { return true; } } } return false; }
contextPath = portletApplication.getContextPath(); localContextPath = portletApplication.getLocalContextPath(); defaultNamespace = portletApplication.getDefaultNamespace(); applicationType = portletApplication.getApplicationType(); checksum = portletApplication.getChecksum();
private List<PortletWindow> getPortletsRegisteredOnPage(RequestContext rc, ContentFragment fragment, Event event, List<PortletWindow> eventTargets) { List<ContentFragment> fragments = fragment.getFragments(); if (fragments != null && fragments.size() > 0) { for (ContentFragment child : fragments) { getPortletsRegisteredOnPage(rc, child, event, eventTargets); } } // might need to create the PortletWindow if yet undefined PortletWindow portletWindow = rc.getPortletWindow(fragment); if (portletWindow == null || !portletWindow.isValid()) return eventTargets; PortletDefinition portlet = portletWindow.getPortletDefinition(); if (checkSecurityConstraints && !checkSecurityConstraint(portlet, fragment)) { return eventTargets; } if (portletTracking.isOutOfService(portletWindow)) { return eventTargets; } List<? extends EventDefinitionReference> processingEvents = portlet.getSupportedProcessingEvents(); if (isEventSupported(processingEvents, event.getQName(), portlet.getApplication().getDefaultNamespace())) { eventTargets.add(portletWindow); } return eventTargets; }