com.adobe.icc.render.obj
Class ContextData

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

public class ContextData
extends Object
implements 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(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()
           
 Map getLocalVariables()
          These are the floating variables that are not bound to DD and defined in Document Composer.
 String getTextContentOverride()
          Content to use for module resolution instead of module's persisted content.
 MimeType getTextContentOverrideMimeType()
          The MIME Type for the textContentOverride property.
 boolean getUseXhtmlTextContent()
           
 Object getValue(String variableName)
          This method looks for the variable in all sources of information in the context and returns the value for the same.
 Set getVariableOverrides()
          Set of variables to use for module resolution instead of the module's persisted set of variables.
 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(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)
           
 void setIncludeEmptyConditions(boolean includeEmptyConditions)
           
 void setIncludeEmptyLists(boolean includeEmptyLists)
           
 void setLocalVariables(Map localVariables)
          Sets the floating variables that are not bound to DD and defined in Document Composer.
 void setTextContentOverride(String textContentOverride)
           
 void setTextContentOverrideMimeType(MimeType textContentOverrideMimeType)
           
 void setUseXhtmlTextContent(boolean useXhtmlTextContent)
           
 void setVariableOverrides(Set variableOverrides)
           
 void setVariableSubstitutionRules(Map variableSubstitutionRules)
           
 
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()

setDataDictionaryInstance

public void setDataDictionaryInstance(DataDictionaryInstance dataDictionaryInstance)

getLocalVariables

public 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(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 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(Map variableSubstitutionRules)

getUseXhtmlTextContent

public boolean getUseXhtmlTextContent()
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)

getTextContentOverride

public 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(String textContentOverride)

getTextContentOverrideMimeType

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

Returns:
The MIME Type for the textContentOverride property.

setTextContentOverrideMimeType

public void setTextContentOverrideMimeType(MimeType textContentOverrideMimeType)

getVariableOverrides

public 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(Set variableOverrides)

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)

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)

getValue

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

Parameters:
variableName -
Returns:

keepEmptyToken

public boolean keepEmptyToken(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(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.


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