de.smartics.exceptions.i18n.message
Enum MessageTemplate

Package class diagram package MessageTemplate
java.lang.Object
  extended by java.lang.Enum<MessageTemplate>
      extended by de.smartics.exceptions.i18n.message.MessageTemplate
All Implemented Interfaces:
Serializable, Comparable< MessageTemplate>

public enum MessageTemplate
     
     
extends Enum< MessageTemplate>

Defines the valid identifiers for message templates.

Templates are selected to control the rendering of the exception information. Currently this mechanism is rather crude since the template selects an implementation during the rendering. In future version a real template should be supported. That template will contain text that is adorned with placeholders that will be replaced by concrete messages.

Author:
Robert Reiner

Enum Constant Summary
MULTI_LINE_ALL
          Everything is rendered in a multi-line text.
SINGLE_LINE_STANDARD
          The message's title, summary, and details are rendered in one line.
SINGLE_LINE_SUMMARY_ONLY
          The message summary is rendered in one line.
 
Method Summary
 String getTemplateId()
          Returns the identifier of the template.
static MessageTemplate valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MessageTemplate[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SINGLE_LINE_STANDARD

public static final MessageTemplate SINGLE_LINE_STANDARD
The message's title, summary, and details are rendered in one line.


SINGLE_LINE_SUMMARY_ONLY

public static final MessageTemplate SINGLE_LINE_SUMMARY_ONLY
The message summary is rendered in one line.


MULTI_LINE_ALL

public static final MessageTemplate MULTI_LINE_ALL
Everything is rendered in a multi-line text.

Method Detail

values

public static MessageTemplate[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MessageTemplate c : MessageTemplate.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MessageTemplate valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getTemplateId

public String getTemplateId()
Returns the identifier of the template.

Returns:
the identifier of the template.


Copyright © 2007-$2011 Kronseder & Reiner GmbH - smartics. All Rights Reserved.