Package lumis.doui.table.filter
Class TableSourceFilter
- java.lang.Object
-
- lumis.doui.table.filter.AbstractTableSourceFilter
-
- lumis.doui.table.filter.TableSourceFilter
-
- All Implemented Interfaces:
ISourceFilter<TableSource>
,ITableSourceFilter
- Direct Known Subclasses:
ActivityDateFilter
,ActivityDateFilter
,CommentContentFilter
,CommentItTextFilter
,ContentTableSourceFilter
,ContentVersionIdReaderTableSourceFilter
,CurrentCommunityIdFilter
,CurrentDayDateFilter
,DatabaseViewFieldFilter
,DatabaseViewFormulaEntryFilter
,DependentServiceInstanceIdFilter
,DependentServiceInstanceIdFilter
,DomainScopeFilter
,FileManagementPropertiesInterfaceFilter
,MetaDataSourceFilter
,MonthTableSourceFilter
,MyCommunitiesChannelIdFilter
,MyLastModifiedDateTimeTableSourceFilter
,NextDayDateFilter
,ParentJourneyFilter
,QuestionnaireListFilter
,StatusFilter
,SynonymWordFilter
,UserJourneyInstanceFilter
,VersionFilter
,WorklowStateTableSourceFilter
@StableMinor(version="14.0", sinceVersion="4.0") public class TableSourceFilter extends AbstractTableSourceFilter
Represents a source filter. Interacts with source fields to generateIQueryFilter
.- Since:
- 4.0.4
- Version:
- $Revision: 24476 $ $Date: 2021-04-28 11:28:23 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description TableSourceFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, String fieldId, String operator, IQueryValue filterValue)
void
init(TableSource source, Node filterNode)
Initialization method, called before any other method on the filter instance.boolean
isEnabled()
Returns if this filter is enabled.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()
-
-
-
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 interfaceISourceFilter<TableSource>
- Overrides:
init
in classAbstractTableSourceFilter
- 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 interfaceISourceFilter<TableSource>
- Overrides:
getInputControlType
in classAbstractTableSourceFilter
- 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
-
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)
-
isEnabled
public boolean isEnabled() throws PortalException
Description copied from interface:ISourceFilter
Returns if this filter is enabled. If not enabled, this filter should be ignored, as if it was not present.- Returns:
true
if this filter is enabled,false
otherwise.- Throws:
PortalException
-
-