com.adobe.icc.render.obj
Class ContextData

java.lang.Object
  extended by com.adobe.icc.render.obj.ContextData
All Implemented Interfaces:
java.io.Serializable

public class ContextData
extends java.lang.Object
implements java.io.Serializable

Context Data is the holder for all information/data (Data Dictionary Instance, local Variables, Session/User data) that is to be used while processing any Content.

See Also:
Serialized Form

Constructor Summary
ContextData()
           
 
Method Summary
 boolean forcePlaceholder(java.lang.String variableName)
          This method looks for a substitution rule for the specified variable that indicates whether it should always be treated as a placeholder or if it should be treated as its regular type (placeholder or DDE).
 DataDictionaryInstance getDataDictionaryInstance()
          Returns the data dictionary instance.
 LocalizedDataFormatInfo getDataDisplayFormatInfo()
          Gets the data display format.
 java.util.Map getDataModuleMap()
           
 LetterRenderOptionsSpec getLetterRenderOptionsSpec()
           
 java.util.Map getLocalVariables()
          These are the floating variables that are not bound to DD and defined in Document Composer.
 DataDictionaryInstance getSystemContextDDI()
           
 java.lang.String getTextContentOverride()
          Content to use for module resolution instead of module's persisted content.
 MimeType getTextContentOverrideMimeType()
          Returns the MIME Type for the textContentOverride property.
 boolean getUseXhtmlTextContent()
          Returns a flag for indicating whether to use XHTML or Flash HTML/Flex Rich Text.
 java.lang.Object getValue(java.lang.String variableName, boolean xmlEncodeValue)
          This method looks for the variable in all sources of information in the context and returns the value for the same.
 java.util.Set getVariableOverrides()
          Set of variables to use for module resolution instead of the module's persisted set of variables.
 java.util.Map getVariableSubstitutionRules()
          Maps a variable name to a &-delimited string of variable substitution options and associated values that provide instructions specific to the substitution of the variable within the content.
 boolean isIncludeEmptyConditions()
          True if nested empty conditions (nested conditional modules that produce no output) should be included in the resolved content list.
 boolean isIncludeEmptyLists()
          True if nested empty lists (nested list modules that produce no output) should be included in the resolved content list.
 boolean keepEmptyToken(java.lang.String variableName)
          This method looks for a substitution rule for the specified variable that indicates whether its token should be retained when the variable's value is empty.
 void setDataDictionaryInstance(DataDictionaryInstance dataDictionaryInstance)
          Sets data dictionary instance.
 void setDataDisplayFormatInfo(LocalizedDataFormatInfo dataDisplayFormatInfo)
          Sets the data display format.
 void setDataModuleMap(java.util.Map dataModuleMap)
           
 void setIncludeEmptyConditions(boolean includeEmptyConditions)
          Sets flag to indicate whether nested empty conditions (nested conditional modules that produce no output) should be included in the resolved content list.
 void setIncludeEmptyLists(boolean includeEmptyLists)
          Sets flag to indicate whether nested empty lists (nested list modules that produce no output) should be included in the resolved content list.
 void setLetterRenderOptionsSpec(LetterRenderOptionsSpec letterRenderOptionsSpec)
           
 void setLocalVariables(java.util.Map localVariables)
          Sets the floating variables that are not bound to DD and defined in Document Composer.
 void setSystemContextDDI(DataDictionaryInstance systemContextDDI)
           
 void setTextContentOverride(java.lang.String textContentOverride)
          Sets content to use for module resolution instead of module's persisted content.
 void setTextContentOverrideMimeType(MimeType textContentOverrideMimeType)
          Sets the MIME Type for the textContentOverride property.
 void setUseXhtmlTextContent(boolean useXhtmlTextContent)
          Sets a flag for indicating whether to use XHTML or Flash HTML/Flex Rich Text.
 void setVariableOverrides(java.util.Set variableOverrides)
          Sets variables to use for module resolution instead of the module's persisted set of variables.
 void setVariableSubstitutionRules(java.util.Map variableSubstitutionRules)
          Sets variable substitution rules.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextData

public ContextData()
Method Detail

getDataDictionaryInstance

public DataDictionaryInstance getDataDictionaryInstance()
Returns the data dictionary instance.

Returns:
data dictionary instance

setDataDictionaryInstance

public void setDataDictionaryInstance(DataDictionaryInstance dataDictionaryInstance)
Sets data dictionary instance.

Parameters:
dataDictionaryInstance - data dictionary instance

