lumis.doui.table.filter
Class TableSourceFilter

Package class diagram package TableSourceFilter
java.lang.Object
  extended by lumis.doui.table.filter.AbstractTableSourceFilter
      extended by lumis.doui.table.filter.TableSourceFilter
All Implemented Interfaces:
ISourceFilter<TableSource>, ITableSourceFilter
Direct Known Subclasses:
CommentContentFilter, ContentTableSourceFilter, ContentVersionIdReaderTableSourceFilter, DatabaseViewFieldFilter, DatabaseViewFormulaEntryFilter, DependentServiceInstanceIdFilter, DomainScopeFilter, FileManagementPropertiesInterfaceFilter, MetaDataSourceFilter, MonthTableSourceFilter

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class TableSourceFilter
extends AbstractTableSourceFilter

Represents a source filter. Interacts with source fields to generate IQueryFilter.

Since:
4.0.4

Constructor Summary
TableSourceFilter()
           
 
Method Summary
protected  String calculateFilterOperator(Node filterNode)
          Analyzes this filter and returns the operator that should be used with it.
protected  IQueryValue calculateFilterValue(Node filterNode)
          Analyzes this filter and returns the value that should be used with it.
protected  Object convertFilterStandardValue(String value, Node filterNode)
          Checks and converts the filter "standard" value to real value.
protected  String convertOperatorStandardValue(String operator)
           
 String getFieldId()
           
 IQueryValue getFilterValue()
           
 String getInputControlType()
          Returns the input control type for this filter doui frontend.
 String getOperator()
           
 IParameters getParameters()
           
 IQueryFilter getQueryFilter(QueryBase queryBase, IParameters params)
          Returns a query filter corresponding to this source filter definition.
 IQueryFilter getQueryFilter(QueryField queryField, IQueryValue queryValue)
          Creates a query filter, filtering the query field by the value, according to this filter definitions.
 void init(TableSource source, Node filterNode)
          Initialization method, called before any other method on the filter instance.
 void init(TableSource source, String fieldId, String operator, IQueryValue filterValue)
           
 boolean isOrNull()
           
 boolean isRequired()
           
 boolean isValueInLookup()
           
 void setDefinition(Node filterDefinitionNode)
           
 void setFieldId(String fieldId)
           
 void setFilterValue(IQueryValue value)
           
 void setOperator(String operator)
           
 void setOrNull(boolean orNull)
           
 void setParameters(IParameters parameters)
           
 void setRequired(boolean required)
           
 void setValueInLookup(boolean valueInLookup)
           
 boolean shouldHideAllResults()
           
 
Methods inherited from class lumis.doui.table.filter.AbstractTableSourceFilter
getFilter, getId, getSource, setId, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableSourceFilter

public TableSourceFilter()
Method Detail

init

public void init(TableSource source,
                 Node filterNode)
          throws PortalException
Description copied from interface: ISourceFilter
Initialization method, called before any other method on the filter instance.

Specified by:
init in interface ISourceFilter<TableSource>
Overrides:
init in class AbstractTableSourceFilter
Parameters:
source - the source the filter belongs to.
filterNode - the filter definition node.
Throws:
PortalException - if the filter could not initialize itself.

init

public void init(TableSource source,
                 String fieldId,
                 String operator,
                 IQueryValue filterValue)
          throws PortalException
Throws:
PortalException

setDefinition

public void setDefinition(Node filterDefinitionNode)
                   throws PortalException
Throws:
PortalException

getQueryFilter

public IQueryFilter getQueryFilter(QueryBase queryBase,
                                   IParameters params)
                            throws PortalException,
                                   RequiredFilterValueException
Returns a query filter corresponding to this source filter definition.

Parameters:
queryBase - the query base the query filter will be applied to.
parameters - parameters to be used in the query filter.
Returns:
the query filter.
Throws:
PortalException
RequiredFilterValueException - when a required value for the filter was not given. No results should be shown when this happen.
Since:
4.0.4

getQueryFilter

public IQueryFilter getQueryFilter(QueryField queryField,
                                   IQueryValue queryValue)
                            throws PortalException
Creates a query filter, filtering the query field by the value, according to this filter definitions.

Parameters:
queryField - the query field.
queryValue - the query value.
Returns:
the query filter.
Throws:
PortalException
Since:
4.0.4

getInputControlType

public String getInputControlType()
                           throws PortalException
Description copied from interface: ISourceFilter
Returns the input control type for this filter doui frontend.

Specified by:
getInputControlType in interface ISourceFilter<TableSource>
Overrides:
getInputControlType in class AbstractTableSourceFilter
Returns:
the input control type, or null if there is no frontend for this filter instance.
Throws:
PortalException

calculateFilterOperator

protected String calculateFilterOperator(Node filterNode)
                                  throws PortalException
Analyzes this filter and returns the operator that should be used with it.

Parameters:
filterNode - the filter definition node.
Returns:
the filter operator.
Throws:
PortalException
Since:
4.0.4

convertOperatorStandardValue

protected String convertOperatorStandardValue(String operator)

calculateFilterValue

protected IQueryValue calculateFilterValue(Node filterNode)
                                    throws PortalException
Analyzes this filter and returns the value that should be used with it.

Parameters:
filterNode - the filter definition node.
Returns:
the filter value.
Throws:
PortalException
Since:
4.0.4

convertFilterStandardValue

protected Object convertFilterStandardValue(String value,
                                            Node filterNode)
                                     throws PortalException
Checks and converts the filter "standard" value to real value.

Parameters:
value -
filterNode -
Returns:
Throws:
PortalException
Since:
4.0.4

shouldHideAllResults

public boolean shouldHideAllResults()

getFieldId

public String getFieldId()

setFieldId

public void setFieldId(String fieldId)

getOperator

public String getOperator()

setOperator

public void setOperator(String operator)

isOrNull

public boolean isOrNull()

setOrNull

public void setOrNull(boolean orNull)

getParameters

public IParameters getParameters()

setParameters

public void setParameters(IParameters parameters)

isRequired

public boolean isRequired()

setRequired

public void setRequired(boolean required)

getFilterValue

public IQueryValue getFilterValue()

setFilterValue

public void setFilterValue(IQueryValue value)

isValueInLookup

public boolean isValueInLookup()

setValueInLookup

public void setValueInLookup(boolean valueInLookup)


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.