net.sourceforge.argval.message.impl
Class MessageStoreImpl

java.lang.Object
  extended by net.sourceforge.argval.message.impl.MessageStoreImpl
All Implemented Interfaces:
MessageStore, MessageStoreVisitorAccepter

public class MessageStoreImpl
extends Object
implements MessageStore, MessageStoreVisitorAccepter


Field Summary
static String PRIORITY_DEBUG
           
static String PRIORITY_ERROR
           
static String PRIORITY_FATAL
           
static String PRIORITY_INFO
           
static String PRIORITY_WARN
           
 
Constructor Summary
MessageStoreImpl()
          Create a default MessageStoreImpl.
MessageStoreImpl(List<String> priorityList)
           
 
Method Summary
 void accept(MessageStoreVisitor visitor)
          Accept the MessageStoreVisitor.
 void addDebug(String message)
           
 void addDebug(String message, Throwable cause)
           
 void addError(String message)
           
 void addError(String message, Throwable cause)
           
 void addFatal(String message)
           
 void addFatal(String message, Throwable cause)
           
 void addInfo(String message)
           
 void addInfo(String message, Throwable cause)
           
 void addMessage(String priority, String message)
           
 void addMessage(String priority, String message, Throwable cause)
           
 void addWarn(String message)
           
 void addWarn(String message, Throwable cause)
           
 List<MessageItem> getMessageItemList()
           
 List<MessageItem> getMessageItemList(String priority)
           
 List<String> getOrderedPriorities()
           
 Set<String> getPriorities()
           
 boolean isDebugAdded()
           
 boolean isEmpty()
           
 boolean isErrorAdded()
           
 boolean isFatalAdded()
           
 boolean isInfoAdded()
           
 boolean isWarnAdded()
           
 String toString()
           
 StringBuffer toStringBuffer(StringBuffer strBuf, String priority)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PRIORITY_FATAL

public static final String PRIORITY_FATAL
See Also:
Constant Field Values

PRIORITY_ERROR

public static final String PRIORITY_ERROR
See Also:
Constant Field Values

PRIORITY_WARN

public static final String PRIORITY_WARN
See Also:
Constant Field Values

PRIORITY_INFO

public static final String PRIORITY_INFO
See Also:
Constant Field Values

PRIORITY_DEBUG

public static final String PRIORITY_DEBUG
See Also:
Constant Field Values
Constructor Detail

MessageStoreImpl

public MessageStoreImpl(List<String> priorityList)

MessageStoreImpl

public MessageStoreImpl()
Create a default MessageStoreImpl. It will have the priorities of the initialPriorityList.

Method Detail

getPriorities

public Set<String> getPriorities()

getOrderedPriorities

public List<String> getOrderedPriorities()

getMessageItemList

public List<MessageItem> getMessageItemList(String priority)

getMessageItemList

public List<MessageItem> getMessageItemList()

addMessage

public void addMessage(String priority,
                       String message)

addMessage

public void addMessage(String priority,
                       String message,
                       Throwable cause)

addFatal

public void addFatal(String message)
Specified by:
addFatal in interface MessageStore

addFatal

public void addFatal(String message,
                     Throwable cause)
Specified by:
addFatal in interface MessageStore

addError

public void addError(String message)
Specified by:
addError in interface MessageStore

addError

public void addError(String message,
                     Throwable cause)
Specified by:
addError in interface MessageStore

addWarn

public void addWarn(String message)
Specified by:
addWarn in interface MessageStore

addWarn

public void addWarn(String message,
                    Throwable cause)
Specified by:
addWarn in interface MessageStore

addInfo

public void addInfo(String message)
Specified by:
addInfo in interface MessageStore

addInfo

public void addInfo(String message,
                    Throwable cause)
Specified by:
addInfo in interface MessageStore

addDebug

public void addDebug(String message)
Specified by:
addDebug in interface MessageStore

addDebug

public void addDebug(String message,
                     Throwable cause)
Specified by:
addDebug in interface MessageStore

isFatalAdded

public boolean isFatalAdded()
Specified by:
isFatalAdded in interface MessageStore

isErrorAdded

public boolean isErrorAdded()
Specified by:
isErrorAdded in interface MessageStore

isWarnAdded

public boolean isWarnAdded()
Specified by:
isWarnAdded in interface MessageStore

isInfoAdded

public boolean isInfoAdded()
Specified by:
isInfoAdded in interface MessageStore

isDebugAdded

public boolean isDebugAdded()
Specified by:
isDebugAdded in interface MessageStore

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface MessageStore

accept

public void accept(MessageStoreVisitor visitor)
Accept the MessageStoreVisitor. Let it first visit the MessageStore instance and then all the stored MessageItem instances.

Specified by:
accept in interface MessageStoreVisitorAccepter

toStringBuffer

public StringBuffer toStringBuffer(StringBuffer strBuf,
                                   String priority)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 Verhagen Software. All Rights Reserved.