WebLogic Integration


com.bea.util
Class PropertyResourceBundleWriter

java.lang.Object
  |
  +--com.bea.util.PropertyResourceBundleWriter

public class PropertyResourceBundleWriter
extends java.lang.Object

Provides methods to work with a Resource Bundle.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Constructor Summary
PropertyResourceBundleWriter(java.lang.String bundleFileName)
          Load a resource bundle
 
Method Summary
 java.lang.String getOptionalProperty(java.lang.String key)
          Get property value.
 java.util.Map getProperties()
          Get properties map
 java.lang.String getRequiredProperty(java.lang.String key)
          Get property value.
 java.util.Iterator listPropertyNames()
           
protected  void loadProperties()
           
 void refresh()
          Reload properties from file.
 void save()
          Save properties to bundle file.
 void setProperty(java.lang.String key, java.lang.String value)
          Set property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyResourceBundleWriter

public PropertyResourceBundleWriter(java.lang.String bundleFileName)
                             throws java.io.IOException
Load a resource bundle

Parameters:
bundleFileName - - Fully qualified bundle filename.
Throws:
FileNotFoundException. -  
java.io.IOException - - If there is problem accessing the resource bundle.
Method Detail

listPropertyNames

public java.util.Iterator listPropertyNames()

getOptionalProperty

public java.lang.String getOptionalProperty(java.lang.String key)
Get property value.

Parameters:
key - - the property key.
Returns:
the property value or null.

getRequiredProperty

public java.lang.String getRequiredProperty(java.lang.String key)
                                     throws java.util.MissingResourceException
Get property value.

Parameters:
key - - the property key.
Returns:
the property value.
Throws:
java.util.MissingResourceException - - If property not found.

loadProperties

protected void loadProperties()
                       throws java.io.IOException

refresh

public void refresh()
             throws java.io.IOException
Reload properties from file.

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Set property value.

Parameters:
key - - the property key.
value - - the property value.

save

public void save()
          throws java.io.IOException
Save properties to bundle file.

getProperties

public java.util.Map getProperties()
Get properties map

Returns:
properties Map.

WebLogic Integration

WebLogic Integration (WLI)