TPTP 4.6.0 Platform Project
Public API Specification

org.eclipse.tptp.logging.events.cbe.impl
Class MsgDataElementImpl

java.lang.Object
  extended by org.eclipse.tptp.logging.events.cbe.impl.MsgDataElementImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, MsgDataElement

public class MsgDataElementImpl
extends java.lang.Object
implements MsgDataElement

Interface representing a MsgDataElement.

The following description is from the Common Base Event v1.0.1 specification entitled "Canonical Situation Data Format: The Common Base Event V1.0.1":

The MsgDataElement represents the data that is used to specify all of the related information that is associated with the message that this event holds.

See Also:
Serialized Form

Method Summary
 MsgCatalogToken addMsgCatalogToken(MsgCatalogToken value)
          Adds a new MsgCatalogToken to this object.
 MsgCatalogToken addMsgCatalogTokenAsString(java.lang.String value)
          Adds a new MsgCatalogToken to this object.
 void clearMsgCatalogTokens()
          Removes all msgCatalogTokens that this event is referencing
 java.lang.Object clone()
          Return a cloned (copy by value) object of this object.
 boolean equals(java.lang.Object object)
          Overrides the java.lang.Object's equals() API to determine if the parameter object is equal to this object.
 java.lang.String getMsgCatalog()
           Returns the value of the 'Msg Catalog' attribute.
 java.lang.String getMsgCatalogId()
           Returns the value of the 'Msg Catalog Id' attribute.
 java.util.List getMsgCatalogTokens()
          Returns the value of the 'Msg Catalog Tokens' containment reference list.
 java.lang.String[] getMsgCatalogTokensAsStrings()
          Returns the value of the 'Msg Catalog Tokens' attribute list.
 java.lang.String getMsgCatalogType()
           Returns the value of the 'Msg Catalog Type' attribute.
 java.lang.String getMsgId()
           Returns the value of the 'Msg Id' attribute.
 java.lang.String getMsgIdType()
           Returns the value of the 'Msg Id Type' attribute.
 java.lang.String getMsgLocale()
           Returns the value of the 'Msg Locale' attribute.
 void init()
          Resets the object's properties to their initial (e.g. null) state.
 void setMsgCatalog(java.lang.String newMsgCatalog)
          Sets the value of the ' Msg Catalog' attribute.
 void setMsgCatalogId(java.lang.String newMsgCatalogId)
          Sets the value of the ' Msg Catalog Id' attribute.
 void setMsgCatalogTokens(MsgCatalogToken[] msgCatalogTokens)
          Sets the value of the 'Msg Catalog Tokens' attribute list.
 void setMsgCatalogTokensAsStrings(java.lang.String[] msgCatalogTokens)
          Sets the value of the 'Msg Catalog Tokens' attribute list.
 void setMsgCatalogType(java.lang.String newMsgCatalogType)
          Sets the value of the ' Msg Catalog Type' attribute.
 void setMsgId(java.lang.String newMsgId)
          Sets the value of the ' Msg Id' attribute.
 void setMsgIdType(java.lang.String newMsgIdType)
          Sets the value of the ' Msg Id Type' attribute.
 void setMsgLocale(java.lang.String newMsgLocale)
          Sets the value of the ' Msg Locale' attribute.
 java.lang.String toString()
           
 void validate()
          Checks whether the contents of the instance conform to the Common Base Event specification as described in "Canonical Situation Data Format: The Common Base Event V1.0.1".
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getMsgIdType

public java.lang.String getMsgIdType()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Id Type' attribute.

Specified by:
getMsgIdType in interface MsgDataElement
Returns:
the value of the 'Msg Id Type' attribute.
See Also:
MsgDataElement.setMsgIdType(String)

setMsgIdType

public void setMsgIdType(java.lang.String newMsgIdType)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Id Type' attribute.

Specifies the meaning and format of the msgId. If the msgId conforms to or represents a standard or a well-known convention, it is named by this property. Examples are: "IBM3.4", "IBM4.4", "IBM3.1.4", "IBM3.4.1", "IBM4.4.1", and "IBM3.1.4.1".

The nonexclusive reserved keywords include:

This is an optional property. The string length for msgIdType must not exceed 32 characters.

Specified by:
setMsgIdType in interface MsgDataElement
Parameters:
newMsgIdType - the new value of the 'Msg Id Type' attribute.
See Also:
MsgDataElement.getMsgIdType()

getMsgCatalogType

public java.lang.String getMsgCatalogType()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Catalog Type' attribute.

