/** * Returns the stored methods for the given portlet name. * * @param portletName The portlet name * @return Set of method identifiers. The Set is empty if there are no * methods available */ public Set<MethodIdentifier> getMethodIDsForPortlet(String portletName) { Set<MethodIdentifier> meths = new HashSet<MethodIdentifier>(); for (MethodIdentifier mi : methods.keySet()) { if (mi.getName().equals(portletName)) { meths.add(mi); } } return meths; }
/** * Removes the stored methods for the given portlet name. * * @param portletName The portlet name */ public void removeMethodsForPortlet(String portletName) { Set<MethodIdentifier> meths = new HashSet<MethodIdentifier>(); for (MethodIdentifier mi : methods.keySet()) { if (mi.getName().equals(portletName)) { meths.add(mi); } } for (MethodIdentifier mi : meths) { methods.remove(mi); } portletNames.remove(portletName); }
txt.append(" / Method 1: ").append(list.get(0).toString()); txt.append(" / Method 2: ").append(am.toString()); summary.addErrorString(mi.getName(), txt.toString()); LOG.warn("Disallowed duplicate entry: " + mi.toString()); list = null;
List<QName> qns = procEvtRefs.get(mi.getName()); if (qns != null) { EventMethod anno = (EventMethod) am.getAnnotation(); StringBuilder txt = new StringBuilder(128); txt.append("Duplicate processing event QName. Portlet name: "); txt.append(mi.getName()); txt.append(", QName: ").append(qn); txt.append(", Annotation: @EventMethod"); txt.append(", Class: ").append(am.getJavaMethod().getDeclaringClass().getCanonicalName()); summary.addErrorString(mi.getName(), txt.toString()); LOG.warn(txt.toString()); return false; StringBuilder txt = new StringBuilder(128); txt.append("Missing processing event QName. Portlet name: "); txt.append(mi.getName()); txt.append(", Annotation: @EventMethod"); txt.append(", Class: ").append(am.getJavaMethod().getDeclaringClass().getCanonicalName()); summary.addErrorString(mi.getName(), txt.toString()); LOG.warn(txt.toString()); return false; portletNames.add(mi.getName()); String portletName = mi.getName(); if (procqns.size() > 0) { if (!procEvtRefs.containsKey(portletName)) {