com.gentics.contentnode.rest.model.response
Class Message

java.lang.Object
  extended by com.gentics.contentnode.rest.model.response.Message

public class Message
extends java.lang.Object

Represents a message that can be displayed in the MessageLine.

Author:
floriangutmann

Nested Class Summary
static class Message.Type
          Severity for a message
 
Constructor Summary
Message()
          Default constructor needed for JAXB
Message(Message.Type type, java.lang.String message)
          Simple constructor for a message.
Message(Message.Type type, java.lang.String message, java.lang.String image, long timestamp)
          Constructor for a Message with all parameters.
 
Method Summary
 java.lang.Integer getId()
          Get the message id
 java.lang.String getImage()
           
 java.lang.String getMessage()
           
 User getSender()
          Get the sender of the message
 long getTimestamp()
           
 Message.Type getType()
           
 void setId(java.lang.Integer id)
          Set the message id
 void setImage(java.lang.String image)
           
 void setMessage(java.lang.String message)
           
 void setSender(User sender)
          Set the sender of the message
 void setTimestamp(long timestamp)
           
 void setType(Message.Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()
Default constructor needed for JAXB


Message

public Message(Message.Type type,
               java.lang.String message,
               java.lang.String image,
               long timestamp)
Constructor for a Message with all parameters.

Parameters:
type - Type of the message
message - Text of the message
image - URL of the image that should be displayed aside the message

Message

public Message(Message.Type type,
               java.lang.String message)
Simple constructor for a message. The timestamp of the message will be set to the actual time. Image of the message will be null.

Parameters:
severity -
message -
Method Detail

getMessage

public java.lang.String getMessage()

setMessage

public void setMessage(java.lang.String message)

getType

public Message.Type getType()

setType

public void setType(Message.Type type)

getTimestamp

public long getTimestamp()

setTimestamp

public void setTimestamp(long timestamp)

getImage

public java.lang.String getImage()

setImage

public void setImage(java.lang.String image)

getSender

public User getSender()
Get the sender of the message

Returns:
message sender

setSender

public void setSender(User sender)
Set the sender of the message

Parameters:
sender - message sender

setId

public void setId(java.lang.Integer id)
Set the message id

Parameters:
id - id of the message

getId

public java.lang.Integer getId()
Get the message id

Returns:
id of the message


Copyright © 2014 Gentics Software GmbH. All Rights Reserved.