Specified by:
getMsgCatalogType in interface MsgDataElement
Returns:
the value of the 'Msg Catalog Type' attribute.
See Also:
MsgDataElement.setMsgCatalogType(String)

setMsgCatalogType

public void setMsgCatalogType(java.lang.String newMsgCatalogType)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Catalog Type' attribute.

The msgCatalogType property specifies the meaning and format of the msgCatalog. The current nonexclusive list of reserved keywords includes:

This property is optional and it is not mutable once it is set. The string length for the msgCatalogType property must not exceed 32 characters.

Specified by:
setMsgCatalogType in interface MsgDataElement
Parameters:
newMsgCatalogType - the new value of the 'Msg Catalog Type' attribute.
See Also:
MsgDataElement.getMsgCatalogType()

getMsgCatalog

public java.lang.String getMsgCatalog()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Catalog' attribute.

Specified by:
getMsgCatalog in interface MsgDataElement
Returns:
the value of the 'Msg Catalog' attribute.
See Also:
MsgDataElement.setMsgCatalog(String)

setMsgCatalog

public void setMsgCatalog(java.lang.String newMsgCatalog)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Catalog' attribute.

The qualified name of the message catalog that contains the translated message specified by the msgCatalogId.

This is an optional property. The string length of the msgCatalog must not exceed 128 characters.

Specified by:
setMsgCatalog in interface MsgDataElement
Parameters:
newMsgCatalog - the new value of the 'Msg Catalog' attribute.
See Also:
MsgDataElement.getMsgCatalog()

getMsgCatalogId

public java.lang.String getMsgCatalogId()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Catalog Id' attribute.

Specified by:
getMsgCatalogId in interface MsgDataElement
Returns:
the value of the 'Msg Catalog Id' attribute.
See Also:
MsgDataElement.setMsgCatalogId(String)

setMsgCatalogId

public void setMsgCatalogId(java.lang.String newMsgCatalogId)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Catalog Id' attribute.

The index or the identifier for a message that is used for resolving the message text from a message catalog.

This is an optional property. The string length for this property must not exceed 64 characters.

Specified by:
setMsgCatalogId in interface MsgDataElement
Parameters:
newMsgCatalogId - the new value of the 'Msg Catalog Id' attribute.
See Also:
MsgDataElement.getMsgCatalogId()

getMsgId

public java.lang.String getMsgId()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Id' attribute.

Specified by:
getMsgId in interface MsgDataElement
Returns:
the value of the 'Msg Id' attribute.
See Also:
MsgDataElement.setMsgId(String)

setMsgId

public void setMsgId(java.lang.String newMsgId)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Id' attribute.

Specifies the message identifier of the event. This identifier should be a unique value string of alphanumeric or numeric characters. It can be as simple as a string of numeric characters that identify a message in a message catalog or a multi-part string of alphanumeric characters (for example, DBT1234E).

This is an optional property. The string length for msgId must not exceed 256 characters.

Specified by:
setMsgId in interface MsgDataElement
Parameters:
newMsgId - the new value of the 'Msg Id' attribute.
See Also:
MsgDataElement.getMsgId()

getMsgLocale

public java.lang.String getMsgLocale()
Description copied from interface: MsgDataElement

Returns the value of the 'Msg Locale' attribute.

Specified by:
getMsgLocale in interface MsgDataElement
Returns:
the value of the 'Msg Locale' attribute.
See Also:
MsgDataElement.setMsgLocale(String)

setMsgLocale

public void setMsgLocale(java.lang.String newMsgLocale)
Description copied from interface: MsgDataElement
Sets the value of the ' Msg Locale' attribute.

The locale for which this msg property is rendered. Its value is a locale code that conforms to IETF RFC 1766.

This is an optional property.

Specified by:
setMsgLocale in interface MsgDataElement
Parameters:
newMsgLocale - the new value of the 'Msg Locale' attribute.
See Also:
MsgDataElement.getMsgLocale()

getMsgCatalogTokens

public java.util.List getMsgCatalogTokens()
Description copied from interface: MsgDataElement
Returns the value of the 'Msg Catalog Tokens' containment reference list. The list contents are of type MsgCatalogToken.

An array of strings used as substitution values for resolving an internationalized message into formatted text. The order of the substitution values is implied by the implicit order of the array elements.

If there are no substitution values, then msgCatalogTokens does not need to be specified.

This is an optional property. The string length for the msgCatalogTokens property must not exceed 256 characters per token.

