wt.tools.resource
Class ResourceValue

java.lang.Object
  extended bywt.tools.resource.ResourceValue
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
StringResourceValue

public class ResourceValue
extends Object
implements Cloneable

A value for an entry in a resource. Due to localizations and customizations, there may be multiple values for a particular entry.

Supported API: false

Extendable: false


Field Summary
private static String CLASSNAME
           
private  ResourceEntry entry
           
private static String RESOURCE
           
protected static String TRANSLATION_SOURCE_NOW
           
protected static String TRANSLATION_SOURCE_WAS
           
private  ResourceValue translationSource
           
private  boolean updated
           
private  Object value
           
protected static String VALUE_TAG
           
 
Constructor Summary
ResourceValue()
           
 
Method Summary
 Object clone()
          

Supported API: false
private  void entryValidate(ResourceEntry a_Entry)
           
 boolean equals(Object obj)
           
 String[] getArgComments()
          Gets the value of the attribute: argComments; Descriptions of the arguments that may be embedded in the entry's value (message).
 String getCategory()
          Gets the value of the attribute: category; Non-localizable category of the entry.
 String getComment()
          Gets the value of the attribute: comment; Non-localizable description of the entry.
 String getConstant()
          Gets the value of the attribute: constant; The (optional) constant field name for the entry.
protected  ResourceEntry getEntry()
          Gets the object for the association that plays role: entry.
 String getKey()
          Gets the value of the attribute: key; Internal key for the entry.
protected  ResourceValue getPrimaryValue()
          Gets the value of the attribute: primaryValue; The primary (default) resource value for a localized value.
 ResourceValue getTranslationSource()
          Gets the object for the association that plays role: translationSource.
 Object getValue()
          Gets the value of the attribute: value; The value of this ResourceValue for the entry.
protected  void initialize(String a_Key)
          Initialize this object.
 boolean isCustomizable()
          Gets the value of the attribute: customizable; Specifies if this resource entry can be customized.
 boolean isDeprecated()
          Gets the value of the attribute: deprecated; Specifies if this resource entry is deprecated.
protected  boolean isPrimaryValue()
          

Supported API: false
protected  void load(Dictionary source, String owner)
          Load the state of this instance from the source.
protected  void loadTranslationSource(Dictionary source)
           
protected  ResourceEntry makeEntry(String a_Key)
          Make a new ResourceEntry, for this ResourceValue.
 ResourceValue makeLocalization()
           
(package private) static ResourceValue newResourceValue(String a_Key)
          

Supported API: false
private static Timestamp now()
           
 void setArgComments(String[] a_ArgComments)
          Sets the value of the attribute: argComments; Descriptions of the arguments that may be embedded in the entry's value (message).
 void setCategory(String a_Category)
          Sets the value of the attribute: category; Non-localizable category of the entry.
 void setComment(String a_Comment)
          Sets the value of the attribute: comment; Non-localizable description of the entry.
 void setConstant(String a_Constant)
          Sets the value of the attribute: constant; The (optional) constant field name for the entry.
 void setCustomizable(boolean a_Customizable)
          Sets the value of the attribute: customizable; Specifies if this resource entry can be customized.
 void setDeprecated(boolean a_Deprecated)
          Sets the value of the attribute: deprecated; Specifies if this resource entry is deprecated.
protected  void setEntry(ResourceEntry a_Entry)
          Sets the object for the association that plays role: entry.
protected  void setKey(String a_Key)
          Sets the value of the attribute: key; Internal key for the entry.
protected  void setTranslationSource(ResourceValue a_TranslationSource)
          Sets the object for the association that plays role: translationSource.
 void setValue(Object a_Value)
          Sets the value of the attribute: value; The value of this ResourceValue for the entry.
 String toString()
           
protected  void updated()
           
private  void valueValidate(Object a_Value)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

value

private Object value

updated

private boolean updated

entry

private ResourceEntry entry

translationSource

private ResourceValue translationSource

VALUE_TAG

protected static final String VALUE_TAG
See Also:
Constant Field Values

TRANSLATION_SOURCE_WAS

protected static final String TRANSLATION_SOURCE_WAS
See Also:
Constant Field Values

TRANSLATION_SOURCE_NOW

protected static final String TRANSLATION_SOURCE_NOW
See Also:
Constant Field Values
Constructor Detail

ResourceValue

public ResourceValue()
Method Detail

getKey

public String getKey()
Gets the value of the attribute: key; Internal key for the entry.

Supported API: false

Returns:
String

setKey

protected void setKey(String a_Key)
               throws WTPropertyVetoException
Sets the value of the attribute: key; Internal key for the entry.

Supported API: false

Parameters:
a_Key -
Throws:
WTPropertyVetoException

getCategory

public String getCategory()
Gets the value of the attribute: category; Non-localizable category of the entry.

Supported API: false

Returns:
String

setCategory

public void setCategory(String a_Category)
                 throws WTPropertyVetoException
Sets the value of the attribute: category; Non-localizable category of the entry.

Supported API: false

Parameters:
a_Category -
Throws:
WTPropertyVetoException

getComment

public String getComment()
Gets the value of the attribute: comment; Non-localizable description of the entry.

