nl.knowlogy.validation
Class MessageImpl

java.lang.Object
  extended by nl.knowlogy.validation.MessageImpl
All Implemented Interfaces:
Message

public class MessageImpl
extends Object
implements Message


Constructor Summary
MessageImpl(MessageType messageType, Object objectPertainingMessage, String propertyName, String messageCode)
           
MessageImpl(MessageType messageType, Object objectPertainingMessage, String propertyName, String messageCode, Object[] errorArgs, String message)
           
MessageImpl(MessageType messageType, Object objectPertainingMessage, String propertyName, String messageCode, String message)
           
 
Method Summary
 String getMessage()
           Returns the message.
 Object[] getMessageArgs()
           Returns the messssage Arguments which contain information about the occured event.
 String getMessageCode()
           Returns the messagecode for the message.
 MessageType getMessageType()
           Returns type of the message.
 String getPropertyName()
           Returns the name of the property to which the message is related.
 Object getRelatedObject()
           Returns the object to which the message is related.
 void setMessage(String message)
           
 String toString()
           Returns the string representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageImpl

public MessageImpl(MessageType messageType,
                   Object objectPertainingMessage,
                   String propertyName,
                   String messageCode)

MessageImpl

public MessageImpl(MessageType messageType,
                   Object objectPertainingMessage,
                   String propertyName,
                   String messageCode,
                   String message)

MessageImpl

public MessageImpl(MessageType messageType,
                   Object objectPertainingMessage,
                   String propertyName,
                   String messageCode,
                   Object[] errorArgs,
                   String message)
Method Detail

getRelatedObject

public Object getRelatedObject()
Description copied from interface: Message

Returns the object to which the message is related.

Specified by:
getRelatedObject in interface Message
Returns:
object to which the message is related.

getMessage

public String getMessage()
Description copied from interface: Message

Returns the message.

Specified by:
getMessage in interface Message
Returns:
Returns the message.

setMessage

public void setMessage(String message)
Specified by:
setMessage in interface Message

getPropertyName

public String getPropertyName()
Description copied from interface: Message

Returns the name of the property to which the message is related. Null is returned if the message is not related to a specific property.

Specified by:
getPropertyName in interface Message
Returns:
Returns the propertyName.

getMessageCode

public String getMessageCode()
Description copied from interface: Message

Returns the messagecode for the message.

Specified by:
getMessageCode in interface Message
Returns:
the messagecode.

getMessageArgs

public Object[] getMessageArgs()
Description copied from interface: Message

Returns the messssage Arguments which contain information about the occured event. Which arguments are returned can depend on the messagecode.

Specified by:
getMessageArgs in interface Message
Returns:
Returns the messageArgs.

toString

public String toString()
Description copied from interface: Message

Returns the string representation.

Specified by:
toString in interface Message
Overrides:
toString in class Object
Returns:
the string representation.

getMessageType

public MessageType getMessageType()
Description copied from interface: Message

Returns type of the message.

Specified by:
getMessageType in interface Message
Returns:
type of the message
See Also:
MessageType


Copyright © 2007. All Rights Reserved.