pl.gda.pg.eti.ask.przemyslawbielicki.aeh.translation
Class MessageTranslation

java.lang.Object
  extended bypl.gda.pg.eti.ask.przemyslawbielicki.aeh.translation.MessageTranslation

public class MessageTranslation
extends Object

MessageTranslation contains translation resource path for concrete exception message.

MessageTranslation can be converted to XML elelemt Element by getElement(DocumentImpl) method.

Version:
0.9
Author:
Przemyslaw Bielicki
Gdansk University of Technology
Faculty of Electronics, Telecommunication and Computer Science
Distributed Computer Systems

Field Summary
private  String exceptionMessage_
          Exception message or its fragment
private  String translationResource_
          Path to resource that contains final message for user in concrete language
 
Constructor Summary
MessageTranslation()
           
 
Method Summary
 ElementImpl getElement(DocumentImpl document)
          Retrieves XML element for current message translation subtree.
 String getExceptionMessage()
          Getter method for exception message
 String getTranslationResource()
          Getter method for translation resource
 int hashCode()
          Returns a hash code for this message.
 void setExceptionMessage(String string)
          Setter method for exception message
 void setTranslationResource(String string)
          Setter method for translation resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exceptionMessage_

private String exceptionMessage_
Exception message or its fragment


translationResource_

private String translationResource_
Path to resource that contains final message for user in concrete language

Constructor Detail

MessageTranslation

public MessageTranslation()
Method Detail

getElement

public ElementImpl getElement(DocumentImpl document)
Retrieves XML element for current message translation subtree. If translationResource_ is null method creates default comment. It is necessary for programmer to complete database.

Parameters:
document - parent document to add current element to
Returns:
XML document of current translation element

getExceptionMessage

public String getExceptionMessage()
Getter method for exception message

Returns:
exception message

getTranslationResource

public String getTranslationResource()
Getter method for translation resource

Returns:
translation resource

setExceptionMessage

public void setExceptionMessage(String string)
Setter method for exception message

Parameters:
string - exception message

setTranslationResource

public void setTranslationResource(String string)
Setter method for translation resource

Parameters:
string - translation resource

hashCode

public int hashCode()
Returns a hash code for this message. Simply gets hashcode from exceptionMessage_ because it has to be unique.

Returns:
a hash code value for this object.
See Also:
String.hashCode()