com.philemonworks.selfdiagnose
Class PatternMatchingTask

java.lang.Object
  extended by com.philemonworks.selfdiagnose.DiagnosticTask
      extended by com.philemonworks.selfdiagnose.PatternMatchingTask
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CheckProperty, CheckURLReachable, CheckValueMatches

public abstract class PatternMatchingTask
extends DiagnosticTask

PatternMatchingTask is an abstract class that provides the functionality of matching a String value against a pattern (regular expression).

Author:
ernestmicklei
See Also:
Serialized Form

Field Summary
protected static String PARAMETER_PATTERN
           
protected  String pattern
           
 
Fields inherited from class com.philemonworks.selfdiagnose.DiagnosticTask
comment, PARAMETER_COMMENT, PARAMETER_REPORT, PARAMETER_VARIABLE, reportResults, requestor, variableName
 
Constructor Summary
PatternMatchingTask()
           
 
Method Summary
protected  void checkValueAgainstPattern(DiagnosticTaskResult result, String receiver, String accessKind, String propertyName, Object value)
           
 String getPattern()
           
 void initializeFromAttributes(Attributes attributes)
          This method is sent from the SelfDiagnoseHandler when a configuration is being processed.
 void setPattern(String string)
           
 
Methods inherited from class com.philemonworks.selfdiagnose.DiagnosticTask
createResult, getComment, getDefaultReportTemplate, getDescription, getRequestor, getTaskName, getVariableName, hasComment, isReportResults, run, run, run, setComment, setReportResults, setRequestor, setUp, setVariableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAMETER_PATTERN

protected static final String PARAMETER_PATTERN
See Also:
Constant Field Values

pattern

protected String pattern
Constructor Detail

PatternMatchingTask

public PatternMatchingTask()
Method Detail

initializeFromAttributes

public void initializeFromAttributes(Attributes attributes)
Description copied from class: DiagnosticTask
This method is sent from the SelfDiagnoseHandler when a configuration is being processed. Use the passed attributes to initialize the receiver. If a variable parameter is passed then store it.

Overrides:
initializeFromAttributes in class DiagnosticTask
Parameters:
attributes - org.xml.sax.Attributes

getPattern

public String getPattern()
Returns:

setPattern

public void setPattern(String string)
Parameters:
string -

checkValueAgainstPattern

protected void checkValueAgainstPattern(DiagnosticTaskResult result,
                                        String receiver,
                                        String accessKind,
                                        String propertyName,
                                        Object value)


Copyright © 2012. All Rights Reserved.