org.fosstrak.llrp.commander.check
Class CheckItem

java.lang.Object
  extended by org.fosstrak.llrp.commander.check.CheckItem
Direct Known Subclasses:
CheckEclipseProject, CheckRepository, HealthCheck

public abstract class CheckItem
extends java.lang.Object

Common interface that helps to run "check-processes" (processes that shall ensure the integrity of the LLRP commander and its folders/files).

Author:
zhanghao, sawielan

Field Summary
static int CATEGORY_ERROR
           
static int CATEGORY_FIX
           
static int CATEGORY_INFO
           
static int CATEGORY_WARN
           
 
Constructor Summary
CheckItem()
           
 
Method Summary
 void addReportItem(java.util.ArrayList<java.lang.String> aItemList)
          adds a list of error reports to the current error list.
 void addReportItem(java.lang.String aItem, int aCategory)
          add a specific error report.
 void clearAllReport()
          clear out all the reports collected from previous health checks.
abstract  void fix()
          invoke the repair functionality on the repair item.
 java.util.ArrayList<java.lang.String> getReport()
           
abstract  boolean validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATEGORY_ERROR

public static final int CATEGORY_ERROR
See Also:
Constant Field Values

CATEGORY_FIX

public static final int CATEGORY_FIX
See Also:
Constant Field Values

CATEGORY_WARN

public static final int CATEGORY_WARN
See Also:
Constant Field Values

CATEGORY_INFO

public static final int CATEGORY_INFO
See Also:
Constant Field Values
Constructor Detail

CheckItem

public CheckItem()
Method Detail

addReportItem

public void addReportItem(java.lang.String aItem,
                          int aCategory)
add a specific error report.

Parameters:
aItem - the error report string.
aCategory - a category that describes the error.

addReportItem

public void addReportItem(java.util.ArrayList<java.lang.String> aItemList)
adds a list of error reports to the current error list.

Parameters:
aItemList - new errors to add.

clearAllReport

public void clearAllReport()
clear out all the reports collected from previous health checks.


getReport

public java.util.ArrayList<java.lang.String> getReport()
Returns:
a list of error messages (if the check went wrong) that describe the errors.

validate

public abstract boolean validate()
Returns:
true if the check went ok, false otherwise.

fix

public abstract void fix()
invoke the repair functionality on the repair item.



Copyright © 2009. All Rights Reserved.