org.pentaho.platform.uifoundation.component
Class FilterDefinition

java.lang.Object
  extended by 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

Method Summary
 void fromXml(org.dom4j.Element xMLnode)
          order of precedence: session-attribute, global-attribute, data-solution, static-list
 String getName()
           
 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.
 boolean isValid(String[] values)
           
static void main(String[] args)
           
 boolean populate(Map parameterProviders, String[] value)
           
 void setDefaultValue(String[] defaultValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)

populate

public boolean populate(Map parameterProviders,
                        String[] value)

getXForm

public void getXForm(StringBuffer xformHeader,
                     StringBuffer xformBody)
              throws ComponentException
Create the XForm header and XForm body, and place the results in the parameters xformHeader and xformBody.

Parameters:
xformHeader - StringBuffer containing the XForm header
xformBody - StringBuffer containing the XForm body
Throws:
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 the element 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)