com.philemonworks.selfdiagnose.check
Class CheckPropertyValuesAreJavaTypes

java.lang.Object
  extended by com.philemonworks.selfdiagnose.DiagnosticTask
      extended by com.philemonworks.selfdiagnose.check.CheckPropertyValuesAreJavaTypes
All Implemented Interfaces:
Serializable

public class CheckPropertyValuesAreJavaTypes
extends DiagnosticTask

CheckPropertyValuesAreJavaTypes is a DiagnosticTask that verifies that each Java type name is loadable. The pattern parameter is used to filter only those keys for which the value represent a Java type.

<checkpropertyvaluesarejavatypes name="some.properties" filter=".*[.]class" />
 

Author:
E.M.Micklei
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.philemonworks.selfdiagnose.DiagnosticTask
comment, PARAMETER_COMMENT, PARAMETER_REPORT, PARAMETER_VARIABLE, reportResults, requestor, variableName
 
Constructor Summary
CheckPropertyValuesAreJavaTypes()
           
 
Method Summary
 DiagnosticTaskResult createResult()
          This method is redefined such that the run method will get a composed result for its argument.
 String getDescription()
          Return the description of this task.
 String getFilter()
          Get the regular expression pattern.
 String getResourceName()
          Get the name of the resource that contains the properties.
 void initializeFromAttributes(Attributes attributes)
          This method is sent from the SelfDiagnoseHandler when a configuration is being processed.
 void run(ExecutionContext ctx, DiagnosticTaskResult result)
          Run the task.
 void setFilter(String string)
          Set the regular expression pattern.
 void setResourceName(String string)
          Set the name of the resource that contains the properties.
 void setUp(ExecutionContext ctx)
          Override this method to verify that task parameters are initialized/set correctly.
 
Methods inherited from class com.philemonworks.selfdiagnose.DiagnosticTask
getComment, getDefaultReportTemplate, getRequestor, getTaskName, getVariableName, hasComment, isReportResults, run, run, setComment, setReportResults, setRequestor, setVariableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckPropertyValuesAreJavaTypes

public CheckPropertyValuesAreJavaTypes()
Method Detail

createResult

public DiagnosticTaskResult createResult()
This method is redefined such that the run method will get a composed result for its argument.

Overrides:
createResult in class DiagnosticTask
Returns:
CompositeDiagnosticTaskResult

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

getDescription

public String getDescription()
Return the description of this task.

Specified by:
getDescription in class DiagnosticTask
Returns:
String the description

setUp

public void setUp(ExecutionContext ctx)
           throws DiagnoseException
Description copied from class: DiagnosticTask
Override this method to verify that task parameters are initialized/set correctly.

Overrides:
setUp in class DiagnosticTask
Parameters:
ctx - ExecutionContext
Throws:
DiagnoseException

run

public void run(ExecutionContext ctx,
                DiagnosticTaskResult result)
         throws DiagnoseException
Description copied from class: DiagnosticTask
Run the task. If an error is detected then raise a DiagnoseException. Otherwise use the result object to the report any messages when a run is completed.

Specified by:
run in class DiagnosticTask
Parameters:
ctx - ExecutionContext
result - DiagnosticTaskResult
Throws:
DiagnoseException

getFilter

public String getFilter()
Get the regular expression pattern.

Returns:
String

getResourceName

public String getResourceName()
Get the name of the resource that contains the properties.

Returns:
String name of resource

setFilter

public void setFilter(String string)
Set the regular expression pattern.

Parameters:
string -

setResourceName

public void setResourceName(String string)
Set the name of the resource that contains the properties.

Parameters:
string -


Copyright © 2012. All Rights Reserved.