FileDocCategorySizeDatePackage
ReportHelper.javaAPI DocGlassfish v2 API3715Fri May 04 22:24:38 BST 2007com.sun.enterprise.config.serverbeans.validation

ReportHelper

public abstract class ReportHelper extends Object
helper class with convenience util methods for reporting errors

Fields Summary
static final String
ATTR_ERROR_MSG_PREFIX
static final String
ERROR_MSG_PREFIX
Constructors Summary
Methods Summary
private static java.lang.StringgetAttributeNameMsgPrefix(ValidationContext valCtx)

        if(valCtx.attrName==null)
            return "";
        return valCtx.smh.getLocalString("common.AttributeErrorMsgPrefix",
              "Attribute {0}: ", new Object[] {valCtx.attrName});
    
public static voidreportAttributeError(ValidationContext valCtx, java.lang.String msgNameSuffix, java.lang.String defaultMsg, java.lang.Object[] values)
reports attribute validation error

                 
         
                 
    
        valCtx.result.failed( /*getAttributeNameMsgPrefix(valCtx) + */
               valCtx.smh.getLocalString(ATTR_ERROR_MSG_PREFIX + msgNameSuffix, defaultMsg, values) );
    
public static voidreportValidationError(ValidationContext valCtx, java.lang.String msgNameSuffix, java.lang.String defaultMsg, java.lang.Object[] values)
reports validation error

        valCtx.result.failed( 
              valCtx.smh.getLocalString(ERROR_MSG_PREFIX + msgNameSuffix, 
              defaultMsg, values) );