Package com.microstrategy.web.platform
Class AbstractConfigurableContainerServices
- java.lang.Object
 - 
- com.microstrategy.web.platform.AbstractConfigurableContainerServices
 
 
- 
- All Implemented Interfaces:
 ContainerServices,ContainerServicesContext
- Direct Known Subclasses:
 DisconnectedContainerServicesImpl,HttpServletContainerServices
public abstract class AbstractConfigurableContainerServices extends java.lang.Object implements ContainerServices
This abstract class provides method implementations fornewURIParameterBuilder(),newHiddenInputParameterBuilder()andnewNamespaceEncoder(). It provides these implementations based on a configuration file accessed as the resource called ContainerServices (e.g., ContainerServices.properties). If present, it reads the file and uses its contents to determine which classes are instantiated. It currently searches for entries named:- uriBuilder.class
 - hiddenInputBuilder.class
 - namespaceEncoder.class
 
DefaultURIBuilderImpl,DefaultHiddenInputBuilderImplandEmptyNamespaceEncoderImpl, respectively.- Since:
 - MicroStrategy Web 8.0.0
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractConfigurableContainerServices.AbstractContainerStringCollectionAbstract class for string collection classes.protected classAbstractConfigurableContainerServices.CookieWrapperA implementation of GenericCookies. 
- 
Field Summary
Fields Modifier and Type Field Description protected static boolean_prependSlashToResourcestatic java.lang.StringAPPLICATION_PARAMETERS_XML_PATHstatic java.lang.StringWEB_XML_PATH- 
Fields inherited from interface com.microstrategy.web.platform.ContainerServices
SPNEGO_CREDENTIAL 
 - 
 
- 
Constructor Summary
Constructors Constructor Description AbstractConfigurableContainerServices() 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdecrypt(java.lang.String encryptedData)java.lang.Stringencrypt(java.lang.String clearData)ApplicationParametersgetApplicationParameters()Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml fileprotected abstract java.lang.StringgetControllerName()java.lang.StringgetControllerParameter(java.lang.String paramName, java.lang.String controllerName)Returns initialization parameter value for the given controller.GenericCookiegetCookie(java.lang.String name)This method retrieves a platform-independent Cookie with a specific name.GenericCookiegetCookie(java.lang.String name, ContainerServicesNamespace namespace)This method retrieves a platform-independent Cookie with a specific name.protected static ContainerServicesNamespacegetCookieNamespace()Returns the namespace object for Cookies.protected intgetCookieNamespaceCapacity()Returns the namespace capacity for cookies.protected abstract HashListgetCookies(ContainerServicesNamespace namespace)java.lang.StringgetInitParameter(java.lang.String paramName)Returns initialization parameter value for the controller associated with this ContainerServices.java.util.EnumerationgetInitParameterNames()Returns enumeration of initialization parameter namesprotected java.lang.StringgetNamespacePrefix()protected java.lang.StringgetNamespaceValue(ContainerServicesNamespace namespace)Get the namespace value.protected static java.lang.StringgetRealName(java.lang.String nativeName)Get the real name from native name.protected ContainerServicesNamespacegetSessionNamespace()Returns the namespace object for sessions.protected intgetSessionNamespaceCapacity()return the capacity of namespace of session.protected static voidinitFromPropertiesFile()voidinitGlobalObjects()Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.booleanisEncryptedByRedirect(java.lang.String name)booleanisEncryptedParameter(java.lang.String name)protected static booleanisNamespacedName(java.lang.String nativeName)Check if the native name is namespaced name.booleanisQueryParam(java.lang.String pName)Returns a boolean indicating whether the input parameter is found in the queryGenericCookienewCookie(java.lang.String cookieName, java.lang.String cookieValue)This method creates a new platform-independent Cookie.GenericCookienewCookie(java.lang.String cookieName, java.lang.String cookieValue, ContainerServicesNamespace namespace)This method creates a new platform-independent Cookie.ParameterBuildernewHiddenInputParameterBuilder()Create a new instance of a ParameterBuilder that is suited for building hidden inputs.NamespaceEncodernewNamespaceEncoder()Create a new instance of a NamespaceEncoder that can provide global namespace support.ParameterBuildernewURIParameterBuilder()Create a new instance of a ParameterBuilder that is suited for building URIs.protected static booleanuseNamespace(ContainerServicesNamespace namespace)Indicates wheter to use namespacestatic booleanuseNamespaceInCookie()Returns if there is a namespace used for cookies.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface com.microstrategy.web.platform.ContainerServices
addCookieToResponse, getApplicationAttribute, getApplicationPath, getCodePage, getCookieStrings, getCookieStrings, getFormAndQueryStrings, getHeaderValue, getMethod, getOutputStream, getPostedFile, getQueryString, getRemoteAddress, getRequestAttribute, getRequestServerName, getServerVariables, getSessionAttribute, getSessionAttribute, getSessionID, getSessionMaxIdleTime, getSessionStrings, getSessionStrings, getStatusCode, hasOutputStream, invalidateHttpSession, isJavaURLSessionSupported, isRequestSecure, isSessionlessRequest, sendBinaryContent, sendError, sendError, setApplicationAttribute, setCodePage, setContentType, setHeaderValue, setJavaURLSessionSupported, setRequestAttribute, setSessionAttribute, setSessionAttribute, setStatusCode 
- 
Methods inherited from interface com.microstrategy.web.platform.ContainerServicesContext
getContextPath, getRealPath, getResource, getResourceAsStream, getResourcePaths 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_prependSlashToResource
protected static boolean _prependSlashToResource
 
