|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.enhydra.barracuda.plankton.data.ObjectRepositoryAssembler
This class basically assembles objects into the default ObjectRepository based on an XML descriptor file. For a sample file look at /WEB-INF/object-repository.xml. This class demonstrates all the basic functionality, so please be sure to look there first if you have questions. You may want to run TestObjectRepository.xml to see it in action.
In a nutshell, the ObjectRepositoryAssembler is a lightweight scripting mechanism that makes it possible to instantiate objects, set properties, invoke methods, and then register objects in the global object repository if you so desire (hence the class name). This class is extremely useful for configuration, so it will be well worth your time to learn how it works.
There are only a few basic tags:
Attributes:
Attributes:
In addition to using arg attributes, you can use the value of the method tag (ie. if you only have one param), or you can use multiple param tags.
Attributes:
Unlike the method attribute, prop doesn't take arguments. Instead, you use the value of the prop to specify what the value should be set to. Right now, Strings, Integers, Shorts, Longs, Doubles, and Booleans are supported. If you need to set something of a different type, email the list (its easy to add support for additional types).
Attributes: n/a
Attributes:
Nested Class Summary | |
class |
ObjectRepositoryAssembler.AssemblerXMLReader
|
Field Summary | |
static String |
ASSEMBLY_DESCRIPTOR
|
static String |
DEFAULT_DESCRIPTOR
|
static String |
DEFAULT_PARSER
|
static String |
GLOBAL_CONTINUE_ON_ERR
|
static boolean |
globalContinueOnErr
|
static String |
LOG_HEARTBEAT_STR
|
protected static org.apache.log4j.Logger |
logger
|
protected boolean |
logHeartbeat
|
static String |
SAX_PARSER
|
static boolean |
TEST_BOOLEAN
|
static Boolean |
TEST_BOOLEAN2
|
static Class |
TEST_CLASS
|
static double |
TEST_DOUBLE
|
static Double |
TEST_DOUBLE2
|
static float |
TEST_FLOAT
|
static Float |
TEST_FLOAT2
|
static int |
TEST_INT
|
static Integer |
TEST_INT2
|
static long |
TEST_LONG
|
static Long |
TEST_LONG2
|
static short |
TEST_SHORT
|
static Short |
TEST_SHORT2
|
static String |
TEST_STRING
|
static String |
TEST_STRING2
|
static String |
TEST_STRING3
|
static String |
TEST_STRING88
|
static String |
TEST_STRING99
|
Constructor Summary | |
ObjectRepositoryAssembler()
|
Method Summary | |
void |
assemble(ObjectRepository ior,
javax.servlet.ServletConfig iservletConfig,
String iassemblySourceFile)
Assemble the system, given a specified ObjectRepository and the XML assembly decriptor name. |
void |
assemble(ObjectRepository ior,
javax.servlet.ServletConfig iservletConfig,
String iassemblySourceFile,
String iparserClass)
Assemble the system, given the root EventGateway, an XML assembly decriptor name, and a specific SAX parser class. |
void |
assemble(javax.servlet.ServletConfig iservletConfig,
String iassemblySourceFile)
Assemble the system into the default ObjectRepository given the XML assembly decriptor name. |
void |
assemble(String iassemblySourceFile)
Assemble the system into the default ObjectRepository given the XML assembly decriptor name. |
void |
init()
This class extends HttpServlet primarily for convenience, so that you easily use it to set up a servlet environment. |
static void |
main(String[] args)
|
static void |
setTestString2(String s1)
|
static void |
setTestString3(String s1,
String s2)
|
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final org.apache.log4j.Logger logger
public static String ASSEMBLY_DESCRIPTOR
public static String SAX_PARSER
public static String DEFAULT_DESCRIPTOR
public static String DEFAULT_PARSER
public static String LOG_HEARTBEAT_STR
public static String GLOBAL_CONTINUE_ON_ERR
protected boolean logHeartbeat
public static boolean globalContinueOnErr
public static Class TEST_CLASS
public static String TEST_STRING
public static String TEST_STRING2
public static String TEST_STRING3
public static int TEST_INT
public static Integer TEST_INT2
public static short TEST_SHORT
public static Short TEST_SHORT2
public static long TEST_LONG
public static Long TEST_LONG2
public static double TEST_DOUBLE
public static Double TEST_DOUBLE2
public static float TEST_FLOAT
public static Float TEST_FLOAT2
public static boolean TEST_BOOLEAN
public static Boolean TEST_BOOLEAN2
public static String TEST_STRING88
public static String TEST_STRING99
Constructor Detail |
public ObjectRepositoryAssembler()
Method Detail |
public static void setTestString2(String s1)
public static void setTestString3(String s1, String s2)
public void assemble(String iassemblySourceFile)
iassemblySourceFile
- the XML assembly descriptor (if null defaults
to DEFAULT_DESCRIPTOR)public void assemble(javax.servlet.ServletConfig iservletConfig, String iassemblySourceFile)
iservletConfig
- the ServletConfig object (may be null if you are
calling this from other than a servlet environment)iassemblySourceFile
- the XML assembly descriptor (if null defaults
to DEFAULT_DESCRIPTOR)public void assemble(ObjectRepository ior, javax.servlet.ServletConfig iservletConfig, String iassemblySourceFile)
ior
- the repository we wish to assemble into (if null
defaults to default ObjectRepository)iservletConfig
- the ServletConfig object (may be null if you are
calling this from other than a servlet environment)iassemblySourceFile
- the XML assembly descriptor (if null defaults
to DEFAULT_DESCRIPTOR)public void assemble(ObjectRepository ior, javax.servlet.ServletConfig iservletConfig, String iassemblySourceFile, String iparserClass)
ior
- the repository we wish to assemble into (if null
defaults to default ObjectRepository)iservletConfig
- the ServletConfig object (may be null if you are
calling this from other than a servlet environment)iassemblySourceFile
- the XML assembly descriptor (if null defaults
to DEFAULT_DESCRIPTOR)iparserClass
- the SAX parser factory class (if null, defaults to DEFAULT_PARSER)public void init() throws javax.servlet.ServletException
javax.servlet.ServletException
public static void main(String[] args)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |