org.apache.lenya.ac.impl
Class ItemConfiguration

java.lang.Object
  extended by org.apache.lenya.ac.impl.ItemConfiguration

public class ItemConfiguration
extends java.lang.Object

Use this class to create configurations from AbstractItems or to build AbstractItems from configurations.


Field Summary
protected static java.lang.String ATTRIBUTE_CLASS
           
protected static java.lang.String ATTRIBUTE_ID
           
protected static java.lang.String ELEMENT_DESCRIPTION
           
protected static java.lang.String ELEMENT_NAME
           
 
Constructor Summary
ItemConfiguration()
          Ctor.
 
Method Summary
 void configure(AbstractItem manageable, org.apache.avalon.framework.configuration.Configuration configuration)
          Configures a Manageable.
static java.lang.String getItemClass(org.apache.avalon.framework.configuration.Configuration config)
          Returns the class name of an item.
 void save(AbstractItem manageable, org.apache.avalon.framework.configuration.DefaultConfiguration configuration)
          Saves the ID, name and description of the Manageable to the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ELEMENT_NAME

protected static final java.lang.String ELEMENT_NAME
See Also:
Constant Field Values

ELEMENT_DESCRIPTION

protected static final java.lang.String ELEMENT_DESCRIPTION
See Also:
Constant Field Values

ATTRIBUTE_ID

protected static final java.lang.String ATTRIBUTE_ID
See Also:
Constant Field Values

ATTRIBUTE_CLASS

protected static final java.lang.String ATTRIBUTE_CLASS
See Also:
Constant Field Values
Constructor Detail

ItemConfiguration

public ItemConfiguration()
Ctor.

Method Detail

save

public void save(AbstractItem manageable,
                 org.apache.avalon.framework.configuration.DefaultConfiguration configuration)
Saves the ID, name and description of the Manageable to the configuration.

Parameters:
manageable - A manageable.
configuration - A configuration.

configure

public void configure(AbstractItem manageable,
                      org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configures a Manageable.

Parameters:
manageable - The manageable.
configuration - The configuration.
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - when something went wrong.

getItemClass

public static java.lang.String getItemClass(org.apache.avalon.framework.configuration.Configuration config)
                                     throws org.apache.lenya.ac.AccessControlException
Returns the class name of an item.

Parameters:
config - The item configuration.
Returns:
The class name.
Throws:
org.apache.lenya.ac.AccessControlException - when something went wrong.


Copyright © $ Apache Software Foundation. All Rights Reserved.