org.apache.fulcrum.intake.xmlmodel
Class AppData

java.lang.Object
  extended by org.apache.fulcrum.intake.xmlmodel.AppData
All Implemented Interfaces:
Serializable

public class AppData
extends Object
implements Serializable

A class for holding application data structures.

Version:
$Id: AppData.java 535465 2007-05-05 06:58:06Z tv $
Author:
Henning P. Schmiedehausen, Thomas Vandahl
See Also:
Serialized Form

Constructor Summary
AppData()
          Default Constructor
 
Method Summary
 XmlGroup addGroup(Attributes attrib)
          An utility method to add a new input group from an xml attribute.
 void addGroup(XmlGroup input)
          Add an input group to the vector and sets the AppData property to this AppData
 String getBasePackage()
          Get the base package String that will be appended to any mapToObjects
 XmlGroup getGroup(String groupName)
          Get a XmlGroup with the given name.
 String getGroupPrefix()
          Get the prefix String that will be used to qualify intake groups when using multiple XML files
 List getGroups()
          Return a collection of input sections (<group>).
 void loadFromXML(Attributes attrib)
          Imports the top level element from an XML specification
 void setBasePackage(String v)
          Set the base package String that will be appended to any mapToObjects
 void setGroupPrefix(String groupPrefix)
          Set the prefix String that will be used to qualify intake groups when using multiple XML files
 String toString()
          Creats a string representation of this AppData.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppData

public AppData()
Default Constructor

Method Detail

loadFromXML

public void loadFromXML(Attributes attrib)
Imports the top level element from an XML specification


getGroups

public List getGroups()
Return a collection of input sections (<group>). The names of the groups returned here are only unique to this AppData object and not qualified with the groupPrefix. This method is used in the IntakeService to register all the groups with and without prefix in the service.


getGroup

public XmlGroup getGroup(String groupName)
                  throws IntakeException
Get a XmlGroup with the given name. It finds both qualified and unqualified names in this package.

Parameters:
groupName - a String value
Returns:
a XmlGroup value
Throws:
IntakeException - indicates that the groupName was null

addGroup

public XmlGroup addGroup(Attributes attrib)
An utility method to add a new input group from an xml attribute.


addGroup

public void addGroup(XmlGroup input)
Add an input group to the vector and sets the AppData property to this AppData


getBasePackage

public String getBasePackage()
Get the base package String that will be appended to any mapToObjects

Returns:
value of basePackage.

setBasePackage

public void setBasePackage(String v)
Set the base package String that will be appended to any mapToObjects

Parameters:
v - Value to assign to basePackage.

getGroupPrefix

public String getGroupPrefix()
Get the prefix String that will be used to qualify intake groups when using multiple XML files

Returns:
value of groupPrefix

setGroupPrefix

public void setGroupPrefix(String groupPrefix)
Set the prefix String that will be used to qualify intake groups when using multiple XML files

Parameters:
groupPrefix - Value to assign to basePackage.

toString

public String toString()
Creats a string representation of this AppData. The representation is given in xml format.

Overrides:
toString in class Object


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.