stella.parameter
Class ErrorTrigger

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.AbstractTrigger
                      extended by stella.parameter.SimpleTrigger
                          extended by stella.parameter.ErrorTrigger
All Implemented Interfaces:
Cloneable, ErrorDependingParameter, Parameter, Trigger, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying

public class ErrorTrigger
extends SimpleTrigger
implements ErrorDependingParameter, Reloadable

A trigger that gets true when a certain error event is sent to the SCS.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
static String KEY_FALSE
          The class name of the error that set this trigger to false.
static String KEY_TRUE
          The class name of the error that set this trigger to true.
 
Fields inherited from class stella.parameter.SimpleTrigger
KEY_INITBOOLEAN
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface stella.ErrorDependingParameter
NAMING_EXTENSION
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
ErrorTrigger(Map prop)
          Constructs a new error trigger.
 
Method Summary
 Object getForError(ErrorEvent err)
          Sets the trigger value according to the error received.
private static boolean isInList(String check, String list)
          Checks if the given name is in a comma-separated list of names.
 void registerError(ErrorEvent err)
          Registers the error to this trigger.
 double rescanned(String key, String old, String newval)
          Makes this method public, no further changes.
 
Methods inherited from class stella.parameter.SimpleTrigger
getLastToggleTime, getTrigger, init, setTrigger
 
Methods inherited from class stella.parameter.AbstractTrigger
get, getElapsedToggleTime, isTrue, set, toggleTrigger
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, register, setName, toString
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Parameter
get, getFormatted, getName, getString, set
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

KEY_TRUE

public static final String KEY_TRUE
The class name of the error that set this trigger to true.

See Also:
Constant Field Values

KEY_FALSE

public static final String KEY_FALSE
The class name of the error that set this trigger to false.

See Also:
Constant Field Values
Constructor Detail

ErrorTrigger

public ErrorTrigger(Map prop)
Constructs a new error trigger. The initial state of the trigger is set.

Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
Makes this method public, no further changes.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class SimpleTrigger

getForError

public Object getForError(ErrorEvent err)
Sets the trigger value according to the error received. If the class name of the error matches the KEY_TRUE or the KEY_FALSE class name the trigger is set to true or false, respectively. If the error class is not known, null is returned;

Specified by:
getForError in interface ErrorDependingParameter

registerError

public void registerError(ErrorEvent err)
Registers the error to this trigger. If the class name of the error matches the KEY_TRUE or the KEY_FALSE class name the trigger is set to true or false, respectively. If the error class is not known, nothing changes.

Specified by:
registerError in interface ErrorDependingParameter

isInList

private static boolean isInList(String check,
                                String list)
Checks if the given name is in a comma-separated list of names. Returns true if an exact match is found. Is case-sensitive.

Parameters:
check - The String to find.
list - The comma-separated list of possible matches.