Resourcelib. Java

Source: Internet
Author: User

/*
* 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 );
}
}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.