public abstract class

AbstractConfigurableContainerServices

extends Object
implements ContainerServices
java.lang.Object
   ↳ com.microstrategy.web.platform.AbstractConfigurableContainerServices
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

This abstract class provides method implementations for newURIParameterBuilder(), newHiddenInputParameterBuilder() and newNamespaceEncoder(). 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
Each of these properties must have the value of a fully qualified class name and must implement the appropriate interface (e.g., ParameterBuilder or NamespaceEncoder). If absent or malformed, this class creates new instances of DefaultURIBuilderImpl, DefaultHiddenInputBuilderImpl and EmptyNamespaceEncoderImpl, respectively.

Summary

Nested Classes
class AbstractConfigurableContainerServices.AbstractContainerStringCollection Abstract class for string collection classes. 
class AbstractConfigurableContainerServices.CookieWrapper A implememtation of GenericCookies. 
Constants
String APPLICATION_PARAMETERS_XML_PATH
String WEB_XML_PATH
[Expand]
Inherited Constants
From interface com.microstrategy.web.platform.ContainerServices
Fields
protected static boolean _prependSlashToResource
Public Constructors
AbstractConfigurableContainerServices()
Public Methods
String decrypt(String encryptedData)
String encrypt(String clearData)
ApplicationParameters getApplicationParameters()
Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file
String getControllerParameter(String paramName, String controllerName)
Returns initialization parameter value for the given controller.
GenericCookie getCookie(String name)
This method retrieves a platform-independent Cookie with a specific name.
GenericCookie getCookie(String name, ContainerServicesNamespace namespace)
This method retrieves a platform-independent Cookie with a specific name.
String getInitParameter(String paramName)
Returns initialization parameter value for the controller associated with this ContainerServices.
Enumeration getInitParameterNames()
Returns enumeration of initialization parameter names
void initGlobalObjects()
Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.
boolean isEncryptedByRedirect(String name)
boolean isEncryptedParameter(String name)
GenericCookie newCookie(String cookieName, String cookieValue)
This method creates a new platform-independent Cookie.
GenericCookie newCookie(String cookieName, String cookieValue, ContainerServicesNamespace namespace)
This method creates a new platform-independent Cookie.
ParameterBuilder newHiddenInputParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building hidden inputs.
NamespaceEncoder newNamespaceEncoder()
Create a new instance of a NamespaceEncoder that can provide global namespace support.
ParameterBuilder newURIParameterBuilder()
Create a new instance of a ParameterBuilder that is suited for building URIs.
Protected Methods
abstract String getControllerName()
static ContainerServicesNamespace getCookieNamespace()
Returns the namespace object for Cookies.
int getCookieNamespaceCapacity()
Returns the namespace capacity for cookies.
abstract HashList getCookies(ContainerServicesNamespace namespace)
String getNamespacePrefix()
String getNamespaceValue(ContainerServicesNamespace namespace)
Get the namespace value.
static String getRealName(String nativeName)
Get the real name from native name.
ContainerServicesNamespace getSessionNamespace()
Returns the namespace object for sessions.
int getSessionNamespaceCapacity()
return the capacity of namespace of session.
static void initFromPropertiesFile()
static boolean isNamespacedName(String nativeName)
Check if the native name is namespaced name.
static boolean useNamespace(ContainerServicesNamespace namespace)
Indicates wheter to use namespace
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.web.platform.ContainerServices
From interface com.microstrategy.web.platform.ContainerServicesContext

Constants

public static final String APPLICATION_PARAMETERS_XML_PATH

Constant Value: "/WEB-INF/microstrategy.xml"

public static final String WEB_XML_PATH

Constant Value: "/WEB-INF/web.xml"

Fields

protected static boolean _prependSlashToResource

Public Constructors

public AbstractConfigurableContainerServices ()

Public Methods

public String decrypt (String encryptedData)

public String encrypt (String clearData)