Specified by:
getMsgCatalogTokens in interface MsgDataElement
Returns:
the value of the 'Msg Catalog Tokens' containment reference list.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

validate

public void validate()
              throws ValidationException
Checks whether the contents of the instance conform to the Common Base Event specification as described in "Canonical Situation Data Format: The Common Base Event V1.0.1".

Specified by:
validate in interface MsgDataElement
Throws:
ValidationException - If the event instance does not conform to the Common Base Event specification.

addMsgCatalogToken

public MsgCatalogToken addMsgCatalogToken(MsgCatalogToken value)
Description copied from interface: MsgDataElement
Adds a new MsgCatalogToken to this object.

It creates a MsgCatalogToken object with the values passed as parameters and adds it to the list of extended data elements for this object.

Specified by:
addMsgCatalogToken in interface MsgDataElement
Parameters:
value - the MsgCatalogToken value.
Returns:
a reference to the message catalog token added to this object.
See Also:
MsgDataElement.addMsgCatalogToken(org.eclipse.tptp.logging.events.cbe.MsgCatalogToken)

addMsgCatalogTokenAsString

public MsgCatalogToken addMsgCatalogTokenAsString(java.lang.String value)
Description copied from interface: MsgDataElement
Adds a new MsgCatalogToken to this object.

It creates a MsgCatalogToken object with the values passed as parameters and adds it to the list of extended data elements for this object.

Specified by:
addMsgCatalogTokenAsString in interface MsgDataElement
Parameters:
value - the String value for the new message catalog token.
Returns:
a reference to the message catalog token added to this object.
See Also:
MsgDataElement.addMsgCatalogTokenAsString(String)

clearMsgCatalogTokens

public void clearMsgCatalogTokens()
Removes all msgCatalogTokens that this event is referencing

Specified by:
clearMsgCatalogTokens in interface MsgDataElement

getMsgCatalogTokensAsStrings

public java.lang.String[] getMsgCatalogTokensAsStrings()
Description copied from interface: MsgDataElement
Returns the value of the 'Msg Catalog Tokens' attribute list.

Each string corresponds to the value attribute of a MsgCatalogToken inside the message catalog token list.

Specified by:
getMsgCatalogTokensAsStrings in interface MsgDataElement
Returns:
the value of the 'Msg Catalog Tokens' attribute list.
See Also:
MsgDataElement.getMsgCatalogTokensAsStrings()

setMsgCatalogTokensAsStrings

public void setMsgCatalogTokensAsStrings(java.lang.String[] msgCatalogTokens)
Description copied from interface: MsgDataElement
Sets the value of the 'Msg Catalog Tokens' attribute list.

Each string is translated to the value attribute of a MsgCatalogToken to be added to the message catalog token list.

Any prior message catalog token is removed before the new list is set.

Specified by:
setMsgCatalogTokensAsStrings in interface MsgDataElement
Parameters:
msgCatalogTokens - array of values for the message catalog tokens
See Also:
MsgDataElement.setMsgCatalogTokensAsStrings(String[])

setMsgCatalogTokens

public void setMsgCatalogTokens(MsgCatalogToken[] msgCatalogTokens)
Description copied from interface: MsgDataElement
Sets the value of the 'Msg Catalog Tokens' attribute list.

Each string is translated to the value attribute of a MsgCatalogToken to be added to the message catalog token list.

Any prior message catalog token is removed before the new list is set.

Specified by:
setMsgCatalogTokens in interface MsgDataElement
Parameters:
msgCatalogTokens - array of values for the message catalog tokens
See Also:
MsgDataElement.setMsgCatalogTokens(org.eclipse.tptp.logging.events.cbe.MsgCatalogToken[])

equals

public boolean equals(java.lang.Object object)
Overrides the java.lang.Object's equals() API to determine if the parameter object is equal to this object.

Overrides:
equals in class java.lang.Object
Parameters:
object - The java.lang.Object to be compared to this object.
Returns:
True, if this object is the same as the parameter object, otherwise false.
See Also:
Object.equals(java.lang.Object)

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Return a cloned (copy by value) object of this object.

This is a deep copy version, in which all the objects within this object will be copied by value.

Overrides:
clone in class java.lang.Object
Returns:
Object The cloned (copy by value) object of this object.
Throws:
java.lang.CloneNotSupportedException - If a instance variable of this object does not implement the Cloneable interface.

init

public void init()
Resets the object's properties to their initial (e.g. null) state. All components are initialized to either zero or null.

Specified by:
init in interface MsgDataElement

TPTP 4.6.0 Platform Project
Public API Specification