org.apache.fop.configuration
Class Configuration

java.lang.Object
  extended byorg.apache.fop.configuration.Configuration

public class Configuration
extends java.lang.Object

a configuration class for all general configuration aspects except those related to specific renderers. All configuration is stored in key / value pairs. The value can be a String, a list of Strings or a map, containing a list of key / value pairs.


Field Summary
static int AWT
           
static int PDF
           
static int STANDARD
          defines role types
 
Constructor Summary
Configuration()
           
 
Method Summary
static void dumpConfiguration()
          debug methods, which writes out all information in this configuration
static java.net.URL getBaseURL()
           
static java.lang.Boolean getBooleanValue(java.lang.String key)
          convenience methods to access boolean values in the configuration
static java.lang.Boolean getBooleanValue(java.lang.String key, int role)
          convenience methods to access boolean values in the configuration
static java.util.Map getConfiguration()
           
static java.net.URL getFontBaseURL()
           
static java.util.List getFonts()
          Method to access fonts values in the standard configuration
static int getIntValue(java.lang.String key)
          convenience methods to access int values in the standard configuration
static int getIntValue(java.lang.String key, int role)
          convenience methods to access int values in the configuration
static java.util.List getListValue(java.lang.String key)
          convenience methods to access list values in the standard configuration
static java.util.List getListValue(java.lang.String key, int role)
          convenience methods to access list values in the configuration
static java.util.Map getMapValue(java.lang.String key)
          convenience methods to access Map values in the standard configuration
static java.util.Map getMapValue(java.lang.String key, int role)
          convenience methods to access Map values in the configuration
static java.lang.String getStringValue(java.lang.String key)
          convenience methods to access strings values in the standard configuration
static java.lang.String getStringValue(java.lang.String key, int role)
          convenience methods to access strings values in the configuration
static java.lang.Object getValue(java.lang.String key)
          convenience method which retrieves some configuration information from the standard configuration
static java.lang.Object getValue(java.lang.String key, int role)
          general access method
static void put(java.lang.String key, java.lang.Object value)
          adds information to the standard configuration Map in key,value form
static void put(java.lang.String key, java.lang.Object value, int role)
          adds information to the configuration Map in key,value form
static void setup(int role, java.util.Map config)
          Initializes this configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STANDARD

public static final int STANDARD
defines role types

See Also:
Constant Field Values

PDF

public static final int PDF
See Also:
Constant Field Values

AWT

public static final int AWT
See Also:
Constant Field Values
Constructor Detail

Configuration

public Configuration()
Method Detail

getConfiguration

public static java.util.Map getConfiguration()

getValue

public static java.lang.Object getValue(java.lang.String key,
                                        int role)
general access method

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
Object containing the value; normally you would use one of the convenience methods, which return the correct form, null if the key is not defined.

getStringValue

public static java.lang.String getStringValue(java.lang.String key,
                                              int role)
convenience methods to access strings values in the configuration

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
String a string containing the value, null if the key is not defined.

getIntValue

public static int getIntValue(java.lang.String key,
                              int role)
convenience methods to access int values in the configuration

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
int a int containing the value, -1 if the key is not defined.

getBooleanValue

public static java.lang.Boolean getBooleanValue(java.lang.String key,
                                                int role)
convenience methods to access boolean values in the configuration

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
Boolean true or false as value, null if the key is not defined.

getListValue

public static java.util.List getListValue(java.lang.String key,
                                          int role)
convenience methods to access list values in the configuration

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
List a List containing the values, null if the key is not defined.

getMapValue

public static java.util.Map getMapValue(java.lang.String key,
                                        int role)
convenience methods to access Map values in the configuration

Parameters:
key - a string containing the key value for the configuration value
role - detemines the configuration target
Returns:
Map a Map containing the values null if the key is not defined.

getValue

public static java.lang.Object getValue(java.lang.String key)
convenience method which retrieves some configuration information from the standard configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
Object containing the value; normally you would use one of the convenience methods, which return the correct form. null if the key is not defined.

getStringValue

public static java.lang.String getStringValue(java.lang.String key)
convenience methods to access strings values in the standard configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
String a string containing the value null if the key is not defined.

getIntValue

public static int getIntValue(java.lang.String key)
convenience methods to access int values in the standard configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
int a int containing the value, -1 if the key is not defined.

getBooleanValue

public static java.lang.Boolean getBooleanValue(java.lang.String key)
convenience methods to access boolean values in the configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
boolean true or false as value, null if the key is not defined.

getListValue

public static java.util.List getListValue(java.lang.String key)
convenience methods to access list values in the standard configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
List a List containing the values, null if the key is not defined.

getMapValue

public static java.util.Map getMapValue(java.lang.String key)
convenience methods to access Map values in the standard configuration

Parameters:
key - a string containing the key value for the configuration value
Returns:
Map a Map containing the values, null if the key is not defined.

getFonts

public static java.util.List getFonts()
Method to access fonts values in the standard configuration

Returns:
List a List containing the values, null if the key is not defined.

getBaseURL

public static java.net.URL getBaseURL()

getFontBaseURL

public static java.net.URL getFontBaseURL()

setup

public static void setup(int role,
                         java.util.Map config)
Initializes this configuration

Parameters:
role - detemines the configuration target
config - contains the configuration information

put

public static void put(java.lang.String key,
                       java.lang.Object value,
                       int role)
adds information to the configuration Map in key,value form

Parameters:
key - a string containing the key value for the configuration value
value - the configuration information; can be a String, a List or a Map
role - detemines the configuration target

put

public static void put(java.lang.String key,
                       java.lang.Object value)
adds information to the standard configuration Map in key,value form

Parameters:
key - a string containing the key value for the configuration value value the configuration information role detemines the configuration target
value - an Object containing the value; can be a String, a List or a Map

dumpConfiguration

public static void dumpConfiguration()
debug methods, which writes out all information in this configuration



Copyright © 1999-2003 Apache Software Foundation. All Rights Reserved.