com.sas.dataselectors.filters
Interface FilterConditionInterface

All Known Subinterfaces:
AdvancedFilterConditionInterface
All Known Implementing Classes:
DefaultAdvancedFilterCondition, DefaultFilterCondition

@SASScope(value="ALL")
public interface FilterConditionInterface

This defines an interface describing the conditional operator and how many arguments it takes. The label is displayed on the dialog but the actual getCondition() object is stored in the FilterLogic result.


Method Summary
abstract  java.lang.String format(java.lang.String item, java.util.List values)
          Formats the current conditional into a user readable message
abstract  java.lang.Object getCondition()
          This object is defined by the adaptor implementor and will be returned as part of the completed filter data
abstract  int getConditionArgumentCount()
          Returns the number of allowed arguments for this Condition
abstract  java.lang.String getConditionArgumentLabel(int argument)
          Returns a label to display to the user for a specific argument.
abstract  java.lang.String[] getConditionArgumentLabels()
          Returns an array of the labels to display to the user.
abstract  java.lang.String getConditionLabel()
          The plain text label that will be shown to the user.
abstract  java.lang.String getConditionLabel(java.util.Locale locale)
          The plain text label that will be shown to the user.
abstract  java.lang.String getConditionMessageFormat()
          Returns a string usable by java.text.MessageFormat.format(...) to display this condition in a end user understandable message.
abstract  boolean isConditionObjectNegated()
          Should the normal meaning of the condition object be negated when evaluated
abstract  boolean isExpressionValueAllowed()
          Returns TRUE if users are allowed to edit value expressions, false otherwise.
abstract  boolean isPromptValueAllowed()
          Returns TRUE if users are allowed to create a prompt value, false otherwise.
abstract  boolean isUserValueAllowed()
          Returns TRUE if users are allowed to type in their own values, false otherwise.
abstract  boolean isValueListAllowed()
          Returns TRUE if users are allowed to select values from a list (if available), false otherwise.
abstract  void setConditionMessageFormat(java.lang.String messageFormat)
          Set the java.text.MessageFormat to use for generating a end usable message.
abstract  void setLocale(java.util.Locale locale)
           
 

Method Detail

getCondition

java.lang.Object getCondition()
This object is defined by the adaptor implementor and will be returned as part of the completed filter data

Returns:
Object

getConditionLabel

java.lang.String getConditionLabel()
The plain text label that will be shown to the user. examples '=' or 'equals', 'in between', etc

Returns:
String

getConditionLabel

java.lang.String getConditionLabel(java.util.Locale locale)
The plain text label that will be shown to the user. examples '=' or 'equals', 'in between', etc

Parameters:
locale -
Returns:
the plain text label that will be shown to the user.

getConditionArgumentCount

int getConditionArgumentCount()
Returns the number of allowed arguments for this Condition. -1= unlimited arguments ( a in ('1','2','3',...) ) 0 = no arguments ( a IS NULL ) 1 = only one argument ( a = '1' ) 2 = two arguments ( a between('1','2') ) ...

Returns:
int

getConditionArgumentLabels

java.lang.String[] getConditionArgumentLabels()
Returns an array of the labels to display to the user.

Returns:
String[]

getConditionArgumentLabel

java.lang.String getConditionArgumentLabel(int argument)
Returns a label to display to the user for a specific argument. (useful for tooltips or wizard labels) If the list takes and unlimited number of arguments, then the first label is the general label to use to describe the argument list, the second label is used to describe a possible list of values, and the third is used to describe a selected list of values. This is for support of a Dual List selector control. Example: a between('x','y') getConditionArgumentLabel(1)='lower limit' getConditionArgumentLabel(2)='upper limit' Example: a in ('w','x','y','z') (getConditionArgumentCount()==-1) getConditionArgumentLabel(1)="Value(s):" getConditionArgumentLabel(2)="Available Value(s):" getConditionArgumentLabel(3)="Selected Value(s):"

Parameters:
index - (1 based)
Returns:
String

getConditionMessageFormat

java.lang.String getConditionMessageFormat()
Returns a string usable by java.text.MessageFormat.format(...) to display this condition in a end user understandable message. This format conforms to the follow rules: {0} = name of the item being compared {1} = list of values if this is a LIST type compare operation {1}... = individual values for a multi-value compare operation Examples: Equals "{0} = {1}" Not in List "{0} <> ({1})" Is Between "{0} >= {1} AND {0} <= {2}"

Returns:
String

setConditionMessageFormat

void setConditionMessageFormat(java.lang.String messageFormat)
Set the java.text.MessageFormat to use for generating a end usable message.

Parameters:
String - messageFormat (based on java.text.MessageFormat formatting)

format

java.lang.String format(java.lang.String item,
                        java.util.List values)
Formats the current conditional into a user readable message

Parameters:
String - Item
java.util.List - Values
Returns:
String formatted message

isConditionObjectNegated

boolean isConditionObjectNegated()
Should the normal meaning of the condition object be negated when evaluated

Returns:
boolean

isUserValueAllowed

boolean isUserValueAllowed()
Returns TRUE if users are allowed to type in their own values, false otherwise.


isValueListAllowed

boolean isValueListAllowed()
Returns TRUE if users are allowed to select values from a list (if available), false otherwise.


isExpressionValueAllowed

boolean isExpressionValueAllowed()
Returns TRUE if users are allowed to edit value expressions, false otherwise.


isPromptValueAllowed

boolean isPromptValueAllowed()
Returns TRUE if users are allowed to create a prompt value, false otherwise.


setLocale

void setLocale(java.util.Locale locale)
Parameters:
locale -



Copyright © 2009 SAS Institute Inc. All Rights Reserved.