org.apache.commons.configuration.web
Class AppletConfiguration

java.lang.Object
  |
  +--org.apache.commons.configuration.AbstractConfiguration
        |
        +--org.apache.commons.configuration.web.BaseWebConfiguration
              |
              +--org.apache.commons.configuration.web.AppletConfiguration
All Implemented Interfaces:
Configuration

public class AppletConfiguration
extends org.apache.commons.configuration.web.BaseWebConfiguration

A configuration wrapper to read applet parameters. This configuration is read only, adding or removing a property will throw an UnsupportedOperationException.

Since:
1.1
Version:
$Revision$, $Date: 2005-10-12 21:01:43 +0200 (Wed, 12 Oct 2005) $
Author:
Emmanuel Bourg

Field Summary
protected  Applet applet
          Stores the wrapped applet.
 
Fields inherited from class org.apache.commons.configuration.AbstractConfiguration
END_TOKEN, START_TOKEN
 
Constructor Summary
AppletConfiguration(Applet applet)
          Create an AppletConfiguration using the initialization parameters of the specified Applet.
 
Method Summary
protected  void addPropertyDirect(String key, Object obj)
          Adds a property to this configuration.
 void clearProperty(String key)
          Removes the property with the given key.
 boolean containsKey(String key)
          Checks whether the specified key is stored in this configuration.
 Iterator getKeys()
          {@inheritDoc}
 Object getProperty(String key)
          Gets a property from the configuration.
 boolean isEmpty()
          Checks if this configuration is empty.
 
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration
addProperty, clear, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getKeys, getList, getList, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getStringArray, interpolate, interpolate, interpolateHelper, isThrowExceptionOnMissing, resolveContainerStore, setDelimiter, setProperty, setThrowExceptionOnMissing, subset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applet

protected Applet applet
Stores the wrapped applet.
Constructor Detail

AppletConfiguration

public AppletConfiguration(Applet applet)
Create an AppletConfiguration using the initialization parameters of the specified Applet.
Parameters:
applet - the applet
Method Detail

getProperty

public Object getProperty(String key)
Description copied from interface: Configuration
Gets a property from the configuration.
Following copied from interface: org.apache.commons.configuration.Configuration
Parameters:
key - property to retrieve
Returns:
the value to which this configuration maps the specified key, or null if the configuration contains no mapping for this key.

getKeys

public Iterator getKeys()
Description copied from class: AbstractConfiguration
{@inheritDoc}
Overrides:
getKeys in class AbstractConfiguration
Following copied from interface: org.apache.commons.configuration.Configuration
Returns:
An Iterator.

isEmpty

public boolean isEmpty()
Checks if this configuration is empty. This implementation makes use of the getKeys() method (which must be defined by concrete sub classes) to find out whether properties exist.
Overrides:
isEmpty in class AbstractConfiguration
Returns:
a flag whether this configuration is empty

containsKey

public boolean containsKey(String key)
Checks whether the specified key is stored in this configuration.
Overrides:
containsKey in class AbstractConfiguration
Parameters:
key - the key
Returns:
a flag whether this key exists in this configuration

clearProperty

public void clearProperty(String key)
Removes the property with the given key. This operation is not supported and will throw an UnsupportedOperationException.
Overrides:
clearProperty in class AbstractConfiguration
Parameters:
key - the key of the property to be removed
Throws:
UnsupportedOperationException - because this operation is not allowed

addPropertyDirect

protected void addPropertyDirect(String key,
                                 Object obj)
Adds a property to this configuration. This operation is not supported and will throw an UnsupportedOperationException.
Overrides:
addPropertyDirect in class AbstractConfiguration
Parameters:
key - the key of the property
obj - the value to be added
Throws:
UnsupportedOperationException - because this operation is not allowed


Copyright © 2001-2005 The Apache Software Foundation. All Rights Reserved.