com.monad.homerun.filter
Class PropertyScreen

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

public class PropertyScreen
extends Screen

PropertyScreen extends Screen to describe type and instance properties. That is, the screen passes the object if: (1) it has a property matching the subject name and (2) it's property value matches the screen value.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.monad.homerun.filter.Screen
COMPONENT, FILTER, INST_PROP, LIST, RELATION, TYPE, TYPE_PROP
 
Constructor Summary
PropertyScreen()
           
PropertyScreen(boolean alternate, java.lang.String propType, java.lang.String propName, java.lang.String propValue, java.lang.String specType, int operator)
           
PropertyScreen(PropertyScreen screen)
           
 
Method Summary
 java.lang.String getPropertyName()
          Returns the name of the property
 java.lang.String getPropertyValue()
          Returns the value of the property
 int getRelation()
           
 java.lang.String getSpecType()
           
 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
 

Constructor Detail

PropertyScreen

public PropertyScreen()

PropertyScreen

public PropertyScreen(boolean alternate,
                      java.lang.String propType,
                      java.lang.String propName,
                      java.lang.String propValue,
                      java.lang.String specType,
                      int operator)

PropertyScreen

public PropertyScreen(PropertyScreen screen)
Method Detail

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

getPropertyName

public java.lang.String getPropertyName()
Returns the name of the property

Returns:
propNamse the property name

getPropertyValue

public java.lang.String getPropertyValue()
Returns the value of the property

Returns:
value the property value

getSpecType

public java.lang.String getSpecType()

getRelation

public int getRelation()

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.