1 23 24 package com.sun.enterprise.web; 25 26 import java.util.Enumeration ; 27 import org.apache.catalina.Wrapper; 28 import org.apache.catalina.core.StandardContext; 29 import org.apache.catalina.core.StandardWrapper; 30 import com.sun.enterprise.web.session.SessionCookieConfig; 31 32 35 public abstract class PwcWebModule extends StandardContext { 36 37 39 40 42 private String _id = null; 44 45 private SessionCookieConfig _cookieConfig = null; 47 48 private boolean _useResponseCTForHeaders = false; 49 50 54 private boolean _encodeCookies = false; 55 56 private int pollInterval = -1; 57 58 private int reapInterval = -1; 59 60 65 private int stmPoolSize = 5; 66 68 73 private boolean hasWebServices = false; 74 75 80 private String [] endpointAddresses = null; 81 83 private String contextRoot; 85 86 private boolean hasWebXml; 88 89 private String moduleName; 90 91 private String [] cacheControls; 92 93 protected String formHintField = null; 94 95 protected String defaultCharset; 96 97 98 103 public String getID() { 104 return _id; 105 } 106 107 108 113 public void setID(String id) { 114 _id = id; 115 } 116 117 118 121 public SessionCookieConfig getSessionCookieConfig() { 122 return _cookieConfig; 123 } 124 125 126 131 public void setSessionCookieConfig(SessionCookieConfig cookieConfig) { 132 _cookieConfig = cookieConfig; 133 } 134 135 136 139 public String getFormHintField() { 140 return formHintField; 141 } 142 143 144 151 public String getDefaultCharset() { 152 return defaultCharset; 153 } 154 155 156 163 public void setResponseCTForHeaders() { 164 _useResponseCTForHeaders = true; 165 } 166 167 168 175 public void setEncodeCookies(boolean flag) { 176 _encodeCookies = flag; 177 } 178 179 180 183 public boolean getResponseCTForHeaders() { 184 return _useResponseCTForHeaders; 185 } 186 187 188 191 public boolean getEncodeCookies() { 192 return _encodeCookies; 193 } 194 195 196 200 public int getSTMPoolSize() { 201 return (this.stmPoolSize); 202 } 203 204 205 211 public void setSTMPoolSize(int newPoolSize) { 212 213 int oldPoolSize = this.stmPoolSize; 214 this.stmPoolSize = newPoolSize; 215 support.firePropertyChange("stmPoolSize", new Integer (oldPoolSize), 216 new Integer (this.stmPoolSize)); 217 } 218 219 220 226 public Wrapper createWrapper() { 227 Wrapper wrapper = super.createWrapper(); 228 ((StandardWrapper) wrapper).setMaxInstances(stmPoolSize); 229 return wrapper; 230 } 231 232 233 237 public boolean getHasWebServices() { 238 return hasWebServices; 239 } 240 241 242 247 public void setHasWebServices(boolean hasWebServices) { 248 this.hasWebServices = hasWebServices; 249 } 250 251 252 259 public String [] getEndpointAddresses() { 260 return endpointAddresses; 261 } 262 263 264 271 public void setEndpointAddresses(String [] endpointAddresses) { 272 this.endpointAddresses = (String [])endpointAddresses.clone(); 273 } 274 276 277 282 public String getContextRoot(){ 283 return contextRoot; 284 } 285 286 287 292 public void setContextRoot(String contextRoot){ 293 this.contextRoot = contextRoot; 294 } 295 296 297 301 void setHasWebXml(boolean hasWebXml) { 302 this.hasWebXml = hasWebXml; 303 } 304 305 306 310 boolean hasWebXml() { 311 return hasWebXml; 312 } 313 314 315 320 public void setModuleName(String moduleName) { 321 this.moduleName = moduleName; 322 } 323 324 325 330 public String getModuleName() { 331 return this.moduleName; 332 } 333 334 335 341 public void setCacheControls(String [] cacheControls) { 342 this.cacheControls = cacheControls; 343 } 344 345 346 352 public String [] getCacheControls() { 353 return cacheControls; 354 } 355 356 357 364 public abstract boolean hasLocaleToCharsetMapping(); 365 366 367 378 public abstract String mapLocalesToCharset(Enumeration locales); 379 380 } 381 | Popular Tags |