Package org.duracloud.common.error
Class DuraCloudExceptionCore
- java.lang.Object
-
- org.duracloud.common.error.DuraCloudExceptionCore
-
- All Implemented Interfaces:
Serializable,MessageFormattable
public class DuraCloudExceptionCore extends Object implements MessageFormattable, Serializable
This class is the core utility for supporting DuraCloud exceptions and user-friendly formatted messages.- Author:
- Andrew Woods Date: Nov 20, 2009
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DuraCloudExceptionCore()DuraCloudExceptionCore(String key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getArgs()This method returns the args that act as variables in the message.StringgetFormattedMessage()This method returns the message which includes the arg elements.StringgetKey()This method returns the message key used as an index in the ResourceBundle.voidsetArgs(String... args)This method sets the arg variables that are placed in the message.
-
-
-
Constructor Detail
-
DuraCloudExceptionCore
public DuraCloudExceptionCore()
-
DuraCloudExceptionCore
public DuraCloudExceptionCore(String key)
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:MessageFormattableThis method returns the message key used as an index in the ResourceBundle.- Specified by:
getKeyin interfaceMessageFormattable- Returns:
- key
-
getArgs
public String[] getArgs()
Description copied from interface:MessageFormattableThis method returns the args that act as variables in the message.- Specified by:
getArgsin interfaceMessageFormattable- Returns:
- list of message elements
-
setArgs
public void setArgs(String... args)
Description copied from interface:MessageFormattableThis method sets the arg variables that are placed in the message.- Specified by:
setArgsin interfaceMessageFormattable- Parameters:
args- list of elements to be placed in message
-
getFormattedMessage
public String getFormattedMessage()
Description copied from interface:MessageFormattableThis method returns the message which includes the arg elements.- Specified by:
getFormattedMessagein interfaceMessageFormattable- Returns:
- formatted message
-
-