FileDocCategorySizeDatePackage
Result.javaAPI DocGlassfish v2 API7615Thu May 17 17:53:12 BST 2007com.sun.enterprise.config.serverbeans.validation

Result

public class Result extends Object
NOT THREAD SAFE (mutable variables not protected)

Fields Summary
public static final int
PASSED
public static final int
FAILED
public static final int
WARNING
public static final int
NOT_APPLICABLE
public static final int
NOT_RUN
public static final int
NOT_IMPLEMENTED
private int
status
private String
componentName
private String
operationPrintName
private String
assertion
private String
testName
private final Vector
errorDetails
private final Vector
goodDetails
private final Vector
warningDetails
private final Vector
naDetails
Constructors Summary
public Result()
Result Constructor


           
     
    
Methods Summary
public voidaddErrorDetails(java.lang.String s)
Fill in Error details

param
s error detail string

	errorDetails.addElement(s);
    
public voidaddErrorDetails(int index, java.lang.String s)
Fill in Error details

param
s error detail string

	errorDetails.add(index, s);
    
public voidaddGoodDetails(java.lang.String s)
Fill in Good details

param
s good detail string

	goodDetails.addElement(s);
    
public voidaddNaDetails(java.lang.String s)
Set Not Applicable details

param
s not applicable details

	naDetails.addElement(s);
    
public voidaddWarningDetails(java.lang.String s)
Fill in Warning details

param
s warning detail string

	warningDetails.addElement(s);
    
public voidfailed(java.lang.String detail)
Store Failed info

param
detail Details of failed test

	setStatus(FAILED);
	addErrorDetails(detail);
    
public java.lang.StringgetAssertion()
Retrieve assertion

return
String assertion string

	return assertion;
    
public java.lang.StringgetComponentName()
Retrieve component/module name

return
String component/module name

	return componentName;
    
public java.util.VectorgetErrorDetails()
Retrieve Error details

return
Vector error details

	return errorDetails;
    
public java.lang.StringgetErrorDetailsAsString()
Retrieve Error details

return
Vector error details

        String str = "";
	for(int i=0; i<errorDetails.size(); i++)
        {
            if(i>0)
                str += "\n";
            str += errorDetails.get(i);
        }
        //add rejection string at the end
        if(errorDetails.size()>0 && 
           operationPrintName!=null &&
           operationPrintName.length()>0)
        {
            str += "\n";
            str += StringManagerHelper.getLocalStringsManager().getLocalString(
                      "operation_reject_msg","{0} has been rejected.",
                      new Object[] {operationPrintName});
                    
        }
        return str;
    
public java.util.VectorgetGoodDetails()
Retrieve Good details

return
Vector good details

	return goodDetails;
    
public java.util.VectorgetNaDetails()
Retrieve Not Applicable details

return
Vector not applicable details

	return naDetails;
    
public java.lang.StringgetOperationPrintName()
Retrieve config operation name

return
String component/module name

	return operationPrintName;
    
public intgetStatus()
Retrieve test result status

return
int test result status

	return status;
    
public java.lang.StringgetTestName()
Retrieve test name

return
String test name

	return testName;
    
public java.util.VectorgetWarningDetails()
Retrieve Warning details

return
Vector warning details

	return warningDetails;
    
public voidnotApplicable(java.lang.String detail)
Store Not Applicable info

param
detail Details of not applicable test

	setStatus(NOT_APPLICABLE);
	addNaDetails(detail);
    
public voidpassed(java.lang.String detail)
Store passed info

param
detail Details of passed test

	setStatus(PASSED);
	addGoodDetails(detail);
    
public voidsetAssertion(java.lang.String s)
Set assertion

param
s assertion string

	assertion = s;
    
public voidsetComponentName(java.lang.String s)
Set component/module name

param
s component/module name

	componentName = s;
    
public voidsetOperationPrintName(java.lang.String s)
Set component/module name

param
s component/module name

	operationPrintName = s;
    
public voidsetStatus(int s)
Set test result status

param
s test result status

	status = s;
    
public voidsetTestName(java.lang.String s)
Set test name

param
s test name

	testName = s;
    
public voidwarning(java.lang.String detail)
Store warning info

param
detail Details of warning test

	setStatus(WARNING);
	addWarningDetails(detail);