1. opensymphony
  2. propertyset


(no author)  committed cc0fd67

This commit was manufactured by cvs2svn to create branch 'os'.

git-svn-id: http://svn.opensymphony.com/svn/propertyset/branches/os@12bf3cbcdd-1c1a-0410-9a68-d6f521e3fa7b

  • Participants
  • Parent commits b6b0fa6
  • Branches os

Comments (0)

Files changed (1)

File docs/usage.html

View file
  • Ignore whitespace
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<title>PropertySet Usage and Configuration</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link href="main.css" rel="stylesheet" type="text/css">
+<h1>PropertySet Usage and Configuration</h1>
+<p>The PropertSet module is configured by a file that is to be located somewhere 
+  in the classpath of your application. It looks for the folloring files, in this 
+  order:</p>
+  <li>/propertyset.xml</li>
+  <li>/META-INF/propertyset.xml</li>
+  <li>/META-INF/propertyset-default.xml</li>
+<p>The <strong>propertyset-default.xml</strong> file will always be found, as 
+  it is included in <strong>propertyset.jar</strong>. You can override these configurations 
+  by writing your own propertyset.xml file and placing it in one of the above 
+  locations in the classpath. The configuration file must look like this:</p>
+	&lt;propertset name=&quot;baz&quot; class=&quot;com.foo.bar.BazPropertySet&quot;&gt;
+		&lt;arg name=&quot;some&quot; value=&quot;thing&quot;/&gt;
+		...
+	&lt;/propertyset&gt;
+	...
+<p>The code to use the above PropertySet would be:</p>
+<pre>import com.opensymphony.module.propertyset.*;
+HashMap args = new HashMap();
+// add parameters to the args map
+PropertySet ps = PropertySetManager.getIntance(&quot;baz&quot;, args);
+<p>The values that are placed in the <b>args</b> map is specific to the PropertySet 
+  implementation. We recommend reading the javadocs for the implementation you 
+  plan to use to discover the required and optional configuration arguments in 
+  <b>propertyset.xml</b> as well as the runtime arguments passed in via the <b>args 
+  Map</b> above.<br>