de.smartics.exceptions.report.message
Class PlaceHolderInfo

Package class diagram package PlaceHolderInfo
java.lang.Object
  extended by de.smartics.exceptions.report.message.PlaceHolderInfo
All Implemented Interfaces:
Serializable

public class PlaceHolderInfo
     
     
extends Object
implements Serializable

Contains the information about a set of place holders. The placeholder information is specified via MessageParam annotations. The placeholder is used to create exception messages like details or todo.

See Also:
Serialized Form

Field Summary
static PlaceHolderInfo EMPTY
          The singleton to represent the immutable empty place holder info.
 
Constructor Summary
PlaceHolderInfo()
          Default constructor.
 
Method Summary
 PlaceHolderDesc getPlaceHolderDesc(PlaceHolderDescId id)
          Returns the place holder description identifier by the given id.
 PlaceHolderDesc getPlaceHolderDescOrDefault(PlaceHolderDescId id)
          Returns the place holder description identifier by the given id or the default if no explicit value is given.
 List<PlaceHolderDesc> getPlaceHolderDescs(MessageType messageType)
          Returns an iteration over the place holder descriptions in their natural order.
 boolean isEmpty()
          Checks if the place holder info is empty.
 void putPlaceHolderDesc(PlaceHolderDesc desc)
          Sets the description with its identifier to the map of place holder descriptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final PlaceHolderInfo EMPTY
The singleton to represent the immutable empty place holder info.

Constructor Detail

PlaceHolderInfo

public PlaceHolderInfo()
Default constructor.

Method Detail

getPlaceHolderDesc

public PlaceHolderDesc getPlaceHolderDesc(PlaceHolderDescId id)
Returns the place holder description identifier by the given id.

Parameters:
id - the identifier of the place holder description requested.
Returns:
the place holder description or null, if there is no place holder description for the given id.

getPlaceHolderDescOrDefault

public PlaceHolderDesc getPlaceHolderDescOrDefault(PlaceHolderDescId id)
Returns the place holder description identifier by the given id or the default if no explicit value is given.

Parameters:
id - the identifier of the place holder description requested.
Returns:
the place holder description or the default, if there is no place holder description for the given id.

getPlaceHolderDescs

public List<PlaceHolderDesc> getPlaceHolderDescs(MessageType messageType)
                                          throws NullPointerException
Returns an iteration over the place holder descriptions in their natural order.

Parameters:
messageType - the message type for which descriptors are requested.
Returns:
the descriptions in their natural order.
Throws:
NullPointerException - if messageType is null.

putPlaceHolderDesc

public void putPlaceHolderDesc(PlaceHolderDesc desc)
Sets the description with its identifier to the map of place holder descriptions. Any previously added descriptions with the same ID is replaced.

Parameters:
desc - the description to add.

isEmpty

public boolean isEmpty()
Checks if the place holder info is empty.

Returns:
true if no place holder descriptions are provided, false otherwise.


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