- 
WEB_XML_PATH
public static final java.lang.String WEB_XML_PATH
- Since:
 - MicroStrategy Web 9.0.0
 - See Also:
 - Constant Field Values
 
 
- 
APPLICATION_PARAMETERS_XML_PATH
public static final java.lang.String APPLICATION_PARAMETERS_XML_PATH
- Since:
 - MicroStrategy Web 9.0.0
 - See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
initFromPropertiesFile
protected static void initFromPropertiesFile()
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getInitParameterNames
public java.util.Enumeration getInitParameterNames()
Description copied from interface:ContainerServicesContextReturns enumeration of initialization parameter names- Specified by:
 getInitParameterNamesin interfaceContainerServicesContext- Returns:
 - enumeration of initialization parameter names
 - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getInitParameter
public java.lang.String getInitParameter(java.lang.String paramName)
Description copied from interface:ContainerServicesContextReturns initialization parameter value for the controller associated with this ContainerServices. If no controller has been associated, it returns a global value. This value is typically read from the microstrategy.xml or web.xml file. This value is read from theContainerServicesContext.getApplicationParameters()- Specified by:
 getInitParameterin interfaceContainerServicesContext- Parameters:
 paramName- parameter name- Returns:
 - parameter value
 - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getControllerParameter
public java.lang.String getControllerParameter(java.lang.String paramName, java.lang.String controllerName)Description copied from interface:ContainerServicesContextReturns initialization parameter value for the given controller. This value is typically read from the microstrategy.xml or web.xml file- Specified by:
 getControllerParameterin interfaceContainerServicesContext- Parameters:
 paramName- parameter namecontrollerName- Name that identifies the controller (e.g. mstrWeb, mstrWebAdmin).nullfor global paramters.- Returns:
 - parameter value
 - Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getApplicationParameters
public ApplicationParameters getApplicationParameters()
Description copied from interface:ContainerServicesContextReturns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file- Specified by:
 getApplicationParametersin interfaceContainerServicesContext- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
getControllerName
protected abstract java.lang.String getControllerName()
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
initGlobalObjects
public void initGlobalObjects()
Description copied from interface:ContainerServicesContextInitializes global instances, like FileLoader and Plugins, using this ContainerServices instance.- Specified by:
 initGlobalObjectsin interfaceContainerServicesContext- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
isNamespacedName
protected static boolean isNamespacedName(java.lang.String nativeName)
Check if the native name is namespaced name.- Parameters:
 nativeName- The native name. In namespace mode, it contains a special MicroStrategy prefix.- Returns:
 - Ture, if it contains MicorStrategy Namespace prefix. Otherwise return false.
 - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getRealName
protected static java.lang.String getRealName(java.lang.String nativeName)
Get the real name from native name.- Parameters:
 nativeName- The native name. In namespace mode, it contains a special MicroStrategy prefix.- Returns:
 - The name without MicroStrategy prefix.
 - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
newURIParameterBuilder
public ParameterBuilder newURIParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building URIs.- Specified by:
 newURIParameterBuilderin interfaceContainerServices- Returns:
 - An instance of a ParameterBuilder that generates URIs.
 
 
- 
newHiddenInputParameterBuilder
public ParameterBuilder newHiddenInputParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building hidden inputs.- Specified by:
 newHiddenInputParameterBuilderin interfaceContainerServices- Returns:
 - An instance of a ParameterBuilder that generates a string of hidden inputs.
 
 
