com.sapportals.wcm.rendering.util

Class BundleHandler

java.lang.Object
  extended by com.sapportals.wcm.rendering.util.BundleHandler

Deprecated. As of NetWeaver 7.1

public final class BundleHandler
extends Object

Since:
EP5 SP6 and EP6 SP1

Constructor Summary
BundleHandler(ResourceBundles defaultBundle, IResourceContext context)
          Deprecated. As of NetWeaver 7.1
 
Method Summary
 String getBaseBundleString(String baseName, String key)
          Deprecated. As of NetWeaver 7.1
 String getBaseBundleString(String baseName, String key, Object obj)
          Deprecated. As of NetWeaver 7.1
 String getBaseBundleString(String baseName, String key, Object[] objs)
          Deprecated. As of NetWeaver 7.1
 String getBaseBundleString(String baseName, String key, Object obj1, Object obj2)
          Deprecated. As of NetWeaver 7.1
 String getBundleString(String key)
          Deprecated. As of NetWeaver 7.1
 String getBundleString(String key, Object obj)
          Deprecated. As of NetWeaver 7.1
 String getBundleString(String key, Object[] objs)
          Deprecated. As of NetWeaver 7.1
 String getBundleString(String key, Object obj1, Object obj2)
          Deprecated. As of NetWeaver 7.1
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleHandler

public BundleHandler(ResourceBundles defaultBundle,
                     IResourceContext context)
Deprecated. As of NetWeaver 7.1

Method Detail

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key,
                                  Object[] objs)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle. The defaultBundle must exist for the base class, the one for the derived class ist optional. The method tries to find a key in the optional bundle. If the key is not found the default bundle is used (=> optional bundle can overwrite keys from the default bundle). If no key is found a exception is thrown.

Parameters:
baseName - base name of property file (null: current classname)
key - A resource bundle key that must exist in either the optional or default bundle.
objs - An object array containing objects to be replaced in the bundle (@see java.text.MessageFormat)
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

public String getBundleString(String key,
                              Object[] objs)
                       throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle. The defaultBundle must exist for the base class, the one for the derived class ist optional. The method tries to find a key in the optional bundle. If the key is not found the default bundle is used (=> optional bundle can overwrite keys from the default bundle). If no key is found a exception is thrown.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
objs - An object array containing objects to be replaced in the bundle (@see java.text.MessageFormat)
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Convenience routine without replacement objects

Parameters:
baseName - base name of property file (null: current classname)
key - A resource bundle key that must exist in either the optional or default bundle.
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.
See Also:
getBaseBundleString(String baseName, String key, Object[] objs)

getBundleString

public String getBundleString(String key)
                       throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Convenience routine without replacement objects

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.
See Also:
getBaseBundleString(String baseName, String key, Object[] objs)

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key,
                                  Object obj)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of placeholder {0} will be replaced by the given text parameter.

Parameters:
baseName - base name of property file (null: current classname)
key - A resource bundle key that must exist in either the optional or default bundle.
obj - An object that will be replaced at each occurrence of "{1 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

public String getBundleString(String key,
                              Object obj)
                       throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of placeholder {0} will be replaced by the given text parameter.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
obj - An object that will be replaced at each occurrence of "{1 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBaseBundleString

public String getBaseBundleString(String baseName,
                                  String key,
                                  Object obj1,
                                  Object obj2)
                           throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of placeholder {n-1} will be replaced by the corresponding text parameter.

Parameters:
baseName - base name of property file (null: current classname)
key - A resource bundle key that must exist in either the optional or default bundle.
obj1 - An object that will be replaced at each occurrence of "{1 [, ]}".
obj2 - An object that will be replaced at each occurrence of "{2 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.

getBundleString

public String getBundleString(String key,
                              Object obj1,
                              Object obj2)
                       throws MissingResourceException
Deprecated. As of NetWeaver 7.1

Reads a resource string from a resource bundle (@see getBundleString(String baseName, String key, Object[] objs)). Additionally, each occurrence of placeholder {n-1} will be replaced by the corresponding text parameter.

Parameters:
key - A resource bundle key that must exist in either the optional or default bundle.
obj1 - An object that will be replaced at each occurrence of "{1 [, ]}".
obj2 - An object that will be replaced at each occurrence of "{2 [, ]}".
Throws:
MissingResourceException - This is thrown if a key was not found in both resource files.
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/nonwduideprecated api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice