org.clapper.curn
Class ConfiguredOutputHandler

java.lang.Object
  extended by org.clapper.curn.ConfiguredOutputHandler
All Implemented Interfaces:
java.lang.Comparable

public class ConfiguredOutputHandler
extends java.lang.Object
implements java.lang.Comparable

Contains parsed configuration information for an output handler, including the class name and output handler name (which is really the section name).

Version:
$Revision: 6300 $
See Also:
CurnConfig, Curn

Constructor Summary
ConfiguredOutputHandler(java.lang.String name, java.lang.String sectionName, java.lang.String className)
          Construct a new ConfiguredOutputHandler object.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares this object with the specified object for order.
 void disable()
          Mark this handler disabled, usually in response to a plug-in action.
 java.lang.String getClassName()
          Get the class name associated with this output handler
 java.util.Map getExtraVariables()
          Get the extra variables defined with this output handler.
 java.lang.String getName()
          Get the unique name for this handler
 OutputHandler getOutputHandler()
          Get the actual OutputHandler object, instantiating it if it hasn't already been instantiated.
 java.lang.String getSectionName()
          Get the configuration file section name where this output handler was defined
 boolean isDisabled()
          Determine whether this handler is disabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfiguredOutputHandler

public ConfiguredOutputHandler(java.lang.String name,
                               java.lang.String sectionName,
                               java.lang.String className)
Construct a new ConfiguredOutputHandler object.

Parameters:
name - a unique name for the handler
sectionName - the name of the configuration file section where the output handler was defined, or null if the handler has no corresponding section
className - the output handler's class name
Method Detail

getClassName

public java.lang.String getClassName()
Get the class name associated with this output handler

Returns:
the class name

getSectionName

public java.lang.String getSectionName()
Get the configuration file section name where this output handler was defined

Returns:
the section name, or null for none

getName

public java.lang.String getName()
Get the unique name for this handler

Returns:
the unique name. Should never be null.

disable

public void disable()
Mark this handler disabled, usually in response to a plug-in action.

See Also:
isDisabled()

isDisabled

public boolean isDisabled()
Determine whether this handler is disabled.

Returns:
true if disabled, false if enabled
See Also:
disable()

getOutputHandler

public OutputHandler getOutputHandler()
                               throws CurnException
Get the actual OutputHandler object, instantiating it if it hasn't already been instantiated.

Returns:
the OutputHandler object
Throws:
CurnException - on error

getExtraVariables

public java.util.Map getExtraVariables()
Get the extra variables defined with this output handler.

Returns:
a Map of variables. The map is keyed by variable name, and each entry is a variable value. The Map will be empty, but never null, if there are no extra variables for this output handler.

compareTo

public int compareTo(java.lang.Object o)
              throws java.lang.ClassCastException
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - the object to compare
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
Throws:
java.lang.ClassCastException - if the specified object's type prevents it from being compared to this Object.


Copyright © 2004-2006 Brian M. Clapper. All Rights Reserved.