001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003: * notice. All rights reserved.
004: */
005: package com.terracotta.session;
006:
007: import javax.servlet.http.HttpSessionAttributeListener;
008: import javax.servlet.http.HttpSessionListener;
009:
010: public class MockWebAppConfig implements WebAppConfig {
011:
012: private String cookieComment;
013: private String cookieDomain;
014: private String cookieName;
015: private String cookiePath;
016: private String serverId;
017: private int cookieMaxAge;
018: private int idLength;
019: private int timeoutSeconds;
020: private boolean cookieSecure;
021: private boolean cookieEnabled;
022: private boolean urlEnabled;
023: private boolean trackingEnabled;
024: private HttpSessionAttributeListener[] attrListeners;
025: private HttpSessionListener[] sessListeners;
026: private String delimiter;
027:
028: public String __tc_session_getCookieComment() {
029: return cookieComment;
030: }
031:
032: public String __tc_session_getCookieDomain() {
033: return cookieDomain;
034: }
035:
036: public int __tc_session_getCookieMaxAgeSecs() {
037: return cookieMaxAge;
038: }
039:
040: public String __tc_session_getCookieName() {
041: return cookieName;
042: }
043:
044: public String __tc_session_getCookiePath() {
045: return cookiePath;
046: }
047:
048: public boolean __tc_session_getCookieSecure() {
049: return cookieSecure;
050: }
051:
052: public boolean __tc_session_getCookiesEnabled() {
053: return cookieEnabled;
054: }
055:
056: public HttpSessionAttributeListener[] __tc_session_getHttpSessionAttributeListeners() {
057: return attrListeners;
058: }
059:
060: public HttpSessionListener[] __tc_session_getHttpSessionListener() {
061: return sessListeners;
062: }
063:
064: public int __tc_session_getIdLength() {
065: return idLength;
066: }
067:
068: public String __tc_session_getServerId() {
069: return serverId;
070: }
071:
072: public int __tc_session_getSessionTimeoutSecs() {
073: return timeoutSeconds;
074: }
075:
076: public boolean __tc_session_getTrackingEnabled() {
077: return trackingEnabled;
078: }
079:
080: public boolean __tc_session_getURLRewritingEnabled() {
081: return urlEnabled;
082: }
083:
084: public void setAttrListeners(
085: HttpSessionAttributeListener[] attrListeners) {
086: this .attrListeners = attrListeners;
087: }
088:
089: public void setCookieComment(String cookieComment) {
090: this .cookieComment = cookieComment;
091: }
092:
093: public void setCookieDomain(String cookieDomain) {
094: this .cookieDomain = cookieDomain;
095: }
096:
097: public void setCookieEnabled(boolean cookieEnabled) {
098: this .cookieEnabled = cookieEnabled;
099: }
100:
101: public void setCookieMaxAge(int cookieMaxAge) {
102: this .cookieMaxAge = cookieMaxAge;
103: }
104:
105: public void setCookieName(String cookieName) {
106: this .cookieName = cookieName;
107: }
108:
109: public void setCookiePath(String cookiePath) {
110: this .cookiePath = cookiePath;
111: }
112:
113: public void setCookieSecure(boolean cookieSecure) {
114: this .cookieSecure = cookieSecure;
115: }
116:
117: public void setIdLength(int idLength) {
118: this .idLength = idLength;
119: }
120:
121: public void setServerId(String serverId) {
122: this .serverId = serverId;
123: }
124:
125: public void setSessListeners(HttpSessionListener[] sessListeners) {
126: this .sessListeners = sessListeners;
127: }
128:
129: public void setTimeoutSeconds(int timeoutSeconds) {
130: this .timeoutSeconds = timeoutSeconds;
131: }
132:
133: public void setTrackingEnabled(boolean trackingEnabled) {
134: this .trackingEnabled = trackingEnabled;
135: }
136:
137: public void setUrlEnabled(boolean urlEnabled) {
138: this .urlEnabled = urlEnabled;
139: }
140:
141: public String __tc_session_getSessionDelimiter() {
142: return this .delimiter;
143: }
144:
145: public void setDelimiter(String delimiter) {
146: this.delimiter = delimiter;
147: }
148:
149: }
|