1 16 17 package org.springframework.web.portlet.context; 18 19 import org.springframework.web.context.support.RequestHandledEvent; 20 21 31 public class PortletRequestHandledEvent extends RequestHandledEvent { 32 33 34 private final String portletName; 35 36 37 private final String portletMode; 38 39 40 private final String requestType; 41 42 43 54 public PortletRequestHandledEvent(Object source, String portletName, 55 String portletMode, String requestType, String sessionId, 56 String userName, long processingTimeMillis) { 57 58 super(source, sessionId, userName, processingTimeMillis); 59 this.portletName = portletName; 60 this.portletMode = portletMode; 61 this.requestType = requestType; 62 } 63 64 76 public PortletRequestHandledEvent(Object source, String portletName, 77 String portletMode, String requestType, String sessionId, 78 String userName, long processingTimeMillis, Throwable failureCause) { 79 80 super(source, sessionId, userName, processingTimeMillis, failureCause); 81 this.portletName = portletName; 82 this.portletMode = portletMode; 83 this.requestType = requestType; 84 } 85 86 87 90 public String getPortletName() { 91 return portletName; 92 } 93 94 97 public String getPortletMode() { 98 return portletMode; 99 } 100 101 104 public String getRequestType() { 105 return requestType; 106 } 107 108 109 public String getShortDescription() { 110 StringBuffer sb = new StringBuffer (); 111 sb.append("portlet=[").append(this.portletName).append("]; "); 112 sb.append(super.getShortDescription()); 113 return sb.toString(); 114 } 115 116 public String getDescription() { 117 StringBuffer sb = new StringBuffer (); 118 sb.append("portlet=[").append(this.portletName).append("]; "); 119 sb.append("mode=[").append(this.portletMode).append("]; "); 120 sb.append("type=[").append(this.requestType).append("]; "); 121 sb.append(super.getDescription()); 122 return sb.toString(); 123 } 124 125 public String toString() { 126 return ("PortletRequestHandledEvent: " + getDescription()); 127 } 128 129 } 130 | Popular Tags |