Supported API: false

Returns:
String

setComment

public void setComment(String a_Comment)
                throws WTPropertyVetoException
Sets the value of the attribute: comment; Non-localizable description of the entry.

Supported API: false

Parameters:
a_Comment -
Throws:
WTPropertyVetoException

getArgComments

public String[] getArgComments()
Gets the value of the attribute: argComments; Descriptions of the arguments that may be embedded in the entry's value (message).

Supported API: false

Returns:
String[]

setArgComments

public void setArgComments(String[] a_ArgComments)
                    throws WTPropertyVetoException
Sets the value of the attribute: argComments; Descriptions of the arguments that may be embedded in the entry's value (message).

Supported API: false

Parameters:
a_ArgComments -
Throws:
WTPropertyVetoException

getConstant

public String getConstant()
Gets the value of the attribute: constant; The (optional) constant field name for the entry.

Supported API: false

Returns:
String

setConstant

public void setConstant(String a_Constant)
                 throws WTPropertyVetoException
Sets the value of the attribute: constant; The (optional) constant field name for the entry.

Supported API: false

Parameters:
a_Constant -
Throws:
WTPropertyVetoException

isCustomizable

public boolean isCustomizable()
Gets the value of the attribute: customizable; Specifies if this resource entry can be customized.

Supported API: false

Returns:
boolean

setCustomizable

public void setCustomizable(boolean a_Customizable)
                     throws WTPropertyVetoException
Sets the value of the attribute: customizable; Specifies if this resource entry can be customized.

Supported API: false

Parameters:
a_Customizable -
Throws:
WTPropertyVetoException

isDeprecated

public boolean isDeprecated()
Gets the value of the attribute: deprecated; Specifies if this resource entry is deprecated.

Supported API: false

Returns:
boolean

setDeprecated

public void setDeprecated(boolean a_Deprecated)
Sets the value of the attribute: deprecated; Specifies if this resource entry is deprecated.

Supported API: false

Parameters:
a_Deprecated -

getPrimaryValue

protected ResourceValue getPrimaryValue()
Gets the value of the attribute: primaryValue; The primary (default) resource value for a localized value.

Supported API: false

Returns:
ResourceValue

getValue

public Object getValue()
Gets the value of the attribute: value; The value of this ResourceValue for the entry.

Supported API: false

Returns:
Object

setValue

public void setValue(Object a_Value)
              throws WTPropertyVetoException
Sets the value of the attribute: value; The value of this ResourceValue for the entry.

Supported API: false

Parameters:
a_Value -
Throws:
WTPropertyVetoException

valueValidate

private void valueValidate(Object a_Value)
                    throws WTPropertyVetoException
Parameters:
a_Value -
Throws:
WTPropertyVetoException

getEntry

protected ResourceEntry getEntry()
Gets the object for the association that plays role: entry.

Supported API: false

Returns:
ResourceEntry

setEntry

protected void setEntry(ResourceEntry a_Entry)
                 throws WTPropertyVetoException
Sets the object for the association that plays role: entry.

Supported API: false

Parameters:
a_Entry -
Throws:
WTPropertyVetoException

entryValidate

private void entryValidate(ResourceEntry a_Entry)
                    throws WTPropertyVetoException
Parameters:
a_Entry -
Throws:
WTPropertyVetoException

getTranslationSource

public ResourceValue getTranslationSource()
Gets the object for the association that plays role: translationSource.

Supported API: false

Returns:
ResourceValue

setTranslationSource

protected void setTranslationSource(ResourceValue a_TranslationSource)
                             throws WTPropertyVetoException
Sets the object for the association that plays role: translationSource.

Supported API: false

Parameters:
a_TranslationSource -
Throws:
WTPropertyVetoException

newResourceValue

static ResourceValue newResourceValue(String a_Key)
                               throws WTPropertyVetoException


Supported API: false

Parameters:
a_Key -
Returns:
ResourceValue
Throws:
WTPropertyVetoException

initialize

protected void initialize(String a_Key)
                   throws WTPropertyVetoException
Initialize this object.

Supported API: false

Parameters:
a_Key -
Throws:
WTPropertyVetoException

makeEntry

protected ResourceEntry makeEntry(String a_Key)
                           throws WTPropertyVetoException
Make a new ResourceEntry, for this ResourceValue.

Supported API: false

Parameters:
a_Key -
Returns:
ResourceEntry
Throws:
WTPropertyVetoException

load

protected void load(Dictionary source,
                    String owner)
             throws WTPropertyVetoException
Load the state of this instance from the source.

Supported API: false

Parameters:
source -
owner -
Throws:
WTPropertyVetoException

isPrimaryValue

protected boolean isPrimaryValue()


Supported API: false

Returns:
boolean

clone

public Object clone()


Supported API: false

Returns:
Object

updated

protected void updated()

now

private static Timestamp now()

loadTranslationSource

protected void loadTranslationSource(Dictionary source)
                              throws WTPropertyVetoException
Throws:
WTPropertyVetoException

makeLocalization

public ResourceValue makeLocalization()
                               throws WTPropertyVetoException
Throws:
WTPropertyVetoException

equals

public boolean equals(Object obj)

toString

public String toString()