/*
* Created on 2004-4-21
*
* To change the template for this generated file go
* Window & gt; preferences & gt; Java & gt; Code Generation & gt; Code and comments
*/
Package org. fswan;
Import java. util. arraylist;
Import java. util. properties;
/**
* Stores common xml configuration file locations and database connection attributes.
* Serves as the basic configuration file for classes in all the packages in org. fswan.
*/
Public class resourcelib
{
/**
* Driver string
*/
Public static final string driver = "driver ";
/**
* Database connection string
*/
Public static final string url = "url ";
/**
* User
*/
Public static final string user = "user ";
/**
* Password
*/
Public static final string Password = "password ";
/**
* Storage location of all xml configuration files. The stored object is URL.
*/
Private Static arraylist resource = new arraylist ();
/**
* Stores all database configurations.
* All database storage locations are in the following format:
* The object is a properties object.
* The properties object contains:
* {@ Link # driver Driver}, {@ link # URL}, {@ link # user}, {@ link # Password }, the six attributes {@ link # view} and {@ link # type} correspond
* Database driver, side string, user name, password, view, Type
* Or
* {@ Link # JNDI}, {@ link # view}, {@ link # type}
* JNDI name, view, Type
* The type is one of the following
* {@ Link # Workflow workflow}
* {@ Link # brand}
* {@ Link # status}
* {@ Link # Switch switcher}
* {@ Link # workunit}
* {@ Link # user}
*/
Private Static arraylist prop = new arraylist ();
/**
* Retrieve all XML Resources
* @ Return XML resource spring
*/
Public static arraylist getxmlresource ()
{
Return resource;
}
/**
* Get all database connection attributes
* @ Return Database Link Attributes
*/
Public static arraylist getconnection ()
{
Return prop;
}
/**
* Add XML Resources
* @ Param source XML Resource
*/
Public static void addresource (string source)
{
Synchronized (Resource)
{
Resource. Add (source );
}
}
/**
* Adds Database Link Attributes.
* @ Param pro database link attribute
*/
Public static void adddataproperty (properties Pro)
{
Synchronized (PROP)
{
Prop. Add (Pro );
}
}
}