org.apache.jackrabbit.server.io
Class AbstractContext

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended byorg.apache.jackrabbit.server.io.AbstractContext
All Implemented Interfaces:
Cloneable, org.apache.commons.chain.Context, Map, Serializable
Direct Known Subclasses:
ExportContext, ImportContext

public class AbstractContext
extends Properties
implements org.apache.commons.chain.Context

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
AbstractContext(Properties defaults)
          Creates a new AbstractContext that used the given properties as default
 
Method Summary
 void enableCommand(String id, boolean enable)
          Enables or disables a command by setting the <id>.enabled property to enabled
 void enableCommand(String id, String enable)
          Enables or disables a command by setting the <id>.enabled property to enabled
 boolean getProperty(String name, boolean def)
          Returns the value of the property or def if the property does not exist.
 String getProperty(String name, String def)
          Returns the value of the property or def if the property does not exist.
 boolean isCommandEnabled(String id, boolean def)
          Checks if this command is enabled.
 
Methods inherited from class java.util.Properties
getProperty, list, list, load, propertyNames, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

AbstractContext

public AbstractContext(Properties defaults)
Creates a new AbstractContext that used the given properties as default

Parameters:
defaults -
Method Detail

getProperty

public String getProperty(String name,
                          String def)
Returns the value of the property or def if the property does not exist.

Parameters:
name - the name of the property
def - the default value to return if the property does not exist.
Returns:
the value of the property or def

getProperty

public boolean getProperty(String name,
                           boolean def)
Returns the value of the property or def if the property does not exist.

Parameters:
name - the name of the property
def - the default value to return if the property does not exist.
Returns:
the value of the property or def

enableCommand

public void enableCommand(String id,
                          boolean enable)
Enables or disables a command by setting the <id>.enabled property to enabled

Parameters:
id -
enable -

enableCommand

public void enableCommand(String id,
                          String enable)
Enables or disables a command by setting the <id>.enabled property to enabled

Parameters:
id -
enable -

isCommandEnabled

public boolean isCommandEnabled(String id,
                                boolean def)
Checks if this command is enabled. if the respective property does not exist, the value of def is returned.

Parameters:
id -
def -
Returns:


Copyright © 2005 . All Rights Reserved.