- 
newNamespaceEncoder
public NamespaceEncoder newNamespaceEncoder()
Create a new instance of a NamespaceEncoder that can provide global namespace support.- Specified by:
 newNamespaceEncoderin interfaceContainerServices- Returns:
 - An instance of a NamespaceEncoder that should be used for global namespacing.
 
 
- 
useNamespace
protected static boolean useNamespace(ContainerServicesNamespace namespace)
Indicates wheter to use namespace- Parameters:
 namespace- AContainerServicesNamespaceobject indecates the namespace requirement.- Returns:
 - ture if namespace is not null, and namespace.useNamespace() returns ture.
 - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getCookieNamespace
protected static ContainerServicesNamespace getCookieNamespace()
Returns the namespace object for Cookies. The settings are defined in ContainerServices.properties file.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
useNamespaceInCookie
public static boolean useNamespaceInCookie()
Returns if there is a namespace used for cookies. It is defined in ContainerServices.properties file. 
- 
getCookieNamespaceCapacity
protected int getCookieNamespaceCapacity()
Returns the namespace capacity for cookies. It is defined in ContainerServices.properties file.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getSessionNamespaceCapacity
protected int getSessionNamespaceCapacity()
return the capacity of namespace of session.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getSessionNamespace
protected ContainerServicesNamespace getSessionNamespace()
Returns the namespace object for sessions. The settings are defined in ContainerServices.properties file.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getNamespaceValue
protected java.lang.String getNamespaceValue(ContainerServicesNamespace namespace)
Get the namespace value.- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
isEncryptedParameter
public boolean isEncryptedParameter(java.lang.String name)
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
isEncryptedByRedirect
public boolean isEncryptedByRedirect(java.lang.String name)
 
- 
encrypt
public java.lang.String encrypt(java.lang.String clearData)
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
decrypt
public java.lang.String decrypt(java.lang.String encryptedData)
- Since:
 - MicroStrategy Web 9.0.0
 
 
- 
newCookie
public GenericCookie newCookie(java.lang.String cookieName, java.lang.String cookieValue)
Description copied from interface:ContainerServicesThis method creates a new platform-independent Cookie. It is not yet associated with the current Response object.- Specified by:
 newCookiein interfaceContainerServices- Parameters:
 cookieName- AStringwhich identifies the name of the cookie.cookieValue- AStringrepresenting the value of the cookie.- Returns:
 - A 
GenericCookiecontaining the name/value pair supplied - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
newCookie
public GenericCookie newCookie(java.lang.String cookieName, java.lang.String cookieValue, ContainerServicesNamespace namespace)
Description copied from interface:ContainerServicesThis method creates a new platform-independent Cookie. It is not yet associated with the current Response object.- Specified by:
 newCookiein interfaceContainerServices- Parameters:
 cookieName- AStringwhich identifies the name of the cookie.cookieValue- AStringrepresenting the value of the cookie.namespace- AContainerServicesNamespaceobject representing the namespace requirement. If null, no namespace is used.- Returns:
 - A 
GenericCookiecontaining the name/value pair supplied - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getCookie
public GenericCookie getCookie(java.lang.String name)
Description copied from interface:ContainerServicesThis method retrieves a platform-independent Cookie with a specific name.- Specified by:
 getCookiein interfaceContainerServices- Parameters:
 name- AStringwhich identifies the name of the cookie.- Returns:
 - A 
GenericCookiefor the name supplied. If no cookie exists with this name, anullpointer is returned. - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getCookie
public GenericCookie getCookie(java.lang.String name, ContainerServicesNamespace namespace)
Description copied from interface:ContainerServicesThis method retrieves a platform-independent Cookie with a specific name.- Specified by:
 getCookiein interfaceContainerServices- Parameters:
 name- AStringwhich identifies the name of the cookie.namespace- AContainerServicesNamespaceobject represention the namespace requirement.- Returns:
 - A 
GenericCookiefor the name supplied. If no cookie exists with this name, anullpointer is returned. - Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getCookies
protected abstract HashList getCookies(ContainerServicesNamespace namespace)
- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
getNamespacePrefix
protected java.lang.String getNamespacePrefix()
- Since:
 - MicroStrategy Web 8.0.2
 
 
- 
isQueryParam
public boolean isQueryParam(java.lang.String pName)
Description copied from interface:ContainerServicesReturns a boolean indicating whether the input parameter is found in the query- Specified by:
 isQueryParamin interfaceContainerServices- Parameters:
 pName- name of the parameter to be searched in query- Returns:
 - true if query contains the parameter name (case-insensitive search) passed as input with a non-empty value
 
 
 - 
 
 -