com.monad.homerun.filter
Class Screen

java.lang.Object
  extended by com.monad.homerun.filter.Screen
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ComponentScreen, FilterScreen, ListScreen, PropertyScreen, RelationScreen, TypeScreen

public abstract class Screen
extends java.lang.Object
implements java.io.Serializable

Screen is the abstract base class for describing a filter screen. Evaluates to true or false with respect to an object.

See Also:
Serialized Form

Field Summary
static java.lang.String COMPONENT
           
static java.lang.String FILTER
           
static java.lang.String INST_PROP
           
static java.lang.String LIST
           
static java.lang.String RELATION
           
static java.lang.String TYPE
           
static java.lang.String TYPE_PROP
           
 
Constructor Summary
Screen()
           
Screen(boolean alternate, java.lang.String type)
           
Screen(Screen screen)
           
 
Method Summary
static Screen clone(Screen screen)
           
 java.lang.String getNote()
           
 java.lang.String getType()
          Returns the type of the screen
 boolean isAlternate()
          Returns whether screen alternates with predecessor screen
abstract  boolean isRuntime(Screener screener)
          Returns true if testing screen relies on runtime state of system
abstract  boolean pass(Screener screener, java.lang.String domain, java.lang.String objectName, FilterTrace trace)
          Tests the object against the screen (with optional tracing)
 void setNote(java.lang.String note)
           
 java.lang.String toString()
          Returns a string representation of the Screen
abstract  boolean validate(Screener screener, java.lang.String domain, FilterTrace trace)
          Validates the terms of the screen with optional tracing
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

COMPONENT

public static final java.lang.String COMPONENT
See Also:
Constant Field Values

LIST

public static final java.lang.String LIST
See Also:
Constant Field Values

FILTER

public static final java.lang.String FILTER
See Also:
Constant Field Values

RELATION

public static final java.lang.String RELATION
See Also:
Constant Field Values

TYPE_PROP

public static final java.lang.String TYPE_PROP
See Also:
Constant Field Values

INST_PROP

public static final java.lang.String INST_PROP
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values
Constructor Detail

Screen

public Screen()

Screen

public Screen(boolean alternate,
              java.lang.String type)

Screen

public Screen(Screen screen)
Method Detail

clone

public static Screen clone(Screen screen)

isAlternate

public boolean isAlternate()
Returns whether screen alternates with predecessor screen

Returns:
true if alternate, false otherwise

getType

public java.lang.String getType()
Returns the type of the screen

Returns:
type the screen type

toString

public java.lang.String toString()
Returns a string representation of the Screen

Overrides:
toString in class java.lang.Object
Returns:
a descriptive screen

isRuntime

public abstract boolean isRuntime(Screener screener)
Returns true if testing screen relies on runtime state of system

Returns:
true if runtime

validate

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

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 abstract boolean pass(Screener screener,
                             java.lang.String domain,
                             java.lang.String objectName,
                             FilterTrace trace)
Tests the object against the screen (with optional tracing)

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

getNote

public java.lang.String getNote()

setNote

public void setNote(java.lang.String note)


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