getSystemContextDDI

public DataDictionaryInstance getSystemContextDDI()
Returns:
the systemContextDDI

setSystemContextDDI

public void setSystemContextDDI(DataDictionaryInstance systemContextDDI)
Parameters:
systemContextDDI - the systemContextDDI to set

getLocalVariables

public java.util.Map getLocalVariables()
These are the floating variables that are not bound to DD and defined in Document Composer.

Returns:
The floating variables that are not bound to DD and defined in Document Composer.

setLocalVariables

public void setLocalVariables(java.util.Map localVariables)
Sets the floating variables that are not bound to DD and defined in Document Composer.

Parameters:
localVariables - The floating variables that are not bound to dd and defined in Document Composer.

getVariableSubstitutionRules

public java.util.Map getVariableSubstitutionRules()
Maps a variable name to a &-delimited string of variable substitution options and associated values that provide instructions specific to the substitution of the variable within the content.
Supported options and values are as follows: - keepToken: 0 (default; replace token whether the variable's value is empty or not), 1 (leave token if variable's value is empty). - forcePlaceholder: 0 (default; DDE variables are treated normally and the data dictionary instance is used to retrieve their values), 1 (DDE variables are treated as normal placeholders: a value will be sought in the localVariables property instead of using the data dictionary). The absence from this map of the name of a variable found in the localVariables property indicates that defaults should be used.

Returns:
Map of a variable name to a &-delimited string of variable substitution options and associated values that provide instructions specific to the substitution of the variable within the content.

setVariableSubstitutionRules

public void setVariableSubstitutionRules(java.util.Map variableSubstitutionRules)
Sets variable substitution rules.

Parameters:
variableSubstitutionRules - variable substitution rules.

getUseXhtmlTextContent

public boolean getUseXhtmlTextContent()
Returns a flag for indicating whether to use XHTML or Flash HTML/Flex Rich Text.

Returns:
True if XHTML content should be used when resolving Text Modules; False if Flash HTML/Flex Rich Text should be used.
Defaults to true. Note that if textContentOverride is specified, textContentOverrideMimeType will override this property.

setUseXhtmlTextContent

public void setUseXhtmlTextContent(boolean useXhtmlTextContent)
Sets a flag for indicating whether to use XHTML or Flash HTML/Flex Rich Text.

Parameters:
useXhtmlTextContent - indicates XHTML or Flash HTML/Flex Rich Text should be used

getTextContentOverride

public java.lang.String getTextContentOverride()
Content to use for module resolution instead of module's persisted content. This is typically set when the module's content has been edited on the client yet contains variable tokens that need to be resolved. The content specified is expected to be of the MIME Type specified in the textContentOverrideMimeType property. If this property is null, the module's original content (and therefore its original variables, if any) is used. If empty, it is assumed that the module's content was edited and is now empty (which means the response will be empty content). NOTE: This applies to any module type whose content can be edited as text by the user during letter filling.

Returns:
Content to use for module resolution instead of module's persisted content.

setTextContentOverride

public void setTextContentOverride(java.lang.String textContentOverride)
Sets content to use for module resolution instead of module's persisted content.

Parameters:
textContentOverride - content to override persisted content.

getTextContentOverrideMimeType

public MimeType getTextContentOverrideMimeType()
Returns the MIME Type for the textContentOverride property.

Returns:
The MIME Type for the textContentOverride property.

setTextContentOverrideMimeType

public void setTextContentOverrideMimeType(MimeType textContentOverrideMimeType)
Sets the MIME Type for the textContentOverride property.

Parameters:
textContentOverrideMimeType - MIME Type for the textContentOverride property.

getVariableOverrides

public java.util.Set getVariableOverrides()
Set of variables to use for module resolution instead of the module's persisted set of variables. This is typically set when the module's content has been edited on the client and variables have been added/removed. If this property is null, the module's original persisted set of variables is used. If empty, it is assumed that the module's content was edited and no longer contains any variables to resolve. NOTE: This applies to any module type whose content can be edited as text by the user during letter filling.

Returns:
Set of variables to use for module resolution instead of the module's persisted set of variables.

setVariableOverrides

public void setVariableOverrides(java.util.Set variableOverrides)
Sets variables to use for module resolution instead of the module's persisted set of variables.

Parameters:
variableOverrides - set of variables to use for module resolution.

isIncludeEmptyConditions

