|
HATS 7.5.1 Web API ReferencePublicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
com.ibm.hats.transform.context.ContextAttributes
public class ContextAttributes
Context attributes are a collection of attributes regarding the environment that the HSR component is running in. These attributes are required by the HSR component, but must be provided by the consumer because they are attributes that the HSR component is unable to calculate independently. The reason HSR is unable to calculate the attributes is because the attributes are implementation-specific. That is, if a consumer is deploying HSR in Java Servlet environment, then getting context attributes about the environment requires using Servlet-specific code. The same applies if the consumer is deploying HSR in Eclipse Studio. Getting context attributes about the Studio requires using Studio-specific code. Therefore, to keep HSR from being tied to certain implementations (such as to Java Servlets or Eclipse Studio), the responsibility of providing context attributes necessary to HSR is the responsibility of its consumer.
| Field Summary | |
|---|---|
static String |
ATTR_APP_DEFAULT_LOCALE
Flag indicating the application-default locale |
static String |
ATTR_APPLY_RENDERING_RULES
Flag to indicate whether rendering rules (global rules) are to be applied in this screen transformation |
static String |
ATTR_APPLY_TEXT_REPLACEMENT
Flag to indicate whther text replacements are to be applied in this screen transformation |
static String |
ATTR_CLASS_LOADER
Flag to store an optional class loader in the context attributes |
static String |
ATTR_CLIENT_LOCALE
Flag to indicate the client locale |
static String |
ATTR_CODEPAGE
Internal constant related to code page (primarily used for Bidi-processing) |
static String |
ATTR_DBCS_SETTINGS
Flag for storing an IDBCSSettings object in the context attributes |
static String |
ATTR_FORM_ID
Form ID (primarily applicable in a Portal environment) |
static String |
ATTR_GLOBAL_VARIABLES
Flag for storing the Global variables Hashtable in the context attributes |
static String |
ATTR_HSR_BIDI_SERVICES
Flag for storing an HsrBidiServices object in the context attributes |
static String |
ATTR_IN_COMPACT_RENDERING
Flag indicating whether screen transformation is being performed via compact rendering (default rendering for a smaller screen) |
static String |
ATTR_IN_DEFAULT_RENDERING
Flag indicating whether screen transformation is being performed via default rendering |
static String |
ATTR_IN_GLOBAL_RULES
Flag indicating whether component selection is in the Global Rules wizard |
static String |
ATTR_IN_LINUX_OS
Flag indicating whether the transformation recipient is running on a Linux operating system |
static String |
ATTR_IN_SCREEN_COMBINATION
Flag indicating whether component selection is in Screen Combination editor or wizard |
static String |
ATTR_IN_VCT_CONTEXT
Flag indicating whether the transformation is being performed inside VCT context (that is, using JSP "visual custom tags") |
static String |
ATTR_IN_VISTA_OS
Flag indicating whether the transformation recipient is running on a Vista operating system |
static String |
ATTR_IN_WIN08_OS
|
static String |
ATTR_IN_WINDOWS_CE_OS
Flag indicating whether the transformation recipient is running on Windows CE |
static String |
ATTR_PARMS_IN_TRANSFORM_HTML
Flag for storing a the paramters of a transformed HTML (most likely from an HttpServletRequest) |
static String |
ATTR_PATH_INFO_OBJECT
Flag for storing an IPathInfo object, which contains file path information of image and other files for certain widgets |
static String |
ATTR_RENDERING_RULES_ENGINE
Reference to the RenderingRulesEngine object associated with the current screen transformation |
static String |
ATTR_RUNTIME_RTL
Flag to indicate if screen text orientation in the end-user runtime is intentionally set right-to-left or left-to-right (Bidi-only) |
static String |
ATTR_SCRIPT_LANGUAGE
Name of the scripting language to generate scripts in (see the individual com.ibm.hats.transform.actions.ScriptAction classes) |
static String |
ATTR_SCRIPTING_DISABLED
Flag to indicate whether scripting (normally Javascript generation) is disabled |
static String |
ATTR_SHARED_GLOBAL_VARIABLES
Flag for storing a shared global variables Hashtable |
static String |
ATTR_TEXT_REPLACEMENTS
Flag for storing a text replacement list |
static String |
LEFT_TO_RIGHT_TEXT
Bidirectional text orientation setting representing left-to-right text |
static String |
RIGHT_TO_LEFT_TEXT
Bidirectional text orientation setting representing right-to-left text |
| Constructor Summary | |
|---|---|
ContextAttributes()
Creates a new ContextAttributes object with required HSR context attributes prefilled with default
values. |
|
| Method Summary | |
|---|---|
Locale |
getApplicationDefaultLocale()
Gets the default locale for the application. |
ClassLoader |
getClassLoader()
Gets an optional ClassLoader object (used primarily in the Studio environment) for loading components and widgets, if already set in the context attributes. |
Locale |
getClientLocale()
Gets the client locale, if already set in the context attributes. |
int |
getCodePage()
Gets the code page of the original host screen that is being transformed, if already set in the context attributes. |
com.ibm.hats.common.IDBCSSettings |
getDBCSSettings()
Gets the DBCS Settings object that is necessary for DBCS data processing in a DBCS environment, if already set in the context attributes. |
String |
getFormID()
Gets the name of the HTML form to which transformation output will be encapsulated in, if already set in the context attributes. |
Hashtable |
getGlobalVariables()
Gets the hashtable of optional Global Variables, if already set in the context attributes. |
HsrBidiServices |
getHsrBidiServices()
Gets an HsrBidiServices object that is required only when processing Bidirectional data in HSR. |
com.ibm.hats.transform.IPathInfo |
getPathInfo()
Gets an IPathInfo object, which contains path information required for HSR widgets, like Calendar, which load files from the file system. |
IRenderingRulesEngine |
getRenderingRulesEngine()
Gets an optional engine for Global Rules processing, which is only intended to be used in the IBM HATS environment. |
String |
getRuntimeTextOrientation()
Gets the text orientation configured in a runtime environment (such as an end-user's Web browser), which is to also be applied to the screen text by HSR, if already set in the context attributes. |
String |
getScriptLanguage()
Gets the name of the scripting language to generate scripts in (see the individual com.ibm.hats.transform.actions.ScriptAction classes), if already set in the context attributes. |
Hashtable |
getSharedGlobalVariables()
Gets an optional hashtable of Shared Global Variables, if already set in the context attributes. |
TextReplacementList |
getTextReplacements()
Gets an optional TextReplacementList object used in Text Replacement functionality, if already set in the context attributes. |
Map |
getTransformationHTMLParameters()
Gets a Map object representing the HTML parameters from the result of a transformation request, if already set in the context attributes. |
boolean |
isApplyRenderingRules()
Gets a boolean value representing whether optional Global Rules should be applied (this concept only applies to the IBM HATS product), if already set in the context attributes. |
boolean |
isApplyTextReplacement()
Gets a boolean value representing whether option Text Replacements should be applied, if already set in the context attributes. |
boolean |
isInCompactRendering()
Gets the optional value of the "is in compact rendering" attribute from the context attributes table, if already set in the context attributes. |
boolean |
isInDefaultRendering()
Gets the optional value of the "is in default rendering" attribute from the context attributes table, if already set in the context attributes. |
boolean |
isInGlobalRules()
Gets a boolean value representing whether or not global rules are being processed. |
boolean |
isInLinuxOS()
Gets whether the transformation request is targeted for a Linux operating system, if already set in the context attributes. |
boolean |
isInScreenCombination()
Gets a boolean value representing whether caller is in Screen Combination wizard/ editor if already set in the context attributes. |
boolean |
isInVCTContext()
Gets whether the transformation is performed in the VCT context (that is, using JSP "visual custom tags"), if already set in the context attributes. |
boolean |
isInVistaOS()
Gets whether the transformation request is targeted for a Windows Vista operating system, if already set in the context attributes. |
boolean |
isInWin08OS()
Gets whether the transformation request is targeted for a Windows Server 2008 operating system, if already set in the context attributes. |
boolean |
isInWindowsCEOS()
Gets whether the transformation request is targeted for Windows CE operating and its variants, if already set in the context attributes. |
boolean |
isScriptingDisabled()
Gets whether scripting is disabled or not, if already set in the context attributes. |
boolean |
isVista()
|
boolean |
isWin08()
|
static ContextAttributes |
makeContextAttributes(Hashtable contextAttributes)
Deprecated. |
Object |
put(Object key,
Object value)
|
void |
setApplicationDefaultLocale(Locale defaultLocale)
Sets the default locale for the application. |
void |
setApplyRenderingRules(boolean applyRules)
Sets an optional boolean value representing whether Global Rules should be applied (and only applies to the IBM HATS product). |
void |
setApplyTextReplacement(boolean applyTextReplacement)
Sets an optional boolean value representing whether Text Replacement should be applied to protected text of a host screen representation during a transformation. |
void |
setClassLoader(ClassLoader classLoader)
Sets an optional class loader for loading component and widget classes. |
void |
setClientLocale(Locale clientLocale)
Sets the client locale for the application. |
void |
setCodePage(int codepage)
Sets the code page of the original host screen that is being transformed. |
void |
setDBCSSettings(com.ibm.hats.common.IDBCSSettings dbcsSettings)
Sets the DBCS Settings object that is typically used in a DBCS environment. |
void |
setFormID(String formID)
Sets the name of the HTML form to which transformation output will be encapsulated in. |
void |
setGlobalVariables(Hashtable globalVars)
Sets the optional hashtable of Global Variables. |
void |
setHsrBidiServices(HsrBidiServices hsrBidi)
Sets an HsrBidiServices object that is required for processing Bidirectional data in HSR. |
void |
setIsInCompactRendering(boolean isCompactRendering)
Sets the optional value of the "is in compact rendering" attribute from the context attributes table. |
void |
setIsInDefaultRendering(boolean isDefaultRender)
Sets the optional value of the "is in default rendering" attribute from the context attributes table. |
void |
setIsInVCTContext(boolean inVCT)
Sets the optional flag of whether the transformation is performed in the VCT context. |
void |
setIsLinuxOS(boolean isLinux)
Sets whether the transformation request is targeted for a Linux operating system. |
void |
setIsVistaOS(boolean isVista)
Sets whether the transformation request is targeted for a Vista operating system. |
void |
setIsWindowsCEOS(boolean isWindowsCE)
Sets whether the transformation request is targeted for Widnows CE and its variants. |
void |
setPathInfo(com.ibm.hats.transform.IPathInfo pathInfo)
Sets an IPathInfo object, which contains path information necessary for HSR widgets, like Calendar, which load files from the file system. |
void |
setRenderingRulesEngine(IRenderingRulesEngine renderingRulesEngine)
Sets an engine for Global Rules processing, which is only intended to be used in the IBM HATS environment. |
void |
setRuntimeTextOrientation(String orientation)
Sets the text orientation configured in a runtime environment (such as an end-user's Web browser), which is to also be applied to the screen text by HSR. |
void |
setScriptingDisabled(boolean disabled)
Set whether scripting is disabled or not. |
void |
setScriptLanguage(String scriptLanguage)
Sets the name of the scripting language to generate scripts in (see the individual com.ibm.hats.transform.actions.ScriptAction classes). |
void |
setSharedGlobalVariables(Hashtable sharedGlobalVars)
Sets the optional hashtable of Shared Global Variables. |
void |
setTextReplacements(TextReplacementList replacementList)
Sets an optional TextReplacementList object used in Text Replacement functionality. |
void |
setTransformationHTMLParameters(Map htmlParmMap)
Sets a Map object representing the HTML parameters from the result of a transformation request. |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTR_APP_DEFAULT_LOCALE
public static final String ATTR_APPLY_RENDERING_RULES
public static final String ATTR_APPLY_TEXT_REPLACEMENT
public static final String ATTR_CLASS_LOADER
public static final String ATTR_CLIENT_LOCALE
public static final String ATTR_CODEPAGE
public static final String ATTR_DBCS_SETTINGS
public static final String ATTR_FORM_ID
public static final String ATTR_GLOBAL_VARIABLES
public static final String ATTR_HSR_BIDI_SERVICES
public static final String ATTR_IN_DEFAULT_RENDERING
public static final String ATTR_IN_COMPACT_RENDERING
public static final String ATTR_IN_SCREEN_COMBINATION
public static final String ATTR_IN_GLOBAL_RULES
public static final String ATTR_IN_LINUX_OS
public static final String ATTR_IN_VISTA_OS
public static final String ATTR_IN_WIN08_OS
public static final String ATTR_IN_WINDOWS_CE_OS
public static final String ATTR_IN_VCT_CONTEXT
public static final String ATTR_PARMS_IN_TRANSFORM_HTML
public static final String ATTR_PATH_INFO_OBJECT
public static final String ATTR_RENDERING_RULES_ENGINE
public static final String ATTR_RUNTIME_RTL
public static final String ATTR_SCRIPT_LANGUAGE
public static final String ATTR_SCRIPTING_DISABLED
public static final String ATTR_SHARED_GLOBAL_VARIABLES
public static final String ATTR_TEXT_REPLACEMENTS
public static final String LEFT_TO_RIGHT_TEXT
public static final String RIGHT_TO_LEFT_TEXT
| Constructor Detail |
|---|
public ContextAttributes()
Creates a new ContextAttributes object with required HSR context attributes prefilled with default
values. The default values are listed immediately below. If the default values are not satisfactory,
then they should be overridden with the appropriate set() method.
LEFT_TO_RIGHT_TEXTFollowing are examples of attributes that are not prefilled but must be provided by the consumer for HSR to function properly. A consumer should ideally examine each "getter" function of the context attributes and provide the attributes with the attribute's corresponding set() method.
| Method Detail |
|---|
public Locale getApplicationDefaultLocale()
public ClassLoader getClassLoader()
public Locale getClientLocale()
public int getCodePage()
public com.ibm.hats.common.IDBCSSettings getDBCSSettings()
public String getFormID()
public Hashtable getGlobalVariables()
public HsrBidiServices getHsrBidiServices()
public com.ibm.hats.transform.IPathInfo getPathInfo()
public IRenderingRulesEngine getRenderingRulesEngine()
public String getRuntimeTextOrientation()
LEFT_TO_RIGHT (default) or RIGHT_TO_LEFT.
LEFT_TO_RIGHT or RIGHT_TO_LEFT)public String getScriptLanguage()
public Hashtable getSharedGlobalVariables()
public TextReplacementList getTextReplacements()
public Map getTransformationHTMLParameters()
public boolean isApplyRenderingRules()
public boolean isApplyTextReplacement()
public boolean isInDefaultRendering()
public boolean isInCompactRendering()
public boolean isInScreenCombination()
public boolean isInGlobalRules()
public boolean isInLinuxOS()
public boolean isInVistaOS()
public boolean isInWin08OS()
public boolean isInWindowsCEOS()
public boolean isInVCTContext()
public boolean isScriptingDisabled()
public void setApplicationDefaultLocale(Locale defaultLocale)
defaultLocale - - the application default localepublic void setApplyRenderingRules(boolean applyRules)
applyRules - - boolean representing whether Global Rules are to be appliedpublic void setApplyTextReplacement(boolean applyTextReplacement)
applyTextReplacement - - boolean representing whether Text Replacements are to be appliedpublic void setClassLoader(ClassLoader classLoader)
classLoader - public void setClientLocale(Locale clientLocale)
clientLocale - - the client localepublic void setCodePage(int codepage)
codepage - - code page of the original hostpublic void setDBCSSettings(com.ibm.hats.common.IDBCSSettings dbcsSettings)
dbcsSettings - - DBCS Settings object to be used in a DBCS enviroment.public void setFormID(String formID)
formID - - name of HTML formpublic void setGlobalVariables(Hashtable globalVars)
globalVars - - hashtable of global variablespublic void setHsrBidiServices(HsrBidiServices hsrBidi)
hsrBidi - - the HsrBidiServices object to use in the Bidirectional environmentpublic void setIsInDefaultRendering(boolean isDefaultRender)
isDefaultRender - - whether in default rendering or notpublic void setIsInCompactRendering(boolean isCompactRendering)
isCompactRendering - - whether in compact rendering or notpublic void setIsInVCTContext(boolean inVCT)
inVCT - - whether in VCT context or notpublic void setIsLinuxOS(boolean isLinux)
isLinux - - whether in LinuxOS or notpublic void setIsVistaOS(boolean isVista)
isVista - - whether in Vista or not.public void setIsWindowsCEOS(boolean isWindowsCE)
isWindowsCE - - whether in Windows CE or notpublic void setPathInfo(com.ibm.hats.transform.IPathInfo pathInfo)
pathInfo - - object containing file system path infopublic void setRenderingRulesEngine(IRenderingRulesEngine renderingRulesEngine)
renderingRulesEngine - - object to process Global Rulespublic void setRuntimeTextOrientation(String orientation)
LEFT_TO_RIGHT_TEXT (default) or
RIGHT_TO_LEFT_TEXT.
If the orientation is not either of those, then the orientation will be set LEFT_TO_RIGHT_TEXT.
orientation - - text orientation (LEFT_TO_RIGHT_TEXT or RIGHT_TO_LEFT_TEXT)public void setScriptingDisabled(boolean disabled)
disabled - - whether scripting is disabled or notpublic void setScriptLanguage(String scriptLanguage)
scriptLanguage - - name of language to setpublic void setSharedGlobalVariables(Hashtable sharedGlobalVars)
sharedGlobalVars - - hashtable of shared global variablespublic void setTextReplacements(TextReplacementList replacementList)
replacementList - - text replacement list to setpublic void setTransformationHTMLParameters(Map htmlParmMap)
htmlParmMap - - map of the transformation HTML parameterspublic static ContextAttributes makeContextAttributes(Hashtable contextAttributes)
contextAttributes - The context attributes.
public Object put(Object key,
Object value)
put in interface Mapput in class Hashtablepublic boolean isVista()
public boolean isWin08()
|
HATS 7.5.1 (201005110649) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||