org.apache.jackrabbit.server.io
Class AbstractContext
java.lang.Object
java.util.Dictionary
java.util.Hashtable
java.util.Properties
org.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
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.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
AbstractContext
public AbstractContext(Properties defaults)
- Creates a new AbstractContext that used the given properties as default
- Parameters:
defaults
-
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 propertydef
- 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 propertydef
- 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.