public boolean isIncludeEmptyConditions()
True if nested empty conditions (nested conditional modules that produce no output) should be included in the resolved content list. This is essential when the caller is trying to determine the full extent of the content that resulted when a condition was evaluated -- if the condition was nested and had no output, there would be no output for the outer condition but the client still needs to know that the nested condition was actually output from the outer condition. NOTE: When this flag is true and an empty *nested* condition is encountered while resolving a list/condition, a Content object with its "empty" property set to true will be included in the resolved content list. This Content object's lineage will have the the empty nested condition as its youngest parent (meaning that the Content object represents an "empty module content placeholder" within the empty nested condition).

Returns:
True if nested empty conditions (nested conditional modules that produce no output) should be included in the resolved content list. False, otherwise.

setIncludeEmptyConditions

public void setIncludeEmptyConditions(boolean includeEmptyConditions)
Sets flag to indicate whether nested empty conditions (nested conditional modules that produce no output) should be included in the resolved content list.

Parameters:
includeEmptyConditions - flag to indicate whether nested empty conditions should be included in the resolved content list.

isIncludeEmptyLists

public boolean isIncludeEmptyLists()
True if nested empty lists (nested list modules that produce no output) should be included in the resolved content list. This is essential when the caller is trying to determine the full extend of the content that resulted when a list was resolved. If a list contained an empty list and this flag is false, the nested empty list produces no resolved content. Otherwise (this flag is true) the nested empty list will produce a piece of empty content in the content set returned from the module resolver. Empty lists may also result from conditions. If this flag is true, empty nested lists will be included in condition results, if applicable. NOTE: When this flag is true and an empty *nested* list is encountered while resolving a list/condition, a Content object with its "empty" property set to true will be included in the resolved content list. This Content object's lineage will have the the empty nested list as its youngest parent (meaning that the Content object represents an "empty module content placeholder" within the empty nested list).

Returns:
True if nested empty lists (nested list modules that produce no output) should be included in the resolved content list. False, otherwise.

setIncludeEmptyLists

public void setIncludeEmptyLists(boolean includeEmptyLists)
Sets flag to indicate whether nested empty lists (nested list modules that produce no output) should be included in the resolved content list.

Parameters:
includeEmptyLists - flag to indicate whether nested empty lists should be included in the resolved content list.

getValue

public java.lang.Object getValue(java.lang.String variableName,
                                 boolean xmlEncodeValue)
This method looks for the variable in all sources of information in the context and returns the value for the same.

Parameters:
variableName - name of the variable.
xmlEncodeValue - This parameter ensures that the returned object contains encoded value for XML sensitive characters.
Returns:
variable value.

keepEmptyToken

public boolean keepEmptyToken(java.lang.String variableName)
This method looks for a substitution rule for the specified variable that indicates whether its token should be retained when the variable's value is empty.

Parameters:
variableName - The name of the variable whose substitution rule is sought.
Returns:
True if the token should not be replaced when the variable's value is empty; false if the variable's token should be replaced even if the variable's value is empty.

forcePlaceholder

public boolean forcePlaceholder(java.lang.String variableName)
This method looks for a substitution rule for the specified variable that indicates whether it should always be treated as a placeholder or if it should be treated as its regular type (placeholder or DDE).

Parameters:
variableName - The name of the variable whose substitution rule is sought.
Returns:
True if the variable should always be treated as a placeholder regardless of its type; false if it should be treated according to its type.

getDataDisplayFormatInfo

public LocalizedDataFormatInfo getDataDisplayFormatInfo()
Gets the data display format. This is used while replacing variables inside the content

Returns:
data display format

setDataDisplayFormatInfo

public void setDataDisplayFormatInfo(LocalizedDataFormatInfo dataDisplayFormatInfo)
Sets the data display format. This is used while replacing variables inside the content

Parameters:
dataDisplayFormatInfo -

getDataModuleMap

public java.util.Map getDataModuleMap()
Returns:
the dataModuleMap

setDataModuleMap

public void setDataModuleMap(java.util.Map dataModuleMap)
Parameters:
dataModuleMap - the dataModuleMap to set

getLetterRenderOptionsSpec

public LetterRenderOptionsSpec getLetterRenderOptionsSpec()
Returns:
the letterRenderOptionsSpec

setLetterRenderOptionsSpec

public void setLetterRenderOptionsSpec(LetterRenderOptionsSpec letterRenderOptionsSpec)
Parameters:
letterRenderOptionsSpec - the letterRenderOptionsSpec to set


[an error occurred while processing this directive] [an error occurred while processing this directive]