Class FilterDefinition
- java.lang.Object
-
- org.pentaho.platform.uifoundation.component.FilterDefinition
-
- Direct Known Subclasses:
ActionFilterDefinition
,GlobalFilterDefinition
,SessionFilterDefinition
,StaticFilterDefinition
public abstract class FilterDefinition extends Object
TODO sbarkdull, may be worth breaking into 4 separate classes, one for each of the ITEM_SOURCE_*'s of course they would all implement the same interface or abstr class A factory class would look at the xml, and create the appropriate instance/type- Author:
- unknow, probably James Dixon
-
-
Field Summary
Fields Modifier and Type Field Description protected String
descriptionItem
name of the column to retrieve the names of the items placed in the filter panel's control related to the member variable nameColumnNoprotected String
formName
protected org.pentaho.platform.api.engine.ILogger
logger
protected org.dom4j.Element
node
protected org.pentaho.platform.api.engine.IPentahoSession
session
protected String
valueItem
name of the column to retrieve the values of the items placed in the filter panel's control related to the member variable valueColumnNo
-
Constructor Summary
Constructors Modifier Constructor Description protected
FilterDefinition(org.dom4j.Element node, org.pentaho.platform.api.engine.IPentahoSession session, org.pentaho.platform.api.engine.ILogger logger)
Ctor, duh.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
fromXml(org.dom4j.Element xMLnode)
order of precedence: session-attribute, global-attribute, data-solution, static-listString
getName()
protected abstract org.pentaho.commons.connection.IPentahoResultSet
getResultSet(Map parameterProviders)
String
getTitle()
void
getXForm(StringBuffer xformHeader, StringBuffer xformBody)
Create the XForm header and XForm body, and place the results in the parameters xformHeader and xformBody.protected boolean
isValid(String value)
boolean
isValid(String[] values)
static void
main(String[] args)
boolean
populate(Map parameterProviders, String[] value)
void
setDefaultValue(String[] defaultValue)
-
-
-
Field Detail
-
descriptionItem
protected String descriptionItem
name of the column to retrieve the names of the items placed in the filter panel's control related to the member variable nameColumnNo
-
valueItem
protected String valueItem
name of the column to retrieve the values of the items placed in the filter panel's control related to the member variable valueColumnNo
-
node
protected org.dom4j.Element node
-
formName
protected String formName
-
logger
protected org.pentaho.platform.api.engine.ILogger logger
-
session
protected org.pentaho.platform.api.engine.IPentahoSession session
-
-
Method Detail
-
getTitle
public String getTitle()
-
getName
public String getName()
-
fromXml
public void fromXml(org.dom4j.Element xMLnode) throws FilterPanelException
order of precedence: session-attribute, global-attribute, data-solution, static-list- Parameters:
xMLnode
-- Throws:
FilterPanelException
-
setDefaultValue
public void setDefaultValue(String[] defaultValue)
-
isValid
public boolean isValid(String[] values)
-
isValid
protected boolean isValid(String value)
-
getResultSet
protected abstract org.pentaho.commons.connection.IPentahoResultSet getResultSet(Map parameterProviders)
-
getXForm
public void getXForm(StringBuffer xformHeader, StringBuffer xformBody) throws org.pentaho.platform.api.engine.ComponentException
Create the XForm header and XForm body, and place the results in the parameters xformHeader and xformBody.- Parameters:
xformHeader
- StringBuffer containing the XForm headerxformBody
- StringBuffer containing the XForm body- Throws:
org.pentaho.platform.api.engine.ComponentException
- if this.nameColumnNo is -1, this.valueColumnNo is -1, or the this.resultSet is null. nameColumnNo is likely to be -1 if this.descriptionItem does not correlate with the value of theelement in the filter panel definition file and the name of a column in the resultSet. valueColumnNo is likely to be -1 if this.valueItem does not correlate with the value of the element in the filter panel definition file and the name of a column in the resultSet. resultSet is likely to be null if a result-set was not placed in session or global scope under the key identified by the or element in the filter panel definition file, or if the action sequence identified by element in the filter panel definition file failed to return a result set
-
main
public static void main(String[] args)
-
-