Class MojoRWDTransform.RWLayoutContext
- java.lang.Object
-
- com.microstrategy.web.app.transforms.MojoRWDTransform.RWLayoutContext
-
- All Implemented Interfaces:
RWBeanVisitor
,RWBeanVisitor2
- Direct Known Subclasses:
MojoIVETransform.IVELayoutContext
,MojoRWDTransform.RWLayoutContextDefn
- Enclosing class:
- MojoRWDTransform
protected class MojoRWDTransform.RWLayoutContext extends java.lang.Object implements RWBeanVisitor2
This class is used to walk the Report Writer Document tree (it implements RWBeanVisitor2) and holds state about what it has encountered...
-
-
Field Summary
Fields Modifier and Type Field Description protected Block
bRWLayoutDef
protected java.util.Stack<Block>
subsectionBlockStack
protected java.util.Map<java.lang.String,com.microstrategy.web.app.transforms.FormatPropertyConverterFactory.SubsectionBoundingBox>
subsectionBoundingBoxMap
-
Constructor Summary
Constructors Constructor Description RWLayoutContext(Block bRWLayoutDef, Block bRWLayout, java.util.Map<java.lang.String,com.microstrategy.web.app.transforms.FormatPropertyConverterFactory.SubsectionBoundingBox> subsectionBB)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addRWTemplateProperties(Block tb, ViewBean viewBean, RWGridGraphDef gridGraphDef, RWGridGraphObject gridGraphObj, java.util.Map<java.lang.String,java.lang.String> dbps)
protected void
addTemplateExtraInfo(Block bRWTemplate, ViewBean vb, RWGridGraphObject gridGraphObj)
protected BlockList
createNumberFormatsBlock(WebTemplate template, AppContext context, boolean isForMetrics)
Get the format properties of grid units' value for each template.protected Block
createRWEditableTextBlock(RWUnitDef unitDef, RWObject object, java.util.Map<java.lang.String,java.lang.String> dbps)
protected Block
createRWGridBlock(ViewBean viewBean, RWGridGraphDef gridGraphDef, RWGridGraphObject gridGraphObj, java.util.Map<java.lang.String,java.lang.String> dbps)
protected Block
createRWHTMLContainerBlock(RWUnitDef unitDef, RWObject object, java.util.Map<java.lang.String,java.lang.String> dbps)
java.lang.Exception
firstException()
protected boolean
forceShowAsGrid(ViewBean viewBean)
protected java.lang.String
getAndroidVisualization(ViewBean viewBean)
protected int
getEffectiveDisplayMode(RWGridGraphDef def)
protected java.lang.String
getThresholdKey(java.lang.String thrID)
protected TransformInstance
getXtabTransformInstance(ViewBean viewBean, RWGridGraphDef gridGraphDef)
boolean
hasExceptions()
protected boolean
ignoreSection(RWSection section, RWSectionDef sectionDef)
protected boolean
isAndroidVisualization(ViewBean viewBean)
protected boolean
isMojoVisualization(ViewBean viewBean)
protected boolean
isQuickSwitchEnabled(RWGridGraphDef unitDef)
protected boolean
isVisualization(ViewBean viewBean)
void
onEnd(MarkupOutput mo)
Called on iteration endvoid
onEndSection(RWSection section, MarkupOutput mo)
void
onEndSubsection(RWSection subsection, MarkupOutput mo, boolean isBordered)
A subsection border occurs between two subsections, or if the subsection is the very last section in the document.void
onObject(RWBean rwBean, RWObject ob, MarkupOutput mo)
Specific case whereRWObject#getDefinition().getType == EnumRWUnitTypes.RWUNIT_SUBREPORT
.void
onObject(ViewBean viewBean, RWObject ob, MarkupOutput mo)
Specific case whereRWObject#getDefinition().getType == EnumRWUnitTypes.RWUNIT_GRIDGRAPH
The corresponding data value is encapsulated in a ViewBean for ease of use.void
onObject(RWObject ob, MarkupOutput mo)
This is invoked as a fallback if the more specificonObject
declarations are not matched.void
onStart(RWDefinition definition, MarkupOutput mo)
Called on iteration start upvoid
onStartSection(RWSection section, MarkupOutput mo)
void
onStartSubsection(RWSection subsection, MarkupOutput mo)
Called on start of subsectionprotected boolean
skipSubsection(RWSection subsection, RWSubsectionDef subsectionDef)
protected void
storeException(java.lang.Exception e)
-
-
-
Field Detail
-
bRWLayoutDef
protected Block bRWLayoutDef
-
subsectionBlockStack
protected java.util.Stack<Block> subsectionBlockStack
-
subsectionBoundingBoxMap
protected java.util.Map<java.lang.String,com.microstrategy.web.app.transforms.FormatPropertyConverterFactory.SubsectionBoundingBox> subsectionBoundingBoxMap
-
-
Method Detail
-
firstException
public java.lang.Exception firstException()
-
hasExceptions
public boolean hasExceptions()
-
onStart
public void onStart(RWDefinition definition, MarkupOutput mo)
Description copied from interface:RWBeanVisitor2
Called on iteration start up- Specified by:
onStart
in interfaceRWBeanVisitor2
- Parameters:
definition
- document definitionmo
- markup output
-
onStartSection
public void onStartSection(RWSection section, MarkupOutput mo)
- Specified by:
onStartSection
in interfaceRWBeanVisitor
- Parameters:
section
- the report writing document section.mo
- the markup output.- See Also:
RWVisitor.onStartSection(RWSection)
-
onStartSubsection
public void onStartSubsection(RWSection subsection, MarkupOutput mo)
Description copied from interface:RWBeanVisitor2
Called on start of subsection- Specified by:
onStartSubsection
in interfaceRWBeanVisitor2
- Parameters:
subsection
- subsectionmo
- markup output
-
onEndSubsection
public void onEndSubsection(RWSection subsection, MarkupOutput mo, boolean isBordered)
Description copied from interface:RWBeanVisitor2
A subsection border occurs between two subsections, or if the subsection is the very last section in the document.- Specified by:
onEndSubsection
in interfaceRWBeanVisitor2
- Parameters:
subsection
- the subsection before the border.mo
- the markup output.
-
onEndSection
public void onEndSection(RWSection section, MarkupOutput mo)
- Specified by:
onEndSection
in interfaceRWBeanVisitor
- Parameters:
section
- the report writing document section.mo
- the markup output.- See Also:
RWVisitor.onEndSection(RWSection)
-
onEnd
public void onEnd(MarkupOutput mo)
Description copied from interface:RWBeanVisitor2
Called on iteration end- Specified by:
onEnd
in interfaceRWBeanVisitor2
- Parameters:
mo
- markup output
-
onObject
public void onObject(RWObject ob, MarkupOutput mo)
Description copied from interface:RWBeanVisitor
This is invoked as a fallback if the more specific
onObject
declarations are not matched.- Specified by:
onObject
in interfaceRWBeanVisitor
- Parameters:
ob
- the report writing document object.mo
- the markup output.- See Also:
RWVisitor.onObject(RWObject)
-
onObject
public void onObject(RWBean rwBean, RWObject ob, MarkupOutput mo)
Description copied from interface:RWBeanVisitor
Specific case where
RWObject#getDefinition().getType == EnumRWUnitTypes.RWUNIT_SUBREPORT
. The corresponding data value is encapsulated in a RWBean for ease of use.- Specified by:
onObject
in interfaceRWBeanVisitor
- Parameters:
rwBean
- an embedded bean.ob
- the report writing document object.mo
- the markup output.- See Also:
RWVisitor.onObject(RWObject)
-
onObject
public void onObject(ViewBean viewBean, RWObject ob, MarkupOutput mo)
Description copied from interface:RWBeanVisitor
Specific case where
RWObject#getDefinition().getType == EnumRWUnitTypes.RWUNIT_GRIDGRAPH
The corresponding data value is encapsulated in a ViewBean for ease of use.- Specified by:
onObject
in interfaceRWBeanVisitor
- Parameters:
viewBean
- an embedded bean.ob
- the report writing document object.mo
- the markup output.- See Also:
RWVisitor.onObject(RWObject)
-
addTemplateExtraInfo
protected void addTemplateExtraInfo(Block bRWTemplate, ViewBean vb, RWGridGraphObject gridGraphObj)
-
isAndroidVisualization
protected boolean isAndroidVisualization(ViewBean viewBean) throws WebObjectsException, WebBeanException
- Throws:
WebObjectsException
WebBeanException
-
getAndroidVisualization
protected java.lang.String getAndroidVisualization(ViewBean viewBean) throws WebObjectsException, WebBeanException
- Throws:
WebObjectsException
WebBeanException
-
isQuickSwitchEnabled
protected boolean isQuickSwitchEnabled(RWGridGraphDef unitDef)
-
getEffectiveDisplayMode
protected int getEffectiveDisplayMode(RWGridGraphDef def)
-
skipSubsection
protected boolean skipSubsection(RWSection subsection, RWSubsectionDef subsectionDef)
-
addRWTemplateProperties
protected boolean addRWTemplateProperties(Block tb, ViewBean viewBean, RWGridGraphDef gridGraphDef, RWGridGraphObject gridGraphObj, java.util.Map<java.lang.String,java.lang.String> dbps)
-
getXtabTransformInstance
protected TransformInstance getXtabTransformInstance(ViewBean viewBean, RWGridGraphDef gridGraphDef) throws WebTransformException
- Throws:
WebTransformException
-
createRWGridBlock
protected Block createRWGridBlock(ViewBean viewBean, RWGridGraphDef gridGraphDef, RWGridGraphObject gridGraphObj, java.util.Map<java.lang.String,java.lang.String> dbps) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createNumberFormatsBlock
protected BlockList createNumberFormatsBlock(WebTemplate template, AppContext context, boolean isForMetrics) throws java.lang.Exception
Get the format properties of grid units' value for each template. Implemented in MojoIVETransform- Returns:
- null
- Throws:
java.lang.Exception
-
ignoreSection
protected boolean ignoreSection(RWSection section, RWSectionDef sectionDef)
-
storeException
protected void storeException(java.lang.Exception e)
-
createRWHTMLContainerBlock
protected Block createRWHTMLContainerBlock(RWUnitDef unitDef, RWObject object, java.util.Map<java.lang.String,java.lang.String> dbps) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createRWEditableTextBlock
protected Block createRWEditableTextBlock(RWUnitDef unitDef, RWObject object, java.util.Map<java.lang.String,java.lang.String> dbps) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getThresholdKey
protected java.lang.String getThresholdKey(java.lang.String thrID)
-
isVisualization
protected boolean isVisualization(ViewBean viewBean)
-
isMojoVisualization
protected boolean isMojoVisualization(ViewBean viewBean)
-
forceShowAsGrid
protected boolean forceShowAsGrid(ViewBean viewBean)
-
-