net.sf.magicproject.database.data
Class TranslatableData

java.lang.Object
  extended by net.sf.magicproject.database.data.TranslatableData
Direct Known Subclasses:
CollectionData, StringData

public abstract class TranslatableData
extends java.lang.Object

Represents a translatable data. A data contains a key and a value. The key is always translated, but the value may not.

Since:
0.90
Author:
Fabrice Daugan

Constructor Summary
TranslatableData(PropertyConfig propertyConfig)
          Default public constructor.
 
Method Summary
 java.lang.String getPropertyName()
          The key.
 java.lang.String getTranslatedPropertyName()
          Returns the translated property name.
abstract  java.lang.String getTranslatedValue(Proxy proxy)
          Returns the translated value.
abstract  java.lang.String getValue()
          The value.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TranslatableData

public TranslatableData(PropertyConfig propertyConfig)
Default public constructor.

Parameters:
propertyConfig - the property configuration of this data to use
Method Detail

getTranslatedPropertyName

public final java.lang.String getTranslatedPropertyName()
Returns the translated property name. The translation is done only during the first call.

Returns:
the translated property name

getTranslatedValue

public abstract java.lang.String getTranslatedValue(Proxy proxy)
Returns the translated value. The translation is done only during the first call.

Parameters:
proxy - is the proxy this data come from. Is used to translate from private-proxy to public-tbs value.
Returns:
the translated value

getPropertyName

public final java.lang.String getPropertyName()
The key.

Returns:
the key of this data

getValue

public abstract java.lang.String getValue()
The value.

Returns:
the value associated to the key of this data

toString

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


Copyright © 2003-2007 Magic-Project. All Rights Reserved.