Class UnknownPropertyNameException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.sun.identity.common.configuration.UnknownPropertyNameException
-
- All Implemented Interfaces:
L10NMessage,Serializable
public class UnknownPropertyNameException extends Exception implements L10NMessage
Unknown property name exception.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnknownPropertyNameException(String message)Constructs aUnknownPropertyNameExceptionwith a detailed message.UnknownPropertyNameException(String errorCode, Object[] args)This constructor is used to pass the localized error message At this level, the locale of the caller is not known and it is not possible to throw localized error message at this level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetErrorCode()Returns error code associated with this error message.StringgetL10NMessage(Locale locale)Use this method to get localized error message directly.StringgetMessage()Use this method to get error message in default ENGLISH locale.Object[]getMessageArgs()Returns arguments for formatting this error message.StringgetResourceBundleName()Returns resource bundle name associated with this error message.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
UnknownPropertyNameException
public UnknownPropertyNameException(String errorCode, Object[] args)
This constructor is used to pass the localized error message At this level, the locale of the caller is not known and it is not possible to throw localized error message at this level. Instead this constructor provides Resource Bundle name and errorCode for correctly locating the error messsage. The default getMessage() will always return English messages only. This is in consistent with current JRE- Parameters:
errorCode- Key to resource bundle. You can useString localizedStr = rb.getString(errorCode)args- arguments to message. If it is not present pass the as null be displayed according to user's preferred locale.
-
UnknownPropertyNameException
public UnknownPropertyNameException(String message)
Constructs aUnknownPropertyNameExceptionwith a detailed message.- Parameters:
message- Exception Message. Detailed message for this exception.
-
-
Method Detail
-
getResourceBundleName
public String getResourceBundleName()
Returns resource bundle name associated with this error message.- Specified by:
getResourceBundleNamein interfaceL10NMessage- Returns:
- resource bundle name associated with this error message.
-
getErrorCode
public String getErrorCode()
Returns error code associated with this error message.- Specified by:
getErrorCodein interfaceL10NMessage- Returns:
- error code associated with this error message.
-
getMessageArgs
public Object[] getMessageArgs()
Returns arguments for formatting this error message. You need to use MessageFormat class to format the message It can be null.- Specified by:
getMessageArgsin interfaceL10NMessage- Returns:
- arguments for formatting this error message.
-
getMessage
public String getMessage()
Description copied from interface:L10NMessageUse this method to get error message in default ENGLISH locale.- Specified by:
getMessagein interfaceL10NMessage- Overrides:
getMessagein classThrowable- Returns:
- gets error message
-
getL10NMessage
public String getL10NMessage(Locale locale)
Description copied from interface:L10NMessageUse this method to get localized error message directly.- Specified by:
getL10NMessagein interfaceL10NMessage- Parameters:
locale- Locale of the error message.- Returns:
- localized error message.
-
-