com.sap.netweaver.bc.uwl.config

Class Descriptions

java.lang.Object
  extended by com.sap.netweaver.bc.uwl.config.Descriptions
All Implemented Interfaces:
Serializable, Cloneable

public final class Descriptions
extends Object
implements Cloneable, Serializable

This class that represnts internalized strings for display. Global descriptions are shared by many configuration objects. Descriptions may either contain hashMap of language key to string values or contain pointer to ResourceBundles. Since sometimes bundles are stored per languages,there are method variants for accepting both string value of the locale and Locale object itself.

See Also:
Serialized Form

Constructor Summary
Descriptions(IDescriptionResourceBundle descriptionBundle)
           
Descriptions(String defaultStr)
          If this constructor is used, then short and long descriptions are used and no resource bundles are used.
 
Method Summary
 void add(String key, String shortDesc, String longDesc)
           
 void addLong(String key, String longDesc)
           
 void addShort(String key, String shortDesc)
           
 Object clone()
           
 String getDefault()
           
 Set getKeySet()
          Used for itertating over the keys
 String getLong(Locale locale)
           
 String getLong(String key)
          Dont use this method.
 String getNonNullLong(Locale locale)
           
 String getNonNullShort(Locale locale)
           
 IDescriptionResourceBundle getResourceBundle()
          Returns the resource bundle associated with it.
 String getShort(Locale locale)
           
 String getShort(String key)
          Dont use this method.
 boolean isShared()
          Descriptions are shared if they are defined as part of the global description bundle under ConfigurationRoot or if they have description resource Bundles associated with them.
 void setGlobal()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Descriptions

public Descriptions(IDescriptionResourceBundle descriptionBundle)

Descriptions

public Descriptions(String defaultStr)
If this constructor is used, then short and long descriptions are used and no resource bundles are used.

Parameters:
defaultStr -
Method Detail

getResourceBundle

public IDescriptionResourceBundle getResourceBundle()
Returns the resource bundle associated with it. Could be null

Returns:
could be null

isShared

public boolean isShared()
Descriptions are shared if they are defined as part of the global description bundle under ConfigurationRoot or if they have description resource Bundles associated with them.

Returns:
true if this description is a bundle

getDefault

public String getDefault()

getLong

public String getLong(Locale locale)
Parameters:
locale - not null
Returns:
returns Long description , could be null

getNonNullLong

public String getNonNullLong(Locale locale)

getShort

public String getShort(Locale locale)
Parameters:
locale -
Returns:
returns Short description could be null

getNonNullShort

public String getNonNullShort(Locale locale)
Parameters:
locale -
Returns:
non null value guaranteed

getLong

public String getLong(String key)
Dont use this method. Only used for serialization.

Parameters:
key - is not necessarily locale.toString() could just be langauge. If this method is used, keys should have got through, getKeySet() method.
Returns:
could be null

getShort

public String getShort(String key)
Dont use this method. Only used for serialization.

Parameters:
key - is not necessarily locale.toString() could just be langauge. If this method is used, keys should have got through, getKeySet() method.
Returns:
could be null

getKeySet

public Set getKeySet()
Used for itertating over the keys

Returns:

add

public void add(String key,
                String shortDesc,
                String longDesc)

addShort

public void addShort(String key,
                     String shortDesc)

addLong

public void addLong(String key,
                    String longDesc)

setGlobal

public void setGlobal()

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api - EP-BC-UWL
[sap.com] UWLJWF [sap.com] tc/kmc/bc.uwl/api default EP-BC-UWL


Copyright 2011 SAP AG Complete Copyright Notice