com.monad.homerun.filter
Class FilterScreen

java.lang.Object
  extended by com.monad.homerun.filter.Screen
      extended by com.monad.homerun.filter.FilterScreen
All Implemented Interfaces:
java.io.Serializable

public class FilterScreen
extends Screen

FilterScreen extends Screen for use of embedded filters, i.e. the screen passes the object if it's contained filter does.

See Also:
Serialized Form

Field Summary
static int OP_FAIL
           
static int OP_PASS
           
 
Fields inherited from class com.monad.homerun.filter.Screen
COMPONENT, FILTER, INST_PROP, LIST, RELATION, TYPE, TYPE_PROP
 
Constructor Summary
FilterScreen()
           
FilterScreen(boolean alternate, java.lang.String filterName, java.lang.String domain, int operator)
           
FilterScreen(FilterScreen screen)
           
 
Method Summary
 java.lang.String getDomain()
          Returns the domain of the filter
 java.lang.String getFilterName()
          Returns the name of the filter screen
 int getOperator()
          Returns the screen operator
 boolean isRuntime(Screener screener)
          Returns true if testing screen relies on runtime state of system
 boolean pass(Screener screener, java.lang.String domain, java.lang.String objectName, FilterTrace trace)
          Tests the object against the screen (with optional tracing)
 java.lang.String toString()
          Returns a string representation of the Screen
 boolean validate(Screener screener, java.lang.String domain, FilterTrace trace)
          Validates the terms of the screen with optional tracing
 
Methods inherited from class com.monad.homerun.filter.Screen
clone, getNote, getType, isAlternate, setNote
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OP_PASS

public static final int OP_PASS
See Also:
Constant Field Values

OP_FAIL

public static final int OP_FAIL
See Also:
Constant Field Values
Constructor Detail

FilterScreen

public FilterScreen()

FilterScreen

public FilterScreen(boolean alternate,
                    java.lang.String filterName,
                    java.lang.String domain,
                    int operator)

FilterScreen

public FilterScreen(FilterScreen screen)
Method Detail

getFilterName

public java.lang.String getFilterName()
Returns the name of the filter screen

Returns:
filter the name of the filter screen

getDomain

public java.lang.String getDomain()
Returns the domain of the filter

Returns:
domain the filter domain

getOperator

public int getOperator()
Returns the screen operator

Returns:
oper the screen operator

toString

public java.lang.String toString()
Description copied from class: Screen
Returns a string representation of the Screen

Overrides:
toString in class Screen
Returns:
a descriptive screen

isRuntime

public boolean isRuntime(Screener screener)
Description copied from class: Screen
Returns true if testing screen relies on runtime state of system

Specified by:
isRuntime in class Screen
Returns:
true if runtime

validate

public boolean validate(Screener screener,
                        java.lang.String domain,
                        FilterTrace trace)
Validates the terms of the screen with optional tracing

Specified by:
validate in class Screen
Parameters:
screener - the Screening agent
domain - the domain of the object being screened
trace - the optional trace object
Returns:
true if screen valid

pass

public boolean pass(Screener screener,
                    java.lang.String domain,
                    java.lang.String objectName,
                    FilterTrace trace)
Tests the object against the screen (with optional tracing)

Specified by:
pass in class Screen
Parameters:
screener - the Screening agent
domain - the domain of the object being screened
objectName - the object being screened
trace - the optional trace object
Returns:
true if object passes through screen


Copyright © 2006-2009 Richard Rodgers. All Rights Reserved.