public ApplicationParameters getApplicationParameters ()

Returns the an ApplicationParameters instance that includes all the parameters defined in the microstrategy.xml or web.xml file

public String getControllerParameter (String paramName, String controllerName)

Returns initialization parameter value for the given controller. This value is typically read from the microstrategy.xml or web.xml file

Parameters
paramName parameter name
controllerName Name that identifies the controller (e.g. mstrWeb, mstrWebAdmin). null for global paramters.
Returns
  • parameter value

public GenericCookie getCookie (String name)

This method retrieves a platform-independent Cookie with a specific name.

Parameters
name A String which identifies the name of the cookie.
Returns
  • A GenericCookie for the name supplied. If no cookie exists with this name, a null pointer is returned.

public GenericCookie getCookie (String name, ContainerServicesNamespace namespace)

This method retrieves a platform-independent Cookie with a specific name.

Parameters
name A String which identifies the name of the cookie.
namespace A ContainerServicesNamespace object represention the namespace requirement.
Returns
  • A GenericCookie for the name supplied. If no cookie exists with this name, a null pointer is returned.

public String getInitParameter (String paramName)

Returns 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 the getApplicationParameters()

Parameters
paramName parameter name
Returns
  • parameter value

public Enumeration getInitParameterNames ()

Returns enumeration of initialization parameter names

Returns
  • enumeration of initialization parameter names

public void initGlobalObjects ()

Initializes global instances, like FileLoader and Plugins, using this ContainerServices instance.

public boolean isEncryptedByRedirect (String name)

public boolean isEncryptedParameter (String name)

public GenericCookie newCookie (String cookieName, String cookieValue)

This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.

Parameters
cookieName A String which identifies the name of the cookie.
cookieValue A String representing the value of the cookie.
Returns

public GenericCookie newCookie (String cookieName, String cookieValue, ContainerServicesNamespace namespace)

This method creates a new platform-independent Cookie. It is not yet associated with the current Response object.

Parameters
cookieName A String which identifies the name of the cookie.
cookieValue A String representing the value of the cookie.
namespace A ContainerServicesNamespace object representing the namespace requirement. If null, no namespace is used.
Returns

public ParameterBuilder newHiddenInputParameterBuilder ()

Create a new instance of a ParameterBuilder that is suited for building hidden inputs.

Returns
  • An instance of a ParameterBuilder that generates a string of hidden inputs.

public NamespaceEncoder newNamespaceEncoder ()

Create a new instance of a NamespaceEncoder that can provide global namespace support.

Returns
  • An instance of a NamespaceEncoder that should be used for global namespacing.

public ParameterBuilder newURIParameterBuilder ()

Create a new instance of a ParameterBuilder that is suited for building URIs.

Returns
  • An instance of a ParameterBuilder that generates URIs.

Protected Methods

protected abstract String getControllerName ()

protected static ContainerServicesNamespace getCookieNamespace ()

Returns the namespace object for Cookies. The settings are defined in ContainerServices.properties file.

protected int getCookieNamespaceCapacity ()

Returns the namespace capacity for cookies. It is defined in ContainerServices.properties file.

protected abstract HashList getCookies (ContainerServicesNamespace namespace)

protected String getNamespacePrefix ()

protected String getNamespaceValue (ContainerServicesNamespace namespace)

Get the namespace value.

protected static String getRealName (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.

protected ContainerServicesNamespace getSessionNamespace ()

Returns the namespace object for sessions. The settings are defined in ContainerServices.properties file.

protected int getSessionNamespaceCapacity ()

return the capacity of namespace of session.

protected static void initFromPropertiesFile ()

protected static boolean isNamespacedName (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.

protected static boolean useNamespace (ContainerServicesNamespace namespace)

Indicates wheter to use namespace

Parameters
namespace A ContainerServicesNamespace object indecates the namespace requirement.
Returns
  • ture if namespace is not null, and namespace.useNamespace() returns ture.