org.kuali.rice.krad.messages
Class Message

java.lang.Object
  extended by org.kuali.rice.krad.bo.BusinessObjectBase
      extended by org.kuali.rice.krad.bo.PersistableBusinessObjectBase
          extended by org.kuali.rice.krad.messages.Message
All Implemented Interfaces:
Serializable, org.apache.ojb.broker.PersistenceBrokerAware, GloballyUnique, Versioned, ModelObjectBasic, BusinessObject, PersistableBusinessObject

@Entity
public class Message
extends PersistableBusinessObjectBase

Holds the text and metadata for a message that will be given by the system, including validation messages, UI text (labels, instructions), and other text that has been externalized from the system

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
extension, newCollectionRecord, objectId, versionNumber
 
Constructor Summary
Message()
           
 
Method Summary
 String getComponentCode()
          A code within the namespace that identifies a component or group, used for further grouping of messages within the namespace
 String getDescription()
          A description for the message
 String getKey()
          A key that uniquely identifies the message within the namespace and component
 String getLocale()
          Locale code the message is represented for, used for supporting messages in different languages
 String getNamespaceCode()
          Namespace code (often an application or module code) that message is associated with, used for grouping messages
 String getText()
          Text value for the message
 void setComponentCode(String componentCode)
          Setter for the component code the message should be associated with
 void setDescription(String description)
          Setter for the message description
 void setKey(String key)
          Setter for the message key
 void setLocale(String locale)
          Setter for the message locale code
 void setNamespaceCode(String namespaceCode)
          Setter for the namespace code the message should be associated with
 void setText(String text)
          Setter for the message text
 String toString()
          Generate toString using message key fields
 
Methods inherited from class org.kuali.rice.krad.bo.PersistableBusinessObjectBase
afterDelete, afterInsert, afterLookup, afterUpdate, beforeDelete, beforeInsert, beforeUpdate, buildListOfDeletionAwareLists, getExtension, getLegacyDataAdapter, getObjectId, getVersionNumber, isNewCollectionRecord, linkEditableUserFields, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate, refresh, refreshNonUpdateableReferences, refreshReferenceObject, setExtension, setNewCollectionRecord, setObjectId, setVersionNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Message

public Message()
Method Detail

getNamespaceCode

public String getNamespaceCode()
Namespace code (often an application or module code) that message is associated with, used for grouping messages

Returns:
String namespace code

setNamespaceCode

public void setNamespaceCode(String namespaceCode)
Setter for the namespace code the message should be associated with

Parameters:
namespaceCode -

getComponentCode

public String getComponentCode()
A code within the namespace that identifies a component or group, used for further grouping of messages within the namespace

Examples here could be a bean id, the class name of an object, or any application/module defined code

Returns:
String representing a component code

setComponentCode

public void setComponentCode(String componentCode)
Setter for the component code the message should be associated with

Parameters:
componentCode -

getKey

public String getKey()
A key that uniquely identifies the message within the namespace and component

Within the UIF, this is generally used to indicate the property path the message is associated with (for example: "control.label"). For validation messages this is generally a combination that identifies the type of validation message and the validation performed (for example: "error.account.missing")

Returns:
String message key

setKey

public void setKey(String key)
Setter for the message key

Parameters:
key -

getLocale

public String getLocale()
Locale code the message is represented for, used for supporting messages in different languages

Returns:
message locale code

setLocale

public void setLocale(String locale)
Setter for the message locale code

Parameters:
locale -

getDescription

public String getDescription()
A description for the message

Not used by the framework, here for purposes of editing of messages and providing a description of the message to users

Returns:
String message description

setDescription

public void setDescription(String description)
Setter for the message description

Parameters:
description -

getText

public String getText()
Text value for the message

This holds the actual text for the message which is what will be displayed. Depending on how the message is being used it might contain parameters or other special syntax

Returns:
String text for the message

setText

public void setText(String text)
Setter for the message text

Parameters:
text -

toString

public final String toString()
Generate toString using message key fields

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class BusinessObjectBase
Returns:
String representing the message object


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.