| <%@ jet package="org.eclipse.jst.j2ee.web" |
| imports="org.eclipse.jst.j2ee.internal.web.operations.* java.util.* " |
| class="ListenerTemplate" |
| %><%@ include file="listenerHeader.template" %> |
| |
| <%if (model.isPublic()) {%>public<%}%> <%if (model.isAbstract()) {%>abstract <%}%><%if (model.isFinal()) {%>final <%} |
| %>class <%=model.getClassName()%><% |
| String superclassName = model.getSuperclassName(); |
| if (superclassName.length() > 0) {%> extends <%=superclassName%><% }%><% |
| List<String> interfaces = model.getInterfaces(); |
| if (interfaces.size()>0) {%> implements <% } |
| for (int i=0; i<interfaces.size(); i++) { |
| String INTERFACE = (String) interfaces.get(i); |
| if (i > 0) { %>, <% } %><%=INTERFACE%><% } %> { |
| <% if (!model.hasEmptySuperclassConstructor()) { %> |
| |
| /** |
| * Default constructor. |
| */ |
| public <%=model.getClassName()%>() { |
| // TODO Auto-generated constructor stub |
| } |
| <% } %> |
| <% if (model.shouldGenSuperclassConstructors()) { |
| List<Constructor> constructors = model.getConstructors(); |
| for (Constructor constructor : constructors) { |
| if (constructor.isPublic() || constructor.isProtected()) { %> |
| |
| /** |
| * @see <%=model.getSuperclassName()%>#<%=model.getSuperclassName()%>(<%=constructor.getParamsForJavadoc()%>) |
| */ |
| public <%=model.getClassName()%>(<%=constructor.getParamsForDeclaration()%>) { |
| super(<%=constructor.getParamsForCall()%>); |
| // TODO Auto-generated constructor stub |
| } |
| <% } } } %> |
| <% if (model.implementServletContextListener()) { %> |
| |
| /** |
| * @see ServletContextListener#contextDestroyed(ServletContextEvent) |
| */ |
| public void contextDestroyed(ServletContextEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletContextListener#contextInitialized(ServletContextEvent) |
| */ |
| public void contextInitialized(ServletContextEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementServletContextAttributeListener()) { %> |
| |
| /** |
| * @see ServletContextAttributeListener#attributeAdded(ServletContextAttributeEvent) |
| */ |
| public void attributeAdded(ServletContextAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletContextAttributeListener#attributeRemoved(ServletContextAttributeEvent) |
| */ |
| public void attributeRemoved(ServletContextAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletContextAttributeListener#attributeReplaced(ServletContextAttributeEvent) |
| */ |
| public void attributeReplaced(ServletContextAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementHttpSessionListener()) { %> |
| |
| /** |
| * @see HttpSessionListener#sessionCreated(HttpSessionEvent) |
| */ |
| public void sessionCreated(HttpSessionEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see HttpSessionListener#sessionDestroyed(HttpSessionEvent) |
| */ |
| public void sessionDestroyed(HttpSessionEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementHttpSessionAttributeListener()) { %> |
| |
| /** |
| * @see HttpSessionAttributeListener#attributeAdded(HttpSessionBindingEvent) |
| */ |
| public void attributeAdded(HttpSessionBindingEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see HttpSessionAttributeListener#attributeRemoved(HttpSessionBindingEvent) |
| */ |
| public void attributeRemoved(HttpSessionBindingEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see HttpSessionAttributeListener#attributeReplaced(HttpSessionBindingEvent) |
| */ |
| public void attributeReplaced(HttpSessionBindingEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementHttpSessionActivationListener()) { %> |
| |
| /** |
| * @see HttpSessionActivationListener#sessionDidActivate(HttpSessionEvent) |
| */ |
| public void sessionDidActivate(HttpSessionEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see HttpSessionActivationListener#sessionWillPassivate(HttpSessionEvent) |
| */ |
| public void sessionWillPassivate(HttpSessionEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementHttpSessionBindingListener()) { %> |
| |
| /** |
| * @see HttpSessionBindingListener#valueBound(HttpSessionBindingEvent) |
| */ |
| public void valueBound(HttpSessionBindingEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see HttpSessionBindingListener#valueUnbound(HttpSessionBindingEvent) |
| */ |
| public void valueUnbound(HttpSessionBindingEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementServletRequestListener()) { %> |
| |
| /** |
| * @see ServletRequestListener#requestDestroyed(ServletRequestEvent) |
| */ |
| public void requestDestroyed(ServletRequestEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletRequestListener#requestInitialized(ServletRequestEvent) |
| */ |
| public void requestInitialized(ServletRequestEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %><% if (model.implementServletRequestAttributeListener()) { %> |
| |
| /** |
| * @see ServletRequestAttributeListener#attributeAdded(ServletRequestAttributeEvent) |
| */ |
| public void attributeAdded(ServletRequestAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletRequestAttributeListener#attributeRemoved(ServletRequestAttributeEvent) |
| */ |
| public void attributeRemoved(ServletRequestAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| } |
| |
| /** |
| * @see ServletRequestAttributeListener#attributeReplaced(ServletRequestAttributeEvent) |
| */ |
| public void attributeReplaced(ServletRequestAttributeEvent arg0) { |
| // TODO Auto-generated method stub |
| }<% } %> |
| |
| } |