Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.policy.validation.impl
Class ValidationError

java.lang.Object
  extended by oracle.wsm.policy.validation.impl.ValidationError

All Implemented Interfaces:
Serializable, IValidationError

public class ValidationError
extends Object
implements IValidationError
See Also:
Serialized Form

Nested Class Summary

 

Nested classes/interfaces inherited from interface oracle.wsm.policy.validation.IValidationError
IValidationError.VALIDATION_MSG_LEVEL_ENUM

 

Field Summary

 

Fields inherited from interface oracle.wsm.policy.validation.IValidationError
GENERIC_ERROR_CODE, VALIDATION_MSG_LEVEL_ERROR, VALIDATION_MSG_LEVEL_WARNING

 

Constructor Summary
ValidationError(String errorCode)
          Generate Validation Error with only error code.
ValidationError(String errorCode, String errorMessage)
          Generate Validation Error with error code and error message.
ValidationError(String errorCode, String errorMessage, String errorContext)
          Generate Validation Error with error code, error message and error context.
ValidationError(String errorCode, String errorMessage, String errorContext, IValidationError.VALIDATION_MSG_LEVEL_ENUM level)
          Generate Validation Error with error code, error message, error context and validation level.
ValidationError(String errorCode, String errorMessage, String errorContext, Object[] errorMsgArgs)
           
ValidationError(String errorCode, String errorMessage, String errorContext, String rbBundle)
          Generate Validation Error with error code, error message, error context and resource bundle.

 

Method Summary
 String getErrorCode()
          return error code for this error Error Code is used for purposes of internationalization of error messages.
 String getErrorContext()
          Return the error context.
 IValidationError.VALIDATION_MSG_LEVEL_ENUM getErrorLevel()
          Return the level of the Error Message - supported levels are ERROR and WARNING
 String getErrorMessage()
          Get the error message.
 String getErrorMessage(Locale locale)
          Get the localized error message.
 ResourceBundle getResourceBundle(Locale locale)
          Get Resource Bundle Pass null to get the default resource bundle.
 int hashCode()
           
 void setErrorCode(String code)
          Set error code for this error Error Code is used for purposes of internationalization of error messages.
 void setErrorMessage(String message)
          Set the Validation Error Message.
 void setResourceBundle(String rbBundle)
          Set Resource Bundle
 String toString()
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait

 

Constructor Detail

ValidationError

public ValidationError(String errorCode)
Generate Validation Error with only error code. Note: Do not set hard coded error code. Use the one defined in ResourceBundle. The e
Parameters:
string -

ValidationError

public ValidationError(String errorCode,
                       String errorMessage)
Generate Validation Error with error code and error message. Note: Do not set hard coded error code. Use the one defined in ResourceBundle.
Parameters:
string -
string -

ValidationError

public ValidationError(String errorCode,
                       String errorMessage,
                       String errorContext,
                       String rbBundle)
Generate Validation Error with error code, error message, error context and resource bundle. Note: Do not set hard coded error code. Use the one defined in ResourceBundle. errorCode must belong to the rbBundle being passed.
Parameters:
string -
string -
string -
string - Resource Bundle name

ValidationError

public ValidationError(String errorCode,
                       String errorMessage,
                       String errorContext)
Generate Validation Error with error code, error message and error context. Note: Do not set hard coded error code. Use the one defined in ResourceBundle. errorCode
Parameters:
string - errorCode: ID defined in one of the xxxxMessageID.java file, must either belong/match the default resource bundle DEFAULT_RESOURCE_BUNDLE or resource bundle set by calling setResourceBundle() later on ValidationError created by this constructor.
string - errorMessage: optional, hard coded incase, errorCode can not be resolved to a localized message.
string -

ValidationError

public ValidationError(String errorCode,
                       String errorMessage,
                       String errorContext,
                       IValidationError.VALIDATION_MSG_LEVEL_ENUM level)
Generate Validation Error with error code, error message, error context and validation level. Note: Do not set hard coded error code. Use the one defined in ResourceBundle. errorCode must either belong/match the default resource bundle DEFAULT_RESOURCE_BUNDLE or resource bundle set by calling setResourceBundle() later on ValidationError created by this constructor.
Parameters:
string - errorCode: ID defined in one of the xxxxMessageID.java file, must either belong/match the default resource bundle DEFAULT_RESOURCE_BUNDLE or resource bundle set by calling setResourceBundle() later on ValidationError created by this constructor.
string - errorMessage, optional, hard coded incase, errorCode can not be resolved to a localized message.
string -
VALIDATION_MSG_LEVEL_ENUM -

ValidationError

public ValidationError(String errorCode,
                       String errorMessage,
                       String errorContext,
                       Object[] errorMsgArgs)

Method Detail

getErrorCode

public String getErrorCode()
Description copied from interface: IValidationError
return error code for this error Error Code is used for purposes of internationalization of error messages. Use of Error Codes is the recommended approach.
Specified by:
getErrorCode in interface IValidationError
Returns:
Error code for this Validation error

setErrorCode

public void setErrorCode(String code)
Description copied from interface: IValidationError
Set error code for this error Error Code is used for purposes of internationalization of error messages. Use of Error Codes is the recommended approach.
Specified by:
setErrorCode in interface IValidationError

getErrorContext

public String getErrorContext()
Description copied from interface: IValidationError
Return the error context. The error context captures sufficient context information as to where the error occurred to enable, policy authors to fix the validation error
Specified by:
getErrorContext in interface IValidationError
Returns:
String representation of the context. Will return null if no error context is provided

getErrorMessage

public String getErrorMessage()
Description copied from interface: IValidationError
Get the error message.
Specified by:
getErrorMessage in interface IValidationError

getErrorMessage

public String getErrorMessage(Locale locale)
Description copied from interface: IValidationError
Get the localized error message.
Specified by:
getErrorMessage in interface IValidationError

setErrorMessage

public void setErrorMessage(String message)
Set the Validation Error Message. Note: Do not set Hard Coded Error messages.
Specified by:
setErrorMessage in interface IValidationError
Parameters:
string -

getErrorLevel

public IValidationError.VALIDATION_MSG_LEVEL_ENUM getErrorLevel()
Description copied from interface: IValidationError
Return the level of the Error Message - supported levels are ERROR and WARNING
Specified by:
getErrorLevel in interface IValidationError

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

setResourceBundle

public void setResourceBundle(String rbBundle)
Description copied from interface: IValidationError
Set Resource Bundle
Specified by:
setResourceBundle in interface IValidationError

getResourceBundle

public ResourceBundle getResourceBundle(Locale locale)
Description copied from interface: IValidationError
Get Resource Bundle Pass null to get the default resource bundle.
Specified by:
getResourceBundle in interface IValidationError

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.