001: /*
002: * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
003: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
004: */
005: package com.sun.portal.desktop.context;
006:
007: import java.util.Hashtable;
008: import java.util.Set;
009: import java.util.Map;
010: import java.util.Locale;
011:
012: import javax.servlet.ServletContext;
013: import javax.servlet.http.HttpServletRequest;
014:
015: import java.io.File;
016: import java.util.List;
017:
018: import com.sun.portal.providers.context.ContainerProviderContext;
019: import com.sun.portal.desktop.template.ParsedTagArray;
020:
021: public interface DesktopAppContext {
022: public void init(ServletContext sc);
023:
024: //
025: // service
026: //
027:
028: public String getServiceContextClassName();
029:
030: public String getDesktopContextClassName();
031:
032: public Map getAuthorizedAuthlessUIDs();
033:
034: public boolean isAuthorizedAuthlessUID(String uid);
035:
036: public String getDefaultAuthlessUID();
037:
038: public String getNoSessionURL();
039:
040: public String getLogoutURL();
041:
042: public String getSessionReturnURLParamName();
043:
044: public long getClientSessionReapInterval();
045:
046: public long getClientSessionInactiveMax();
047:
048: public long getClientSessionsMax();
049:
050: public boolean isAuthlessEnabled();
051:
052: public boolean isFederationEnabled();
053:
054: public String getPreLoginURL(String returnURL,
055: String libertySSOFailedParamName);
056:
057: public int getMaxEventGenerations();
058:
059: public String getPortletRenderModeParallel();
060:
061: //
062: // the creation and starting of the reaper thread
063: // is disabled per bug #4720290. see this bug report
064: // for details.
065: //
066: //public long getReapInterval();
067: //public long getInactiveMax();
068:
069: /**
070: * Gets the server-specific (global) attribute.
071: * @param name The attribute name.
072: * @return The attribute value in String format. If property is
073: * not not found, return null.
074: */
075: public String getStringAttribute(String name);
076:
077: /**
078: * Sets the server-specific (global) attribute value.
079: * New data is persisted immediately.
080: * @param name The attribute name.
081: * @param name The attribute value.
082: */
083: public void setStringAttribute(String name, String val);
084:
085: //
086: // servlet request
087: //
088:
089: public StringBuffer getRequestServer(HttpServletRequest req);
090:
091: public String getDesktopURL(HttpServletRequest req);
092:
093: public String getDesktopURL(HttpServletRequest req, Map query,
094: Map pathInfo);
095:
096: public String getDesktopURL(HttpServletRequest req, String query);
097:
098: //
099: // client
100: //
101:
102: public String getContentType(String clientType);
103:
104: public String getClientType(HttpServletRequest req);
105:
106: public String getDefaultClientType();
107:
108: public String getClientPath(String clientType);
109:
110: public String getClientTypeProperty(String clientType, String key);
111:
112: public Set getClientTypeProperties(String clientType, String key);
113:
114: public String getCharset(String clientType, Locale locale);
115:
116: public short getCookieSupport(String clientType);
117:
118: public short getAuthlessState(String clientType);
119:
120: public String getEncoderClassName(String clientType);
121:
122: //
123: // session
124: //
125:
126: public boolean validateSession(HttpServletRequest req);
127:
128: public boolean validateAuthlessSession(HttpServletRequest req);
129:
130: public String getSessionID(HttpServletRequest req);
131:
132: public boolean isAuthless(HttpServletRequest req);
133:
134: public boolean isWSRP(HttpServletRequest req);
135:
136: //
137: // config
138: //
139: public String getPortalId();
140:
141: public String getInstanceId();
142:
143: public String getTemplateBaseDir();
144:
145: public String getProviderClassBaseDir();
146:
147: public String getJSPScratchDir();
148:
149: public String getJSPCompilerWARClassPath();
150:
151: public String getDefaultDesktopType();
152:
153: public String getStaticContentPath();
154:
155: public int getGetterPoolMinSize();
156:
157: public int getGetterPoolMaxSize();
158:
159: public int getGetterPoolPartitionSize();
160:
161: public int getCallerPoolMinSize();
162:
163: public int getCallerPoolMaxSize();
164:
165: public int getCallerPoolPartitionSize();
166:
167: public String getCookiePrefix();
168:
169: public String getLBCookieName();
170:
171: public String getConfigProperty(String key);
172:
173: public int getClassLoaderRevalidateInterval();
174:
175: public int getBrowserCacheInterval();
176:
177: public int getDPScanInterval();
178:
179: public List getCommunityContributorTypes();
180:
181: //
182: // template
183: //
184: public int getTemplateScanInterval();
185:
186: public ParsedTagArray getTemplate(String type, String locale,
187: String app, String provider, String clientFilePath,
188: String file, String baseDir);
189:
190: public StringBuffer getTemplate(String type, String locale,
191: String app, String provider, String clientFilePath,
192: String file, Hashtable table, String baseDir);
193:
194: public StringBuffer getTemplate(String type, String locale,
195: String app, String provider, String clientFilePath,
196: String file, Hashtable table, String baseDir,
197: ContainerProviderContext pc);
198:
199: public File getTemplatePath(String type, String locale, String app,
200: String provider, String clientFilePath, String file,
201: String baseDir);
202:
203: public File getTemplateMostSpecificPath(String type, String locale,
204: String app, String provider, String clientFilePath,
205: String file, String baseDir);
206:
207: }
|