org.apache.turbine.services.intake
Interface IntakeService

All Known Implementing Classes:
TurbineIntakeService

public interface IntakeService

This service provides access to input processing objects based on an XML specification.

Localization of Intake's error messages can be accomplished using Turbine's LocalizationTool from a Velocity template as follows:

$l10n.get($intake.SomeGroup.SomeField.Message)

Version:
$Id: IntakeService.java 534527 2007-05-02 16:10:59Z tv $
Author:
John McNally, Henning P. Schmiedehausen, Quinton McCombs

Field Summary
static int DEFAULT_POOL_CAPACITY
          The default pool capacity.
static java.lang.String SERIAL_XML
          The property specifying the location where a serialized version of the xml specification can be written for faster restarts..
static java.lang.String SERIAL_XML_DEFAULT
          The default location where a serialized version of the xml specification can be written for faster restarts..
static java.lang.String SERVICE_NAME
          The key under which this service is stored in TurbineServices.
static java.lang.String XML_PATH
          The property specifying the location of the xml specification.
static java.lang.String XML_PATH_DEFAULT
          The default location of the xml specification.
 
Method Summary
 java.lang.reflect.Method getFieldGetter(java.lang.String className, java.lang.String propName)
          Gets the Method that can be used to get a property value.
 java.lang.reflect.Method getFieldSetter(java.lang.String className, java.lang.String propName)
          Gets the Method that can be used to set a property.
 Group getGroup(java.lang.String groupName)
          Gets an instance of a named group either from the pool or by calling the Factory Service if the pool is empty.
 java.lang.String getGroupKey(java.lang.String groupName)
          Gets the key (usually a short identifier) for a group.
 java.lang.String getGroupName(java.lang.String groupKey)
          Gets the group name given its key.
 java.lang.String[] getGroupNames()
          Names of all the defined groups.
 int getSize(java.lang.String groupName)
          Gets the current size of the pool for a named group.
 void releaseGroup(Group instance)
          Puts a group back to the pool.
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
The key under which this service is stored in TurbineServices.

See Also:
Constant Field Values

XML_PATH

public static final java.lang.String XML_PATH
The property specifying the location of the xml specification.

See Also:
Constant Field Values

XML_PATH_DEFAULT

public static final java.lang.String XML_PATH_DEFAULT
The default location of the xml specification.

See Also:
Constant Field Values

SERIAL_XML

public static final java.lang.String SERIAL_XML
The property specifying the location where a serialized version of the xml specification can be written for faster restarts..

See Also:
Constant Field Values

SERIAL_XML_DEFAULT

public static final java.lang.String SERIAL_XML_DEFAULT
The default location where a serialized version of the xml specification can be written for faster restarts..

See Also:
Constant Field Values

DEFAULT_POOL_CAPACITY

public static final int DEFAULT_POOL_CAPACITY
The default pool capacity.

See Also:
Constant Field Values
Method Detail

getGroup

public Group getGroup(java.lang.String groupName)
               throws IntakeException
Gets an instance of a named group either from the pool or by calling the Factory Service if the pool is empty.

Parameters:
groupName - the name of the group.
Returns:
a Group instance.
Throws:
IntakeException - if recycling fails.

releaseGroup

public void releaseGroup(Group instance)
                  throws IntakeException
Puts a group back to the pool.

Parameters:
instance - the object instance to recycle.
Throws:
IntakeException - The passed group name does not exist.

getSize

public int getSize(java.lang.String groupName)
            throws IntakeException
Gets the current size of the pool for a named group.

Parameters:
groupName - the name of the group.
Throws:
IntakeException - The passed group name does not exist.

getGroupNames

public java.lang.String[] getGroupNames()
Names of all the defined groups.

Returns:
array of names.

getGroupKey

public java.lang.String getGroupKey(java.lang.String groupName)
Gets the key (usually a short identifier) for a group.

Parameters:
groupName - the name of the group.
Returns:
the key.

getGroupName

public java.lang.String getGroupName(java.lang.String groupKey)
Gets the group name given its key.

Parameters:
groupKey - the key.
Returns:
groupName the name of the group.

getFieldSetter

public java.lang.reflect.Method getFieldSetter(java.lang.String className,
                                               java.lang.String propName)
                                        throws java.lang.ClassNotFoundException,
                                               java.beans.IntrospectionException
Gets the Method that can be used to set a property.

Parameters:
className - the name of the object.
propName - the name of the property.
Returns:
the setter.
Throws:
java.lang.ClassNotFoundException
java.beans.IntrospectionException

getFieldGetter

public java.lang.reflect.Method getFieldGetter(java.lang.String className,
                                               java.lang.String propName)
                                        throws java.lang.ClassNotFoundException,
                                               java.beans.IntrospectionException
Gets the Method that can be used to get a property value.

Parameters:
className - the name of the object.
propName - the name of the property.
Returns:
the getter.
Throws:
java.lang.ClassNotFoundException
java.beans.IntrospectionException


Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.