Anonymous avatar Anonymous committed 05154bf

Initial import from sf.net

Comments (0)

Files changed (195)

+name=osuser
+version=1.0-dev
+<?xml version="1.0"?>
+
+<!-- OSUser build file - http://www.opensymphony.com/osuser -->
+
+<project name="osuser" default="jar" basedir=".">
+  <property file="build.properties"/>
+  <path id="cp">
+    <fileset dir="lib">
+      <include name="**/*.jar"/>
+    </fileset>
+  </path>
+
+  <path id="jalopy.classpath">
+    <fileset dir="lib/build/jalopy">
+      <include name="*.jar"/>
+    </fileset>
+  </path>
+
+  <taskdef name="jalopy" classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
+    <classpath refid="jalopy.classpath"/>
+  </taskdef>
+
+  <!-- Setup details -->
+  <target name="init">
+    <tstamp/>
+    <property name="lib" value="lib"/>
+    <property name="lib.core" value="${lib}/core"/>
+    <property name="lib.build" value="${lib}/build"/>
+    <property name="lib.optional" value="${lib}/optional"/>
+
+    <property name="src" value="src"/>
+    <property name="src.java" value="${src}/java"/>
+    <property name="src.test" value="${src}/test"/>
+    <property name="src.etc" value="${src}/etc"/>
+
+    <property name="propertyset.jar" value="propertyset-1.3-dev.jar"/>
+    <property name="oscore.jar" value="oscore-2.2.1.jar"/>
+    <property name="build" value="build"/>
+    <property name="build.test" value="${build}/test"/>
+    <property name="build.java" value="${build}/java"/>
+
+    <property name="dist" value="dist"/>
+    <property name="deployment" value="deployment"/>
+    <property name="docs" value="docs"/>
+
+    <property name="clover.initstring" location="testcoverage.db"/>
+
+    <property name="packages" value="com.opensymphony..user.*"/>
+
+    <available property="junit.available" classname="junit.framework.TestCase"/>
+    <available property="clover.available" classname="org.apache.tools.ant.taskdefs.CloverCompilerAdapter"/>
+  </target>
+
+  <target name="junit-check" depends="init" unless="junit.available">
+    <fail message="Cannot run test cases. Please copy lib/build/junit-3.8.1.jar to ${ant.home}/lib"/>
+  </target>
+
+  <target name="clover-check" depends="init" unless="clover.available">
+    <fail message="Cannot run coverage tests. Please copy lib/build/clover-1.2.jar to ${ant.home}/lib"/>
+  </target>
+
+  <!-- Remove all built files -->
+  <target name="clean" depends="init">
+    <delete dir="${build}"/>
+    <delete dir="${dist}"/>
+    <delete>
+      <fileset dir="." includes="testcoverage.db*"/>
+    </delete>
+  </target>
+
+  <!-- Compile Java -->
+  <target name="java" depends="init">
+    <mkdir dir="${build.java}/META-INF"/>
+    <javac destdir="${build.java}" classpathref="cp" debug="on">
+      <src path="${src.java}"/>
+    </javac>
+    <copy todir="${build.java}">
+      <fileset dir="${src.java}">
+        <exclude name="**/*.java"/>
+        <exclude name="**/package.html"/>
+      </fileset>
+    </copy>
+    <copy file="${src.etc}/ejb/ejb-jar.xml" todir="${build.java}/META-INF"/>
+    <copy file="${src.etc}/orion/orion-ejb-jar.xml" todir="${build.java}/META-INF"/>
+    <copy file="${src.etc}/jrun/jrun-ejb-jar.xml" todir="${build.java}/META-INF"/>
+    <copy todir="${build.java}">
+      <fileset dir="${src.etc}/pramati" />
+    </copy>
+    <copy todir="${build.java}/META-INF">
+      <fileset dir="${src.etc}/castor" />
+    </copy>
+    <copy todir="${build.java}/META-INF">
+      <fileset dir="${src.etc}/jboss" />
+    </copy>
+    <copy todir="${build.java}/META-INF">
+      <fileset dir="${src.etc}/weblogic" />
+    </copy>
+  </target>
+
+  <target name="test" depends="clover-check,junit-check">
+    <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
+
+    <mkdir dir="${build.test}/META-INF"/>
+    <javac srcdir="${src.java}" destdir="${build.test}" debug="on" classpathref="cp" compiler="org.apache.tools.ant.taskdefs.CloverCompilerAdapter" />
+    <javac srcdir="${src.test}" destdir="${build.test}" classpathref="cp" debug="on"/>
+    <copy todir="${build.test}">
+      <fileset dir="${src.test}">
+        <include name="**/*.xml" />
+      </fileset>
+    </copy>
+    <mkdir dir="${dist}/docs/junit"/>
+    <junit printsummary="withOutAndErr" haltonfailure="no" haltonerror="yes" showoutput="yes">
+      <classpath>
+        <pathelement location="${build.test}"/>
+        <path refid="cp"/>
+      </classpath>
+
+      <formatter type="xml"/>
+
+      <batchtest todir="${dist}/docs/junit">
+        <fileset dir="${src.test}">
+          <include name="**/*Test.java"/>
+        </fileset>
+      </batchtest>
+    </junit>
+  </target>
+
+  <target name="format" depends="java">
+    <jalopy fileformat="unix" convention="${src.etc}/jalopy.xml" history="file" historymethod="adler32" loglevel="error" threads="2" classpathref="cp">
+      <fileset dir="${src.java}">
+        <include name="**/*.java"/>
+      </fileset>
+      <!-- <fileset dir="${src.test}">
+          <include name="**/*.java" />
+
+      </fileset>
+      -->
+    </jalopy>
+  </target>
+
+  <!-- Build jar archive -->
+  <target name="jar" depends="format">
+    <mkdir dir="${dist}"/>
+    <jar basedir="${build.java}" jarfile="${dist}/${name}-${version}.jar"/>
+  </target>
+
+  <target name="example" depends="jar">
+    <mkdir dir="${tmp}"/>
+    <!-- copies the osuser jar without the version info attached to the jar
+         file name, as that is how its referenced in the
+         example/META-INF/application.xml file -->
+    <copy tofile="${tmp}/example/${name}.jar">
+      <fileset dir="${dist}">
+        <include name="${name}*.jar"/>
+      </fileset>
+    </copy>
+    <copy todir="${tmp}/example">
+      <fileset dir="${lib}/build/">
+        <include name="castor-0.9.3.9.jar"/>
+      </fileset>
+      <fileset dir="${lib}/lib">
+        <include name="oscore**"/>
+        <include name="prop**"/>
+      </fileset>
+    </copy>
+    <copy todir="${tmp}/example">
+      <fileset dir="example">
+        <include name="META-INF/**"/>
+        <include name="manager/**"/>
+      </fileset>
+    </copy>
+    <mkdir dir="${tmp}/example/lib"/>
+    <copy todir="${tmp}/example/lib">
+      <fileset dir="${lib}/build/">
+        <include name="log4j.jar"/>
+      </fileset>
+      <fileset dir="${lib}/optional/">
+        <include name="*.jar"/>
+      </fileset>
+      <fileset dir="${lib}/lib">
+        <include name="common**"/>
+      </fileset>
+    </copy>
+    <jar basedir="example/testclient" jarfile="${tmp}/example/testclient.jar" manifest="example/testclient/META-INF/MANIFEST.MF"/>
+    <jar basedir="${tmp}/example/manager" jarfile="${tmp}/example/manager.war"/>
+    <copy file="${deployment}/pramati/pramati-j2ee-server.xml" todir="${tmp}/example/"/>
+    <copy file="${deployment}/pramati/pramati-or-map.xml" todir="${tmp}/example/"/>
+    <copy file="${deployment}/pramati/queries.props" todir="${tmp}/example/"/>
+    <jar basedir="${tmp}/example" jarfile="${dist}/osuser_example.ear"/>
+
+  </target>
+
+  <target name="javadocs" depends="init">
+    <mkdir dir="${dist}/docs/api"/>
+    <javadoc sourcepath="${src.java}" destdir="${dist}/docs/api" packagenames="${packages}" classpathref="cp" author="true" version="true" windowTitle="${name} ${version} API" doctitle="${name}" footer="See &lt;a href=&quot;http://www.opensymphony.com&quot;&gt;www.opensymphony.com&lt;/a&gt; for more information." use="true" verbose="false"/>
+  </target>
+
+  <target name="clover.report" depends="test">
+    <java classname="com.cortexeb.tools.clover.reporters.html.HtmlReporter" fork="true">
+      <arg line="--outputdir ${dist}/docs/clover --showSrc --initstring ${clover.initstring} --title '${name}'"/>
+      <classpath refid="cp"/>
+    </java>
+  </target>
+
+  <target name="junit.report" depends="test">
+    <junitreport todir="${dist}/docs/junit">
+      <fileset dir="${dist}/docs/junit">
+        <include name="TEST-*.xml"/>
+      </fileset>
+      <report format="frames" todir="${dist}/docs/junit"/>
+    </junitreport>
+  </target>
+
+  <target name="docs" depends="javadocs, clover.report, junit.report">
+    <copy todir="${dist}/docs">
+      <fileset dir="${docs}"/>
+    </copy>
+  </target>
+
+</project>

example/META-INF/application.xml

+<?xml version="1.0"?>
+<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
+
+<application>
+
+	<display-name>OSUser example app</display-name>
+
+	<module>
+		<ejb>oscore-2.2.1.jar</ejb>
+	</module>
+    <module>
+        <ejb>propertyset-1.1.1.jar</ejb>
+    </module>
+
+	<module>
+		<ejb>osuser.jar</ejb>
+	</module>
+
+<!--
+	removed by mike as castor isn't a client at all?!
+	<module>
+		<java>testclient.jar</java>
+	</module>
+
+	<module>
+		<java>castor-0.9.3.9.jar</java>
+	</module>
+-->
+
+	<module>
+		<web>
+			<web-uri>manager.war</web-uri>
+			<context-root>manager</context-root>
+		</web>
+	</module>
+
+    <security-role>
+        <role-name>foobars</role-name>
+    </security-role>
+
+
+</application>

example/META-INF/orion-application.xml

+<?xml version="1.0"?>
+<!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd">
+
+<orion-application deployment-version="2.0">
+    <library path="./lib" />
+	<ejb-module remote="false" path="oscore-2.2.1.jar" />
+	<ejb-module remote="false" path="propertyset-1.1.0.jar" />
+	<ejb-module remote="false" path="osuser.jar" />
+	<web-module id="manager" path="manager.war" />
+	<security-role-mapping name="foobars">
+		<group name="foobars" />
+	</security-role-mapping>
+	<persistence path="persistence" />
+	<user-manager class="com.opensymphony.user.adapter.orion.OrionUserManagerAdapter">
+	</user-manager>
+	<log>
+		<file path="application.log" />
+	</log>
+	<namespace-access>
+		<read-access>
+			<namespace-resource root="">
+				<security-role-mapping name="&lt;jndi-user-role&gt;">
+					<group name="administrators" />
+				</security-role-mapping>
+			</namespace-resource>
+		</read-access>
+		<write-access>
+			<namespace-resource root="">
+				<security-role-mapping name="&lt;jndi-user-role&gt;">
+					<group name="administrators" />
+				</security-role-mapping>
+			</namespace-resource>
+		</write-access>
+	</namespace-access>
+</orion-application>

example/manager/WEB-INF/jboss-web.xml

+<jboss-web>
+    <security-domain>java:/jaas/osuser</security-domain>
+
+    <ejb-ref>
+        <ejb-ref-name>ejb/osuser/User</ejb-ref-name>
+        <jndi-name>osuser/User</jndi-name>
+    </ejb-ref>
+    <ejb-ref>
+        <ejb-ref-name>ejb/osuser/Group</ejb-ref-name>
+        <jndi-name>osuser/Group</jndi-name>
+    </ejb-ref>
+    <ejb-ref>
+        <ejb-ref-name>ejb/osuser/Membership</ejb-ref-name>
+        <jndi-name>osuser/Membership</jndi-name>
+    </ejb-ref>
+</jboss-web>
Add a comment to this file

example/manager/WEB-INF/lib/utiltags.jar

Binary file added.

example/manager/WEB-INF/web.xml

+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
+<web-app>
+	<!-- Standard Web App stuff -->
+	<display-name>OSUser manager web-app</display-name>
+
+	<welcome-file-list>
+		<welcome-file>default.jsp</welcome-file>
+	</welcome-file-list>
+
+
+    <security-constraint>
+        <web-resource-collection>
+            <web-resource-name>test</web-resource-name>
+            <description>OSUser Test</description>
+            <url-pattern>/test/*</url-pattern>
+            <http-method>GET</http-method>
+        </web-resource-collection>
+        <auth-constraint>
+            <description>Foobars Role</description>
+            <role-name>foobars</role-name>
+        </auth-constraint>
+    <user-data-constraint>
+      <description>No Description</description>
+      <transport-guarantee>NONE</transport-guarantee>
+    </user-data-constraint>
+    </security-constraint>
+    <login-config>
+        <auth-method>BASIC</auth-method>
+        <realm-name>OSUser Manager Test</realm-name>
+    </login-config>
+    <security-role>
+        <description>Normal users </description>
+        <role-name>foobars</role-name>
+    </security-role>
+
+
+	<!-- EJB References -->
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/User</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.UserHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.UserRemote</remote>
+	</ejb-ref>
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/Group</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.GroupHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.GroupRemote</remote>
+	</ejb-ref>
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/Membership</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.MembershipHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.MembershipRemote</remote>
+	</ejb-ref>
+	<!-- END EJB references -->
+
+
+	<!-- Environment Entries -->
+	<!-- END Environment Entries -->
+
+
+	<!-- SiteMesh -->
+	<!-- END SiteMesh -->
+
+
+	<!-- WebWork -->
+	<!-- END WebWork -->
+
+    <!-- Security Settings -->
+	<!-- END Security Settings -->
+</web-app>

example/manager/WEB-INF/weblogic.xml

+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- edited with XML Spy v4.2 U (http://www.xmlspy.com) by Patrick Lightbody (Cisco Systems, Inc.) -->
+
+<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 6.0//EN" "http://www.bea.com/servers/wls610/dtd/weblogic-web-jar.dtd">
+
+<weblogic-web-app>
+
+	<description>OSUser example app</description>
+
+	<reference-descriptor>
+
+		<ejb-reference-description>
+
+			<ejb-ref-name>ejb/osuser/User</ejb-ref-name>
+
+			<jndi-name>osuser/User</jndi-name>
+
+		</ejb-reference-description>
+
+		<ejb-reference-description>
+
+			<ejb-ref-name>ejb/osuser/Group</ejb-ref-name>
+
+			<jndi-name>osuser/Group</jndi-name>
+
+		</ejb-reference-description>
+
+		<ejb-reference-description>
+
+			<ejb-ref-name>ejb/osuser/Membership</ejb-ref-name>
+
+			<jndi-name>osuser/Membership</jndi-name>
+
+		</ejb-reference-description>
+
+	</reference-descriptor>
+
+        <security-role-assignment>
+            <role-name>foobars</role-name>
+            <principal-name>foobars</principal-name>
+        </security-role-assignment>
+
+
+
+</weblogic-web-app>
+

example/manager/default.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 java.util.Collection,
+				 java.util.Iterator,
+				 com.opensymphony.user.provider.CredentialsProvider,
+				 com.opensymphony.user.provider.AccessProvider,
+				 com.opensymphony.user.provider.UserProvider"%>
+<body>
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >Directory</h2></th></tr>
+</table>
+
+<ul>
+<li><a href="users.jsp">Users</a>
+<li><a href="groups.jsp">Groups</a>
+</ul>
+
+<hr>
+
+<table border="1">
+<tr><th style="{background-color: #164A7D; color:#ffffcc;font: bolder small-caps 20pt}">Providers</th><tr>
+<%
+	UserManager um = UserManager.getInstance();
+%>
+
+<tr><th style="{background-color: #ffffcc; font: bolder small-caps 17pt}">CredentialsProviders</th><tr>
+
+<tr><td>
+<ul>
+<%
+	Collection credentialProviders = um.getCredentialsProviders();
+	for (Iterator iterator = credentialProviders.iterator(); iterator.hasNext();)
+	{
+		CredentialsProvider provider = (CredentialsProvider) iterator.next();
+%>
+        <li><%= provider.getClass() %></li>
+<%
+	}
+%>
+</ul>
+<td>
+<tr>
+<tr>
+<th style="{background-color: #ffffcc; font: bolder small-caps 17pt}">AccessProviders</th>
+<tr><td>
+<ul>
+<%
+	Collection accessProviders = um.getAccessProviders();
+	for (Iterator iterator = accessProviders.iterator(); iterator.hasNext();)
+	{
+		UserProvider provider = (UserProvider) iterator.next();
+%>
+        <li><%= provider.getClass() %></li>
+<%
+	}
+%>
+</ul>
+</td>
+<tr>
+<th style="{background-color: #ffffcc; font: bolder small-caps 17pt}">ProfileProviders</th></tr>
+<tr><td>
+<ul>
+<%
+	Collection profileProviders = um.getProfileProviders();
+	for (Iterator iterator = profileProviders.iterator(); iterator.hasNext();)
+	{
+		UserProvider provider = (UserProvider) iterator.next();
+%>
+        <li><%= provider.getClass() %></li>
+<%
+	}
+%>
+</ul>
+</td>
+</tr>
+</table>
+
+

example/manager/editusergroups.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 com.opensymphony.user.User,
+				 java.util.Collection,
+				 com.opensymphony.user.Group,
+                 java.util.Iterator"%>
+
+
+<%
+	UserManager um = UserManager.getInstance();
+	User user = um.getUser(request.getParameter("name"));
+
+	if (request.getParameter("add") != null)
+	{
+		String[] addGroupNames = request.getParameterValues("outgroups");
+		for (int i = 0; i < addGroupNames.length; i++)
+		{
+			String addGroupName = addGroupNames[i];
+			Group addGroup = um.getGroup(addGroupName);
+			user.addToGroup(addGroup);
+		}
+	}
+	else if (request.getParameter("remove") != null)
+	{
+		String[] removeGroupNames = request.getParameterValues("ingroups");
+		for (int i = 0; i < removeGroupNames.length; i++)
+		{
+			String removeGroupName = removeGroupNames[i];
+			Group removeGroup = um.getGroup(removeGroupName);
+			user.removeFromGroup(removeGroup);
+		}
+	}
+%>
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >Edit Groups: <%= user.getName() %></th></tr>
+</table>
+
+<form action="editusergroups.jsp" method="get">
+
+	<table cellpadding=0 cellspacing=0 border=0 bgcolor=666666 width=80% align="center"><tr><td>
+	<table cellpadding=4 cellspacing=1 border=0 width=100% bgcolor=666666>
+	<tr>
+		<td bgcolor=f0f0f0 valign="top" align="center" nowrap width="45%"><b>Other Groups</b></td>
+		<td bgcolor=f0f0f0 width="10%">&nbsp;</td>
+		<td bgcolor=f0f0f0 valign="top" align="center" nowrap width="45%"><b>Member Of</b></td>
+	</tr>
+	<tr>
+		<td bgcolor=ffffff valign="top" align="center">
+			<% Collection allgroups = um.getGroups(); %>
+			<select name="outgroups"
+				size="7"
+				multiple>
+                    <% for (Iterator iterator = allgroups.iterator(); iterator.hasNext();) {
+                        Group outgroup = (Group) iterator.next();
+                    %>
+
+						<% if (user.getGroups() == null || !user.getGroups().contains(outgroup.getName())) { %>
+						<option value="<%= outgroup.getName() %>"><%= outgroup.getName() %></option>
+						<% } %>
+					<% } %>
+			</select>
+		</td>
+		<td bgcolor=ffffff align="center">
+            <input type="submit" name="add" value="&gt;&gt;">
+			<br>
+			<input type="submit" name="remove" value="&lt;&lt;">
+		</td>
+		<td bgcolor=ffffff valign="top" align="center">
+			<select name="ingroups"
+				size="7"
+				multiple
+				class="maincontent">
+					<% if (user.getGroups() != null) { %>
+                        <% for (Iterator iterator = user.getGroups().iterator(); iterator.hasNext();) {
+                            String ingroup = (String) iterator.next();
+                        %>
+							<option value="<%= ingroup %>"><%= ingroup %></option>
+						<% } %>
+					<% } %>
+			</select>
+		</td>
+	</tr>
+	<tr>
+		<td bgcolor=ffffff valign=top colspan=3 align=center>
+			<input type="hidden" name="executed" value="true">
+			<input type="hidden" name="name" value="<%= user.getName() %>">
+			<input type="button" value="Done" onclick="location.href='viewuser.jsp?name=<%= response.encodeURL(user.getName()) %>'">
+		</td>
+	</tr>
+	</table>
+	</td></tr></table>
+
+</form>
+
+<%@ include file="nav.jsp" %>

example/manager/groups.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 java.util.Collection,
+				 java.util.Iterator,
+				 com.opensymphony.user.User,
+				 com.opensymphony.user.Group"%>
+
+<%
+	UserManager um = UserManager.getInstance();
+
+	if (request.getParameter("addGroup") != null)
+	{
+		um.createGroup(request.getParameter("name"));
+	}
+	else if (request.getParameter("delGroup") != null)
+	{
+		Group removegroup = um.getGroup(request.getParameter("delGroup"));
+		removegroup.remove();
+	}
+%>
+<body>
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >Groups</th></tr>
+</table>
+
+<hr>
+<ol>
+<%
+	Collection groups = um.getGroups();
+	for (Iterator iterator = groups.iterator(); iterator.hasNext();)
+	{
+		Group group = (Group) iterator.next();
+		%>
+		<li><%= group.getName() %> [<a href="viewgroup.jsp?name=<%= response.encodeURL(group.getName()) %>">View</a> | <a href="groups.jsp?delGroup=<%= response.encodeURL(group.getName()) %>">Del</a>]</li>
+		<%
+	}
+%>
+</ol>
+
+<hr>
+
+<form action="groups.jsp">
+<table border="1">
+<tr><th colspan="2">Add Group</th></tr>
+<tr><th>Name: </th><td><input type="text" name="name"></td></tr>
+<tr><th colspan="2"><input type="submit" name="addGroup" value="Add group"></tr>
+</table>
+</form>
+
+<%@ include file="nav.jsp" %>
+
+</body>

example/manager/includes/propertysetMethods.jsp

+<%@ page import="com.opensymphony.module.propertyset.PropertySet"%>
+<%!
+private String getTypeName(int type)
+{
+    switch (type)
+    {
+        case 1:
+            return "Boolean";
+        case 2:
+            return "Integer";
+        case 3:
+            return "Long";
+        case 4:
+            return "Double";
+        case 5:
+            return "String";
+        case 6:
+            return "Text";
+        case 7:
+            return "Date";
+        case 8:
+            return "Object";
+        case 9:
+            return "XML";
+        case 10:
+            return "Data";
+        case 11:
+            return "Properties";
+        default:
+            return "Unknown";
+    }
+}
+
+public String getPropertyValue(PropertySet ps, String key) throws Exception
+{
+    int type = ps.getType(key);
+
+    switch(type)
+    {
+        case PropertySet.STRING:
+            return ps.getString(key);
+        case PropertySet.BOOLEAN:
+            return ps.getBoolean(key) + "";
+        case PropertySet.INT:
+			return ps.getInt(key) + "";
+        case PropertySet.LONG:
+			return ps.getLong(key) + "";
+        case PropertySet.DATE:
+            return ps.getDate(key) + "";
+		case PropertySet.TEXT:
+			return ps.getText(key) + "";
+        default:
+            return "Cannot display property value";
+    }
+}
+
+public void setPropertyValue(PropertySet ps, String key, int type, String newVal) throws Exception
+{
+    try
+    {
+        switch (type)
+        {
+            case PropertySet.STRING:
+                ps.setString(key, newVal); break;
+			case PropertySet.TEXT:
+                ps.setText(key, newVal); break;
+            case PropertySet.BOOLEAN:
+                ps.setBoolean(key, Boolean.valueOf(newVal).booleanValue()); break;
+            case PropertySet.INT:
+                ps.setInt(key, Integer.valueOf(newVal).intValue()); break;
+			case PropertySet.LONG:
+                ps.setLong(key, Long.valueOf(newVal).intValue()); break;
+			case PropertySet.DOUBLE:
+                ps.setDouble(key, Double.valueOf(newVal).intValue()); break;
+            case PropertySet.DATE:
+                ps.setDate(key, java.text.DateFormat.getDateInstance().parse(newVal)); break;
+            default:
+                throw new Exception("Type not recognised");
+        }
+    } catch (Exception e)
+    {
+        throw e;
+    }
+}
+%>

example/manager/nav.jsp

+<table width="100%" bgcolor="#ffffcc">
+<tr><th>
+<a href="default.jsp">Home</a> |
+<a href="users.jsp">Users</a> |
+<a href="groups.jsp">Groups</a>
+</th></tr></table>

example/manager/test/index.html

+You made it!

example/manager/users.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 java.util.Collection,
+				 java.util.Iterator,
+				 com.opensymphony.user.User"%>
+
+<%
+	UserManager um = UserManager.getInstance();
+
+	if (request.getParameter("adduser") != null)
+	{
+		User newuser = um.createUser(request.getParameter("name"));
+		newuser.setPassword(request.getParameter("password"));
+		newuser.setEmail(request.getParameter("email"));
+        newuser.setFullName(request.getParameter("fullname"));
+	}
+	else if (request.getParameter("deluser") != null)
+	{
+		User removeuser = um.getUser(request.getParameter("deluser"));
+		removeuser.remove();
+	}
+%>
+<html>
+<header>
+</header>
+<body>
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >Users</h1></th></tr>
+</table>
+<hr>
+
+<ol>
+<%
+	Collection users = um.getUsers();
+	for (Iterator iterator = users.iterator(); iterator.hasNext();)
+	{
+		User user = (User) iterator.next();
+		%>
+		<li><%= user.getName() %> (<%= user.getEmail() %>) [<a href="viewuser.jsp?name=<%= response.encodeURL(user.getName()) %>">View</a> | <a href="users.jsp?deluser=<%= response.encodeURL(user.getName()) %>">Del</a>]</li>
+		<%
+	}
+%>
+</ol>
+
+<hr>
+
+<form action="users.jsp">
+<table border="1"><tr><th colspan="2">Add User</th></tr>
+<tr><th>Full Name </th><td><input type="text" name="fullname"></td><tr>
+<tr><th>User Name: </th><td><input type="text" name="name"></td><tr>
+<tr><th>Password: </th><td><input type="password" name="password"></td><tr>
+<tr><th>Email: </th><td><input type="text" name="email"></td><tr>
+<tr><th colspan="2"><input type="submit" name="adduser" value="Add User"></th></td>
+</table>
+</form>
+
+<%@ include file="nav.jsp" %>
+</body>

example/manager/viewgroup.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 java.util.Collection,
+				 com.opensymphony.user.Group,
+				 java.util.Iterator,
+				 com.opensymphony.user.User,
+				 com.opensymphony.module.propertyset.PropertySet"%>
+<%
+	UserManager um = UserManager.getInstance();
+	Group group = um.getGroup(request.getParameter("name"));
+
+	PropertySet ps = null;
+
+	if (request.getParameter("propertyAdd") != null) {
+		ps = group.getPropertySet();
+        setPropertyValue(ps, request.getParameter("propertyKey"), Integer.parseInt(request.getParameter("propertyType")), request.getParameter("propertyValue"));
+	}
+  else if (request.getParameter("propertyDel") != null)
+	{
+		ps = group.getPropertySet();
+		ps.remove(request.getParameter("propertyDel"));
+	}
+%>
+
+<body>
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >View Group : <%= group.getName() %></th></tr>
+</table>
+
+<h4>Details</h4>
+Name: <%= group.getName() %><br>
+Class: <%= group.getClass() %><br>
+
+<h4>Users</h4>
+
+<%
+	Collection users = group.getUsers();
+%>
+<%= users.size() %> users<br>
+
+<ol>
+<%
+	for (Iterator iterator = users.iterator(); iterator.hasNext();)
+	{
+		String userName = (String) iterator.next();
+%>
+		<li><a href="viewuser.jsp?name=<%= response.encodeURL(userName) %>"><%= userName%></a></li>
+<%
+	}
+%>
+</ol>
+
+<h4>Properties</h4>
+<%
+	ps = group.getPropertySet();
+	if (ps != null)
+	{
+		Collection keys = ps.getKeys();
+		for (Iterator iterator = keys.iterator(); iterator.hasNext();)
+		{
+			String key = (String) iterator.next();
+%>
+		<%= key %> : <%= getPropertyValue(ps, key) %> (<%= getTypeName(ps.getType(key)) %>) [<a href="viewgroup.jsp?name=<%= response.encodeURL(group.getName()) %>&propertyDel=<%= response.encodeURL(key) %>">Del</a>]<br>
+<%
+		}
+%>
+
+<form action="viewgroup.jsp" method="post">
+<input type="hidden" name="name" value="<%= group.getName() %>">
+<h4>Add Property</h4>
+Key: <input name="propertyKey" type="text"><br>
+Type:
+<select name="propertyType">
+	<% for (int i = 1; i <= 7; i++) { %>
+		<option value="<%= i %>"><%= getTypeName(i) %></option>
+	<% } %>
+</select><br>
+Value: <input name="propertyValue" type="text"><br>
+<input type="submit" name="propertyAdd" value="Add Property">
+</form>
+
+<%
+	}
+	else
+	{
+%>
+		No PropertySet for this group
+<%
+	}
+%>
+
+
+<%@ include file="nav.jsp" %>
+
+<%@ include file="includes/propertysetMethods.jsp" %>
+
+<h4>Providers</h4>
+CredentialsProvider: <%= (group.getCredentialsProvider() != null ? group.getCredentialsProvider().getClass().toString() : "None") %><br>
+AccessProvider: <%= (group.getAccessProvider() != null ? group.getAccessProvider().getClass().toString() : "None" )%><br>
+ProfileProvider: <%= (group.getProfileProvider() != null ? group.getProfileProvider().getClass().toString() : "None")%><br>
+
+</body>

example/manager/viewuser.jsp

+<%@ page import="com.opensymphony.user.UserManager,
+				 com.opensymphony.user.User,
+				 com.opensymphony.module.propertyset.PropertySet,
+				 java.util.Collection,
+				 java.util.Iterator,
+				 com.opensymphony.user.Group"%>
+<%
+	UserManager um = UserManager.getInstance();
+	User user = um.getUser(request.getParameter("name"));
+	PropertySet ps = null;
+
+	if (request.getParameter("propertyAdd") != null) {
+		ps = user.getPropertySet();
+        setPropertyValue(ps, request.getParameter("propertyKey"), Integer.parseInt(request.getParameter("propertyType")), request.getParameter("propertyValue"));
+	}
+	else if (request.getParameter("propertyDel") != null)
+	{
+		ps = user.getPropertySet();
+		ps.remove(request.getParameter("propertyDel"));
+	}
+%>
+
+<table width="100%" bgcolor="#164A7D">
+<tr><th style="{color:#ffffcc;font: bolder small-caps 20pt}" >User: <%= user.getName() %></th><tr>
+</table>
+
+<table width="99%" style="{border: inset 3px}">
+<tr><th style="{background-color: #ffffcc; color: #164A7D}" colspan="2">Details</th></tr>
+<tr><th style="{background-color: #ffffcc; color: #164A7D}">Name:</th><td><%= user.getName() %></td><tr>
+<tr><th style="{background-color: #ffffcc; color: #164A7D}">Class:</th><td><%= user.getClass() %></td><tr>
+<tr><th style="{background-color: #ffffcc; color: #164A7D}">Full Name:</th><td><%= user.getFullName() %></td><tr>
+<tr><th style="{background-color: #ffffcc; color: #164A7D}">Email:</th><td><%= user.getEmail() %></td><tr>
+</table>
+
+<h4>Groups</h4>
+<%
+	Collection groups = user.getGroups();
+%>
+<%= groups.size() %> groups<br>
+
+<ol>
+<%
+	for (Iterator iterator = groups.iterator(); iterator.hasNext();)
+	{
+		String groupName = (String) iterator.next();
+%>
+		<li><a href="viewgroup.jsp?name=<%= response.encodeURL(groupName) %>"><%= groupName %></a></li>
+<%
+	}
+%>
+</ol>
+<a href="editusergroups.jsp?name=<%= response.encodeURL(user.getName()) %>">Add / Edit Groups</a>
+
+<h4>Properties</h4>
+<table>
+<%
+	ps = user.getPropertySet();
+
+    if (ps != null) {
+	    Collection keys = ps.getKeys();
+	    for (Iterator iterator = keys.iterator(); iterator.hasNext();)
+	    {
+		    String key = (String) iterator.next();
+%>
+<tr><td><%= key %> </td><td> <%= getPropertyValue(ps, key) %> </td><td>(<%= getTypeName(ps.getType(key)) %>) </td><td>[<a href="viewuser.jsp?name=<%= response.encodeURL(user.getName()) %>&propertyDel=<%= response.encodeURL(key) %>">Del</a>]</td></tr>
+<%
+	    }
+    }
+%>
+</table>
+<form action="viewuser.jsp" method="post">
+<input type="hidden" name="name" value="<%= user.getName() %>">
+<h4>Add Property</h4>
+Key: <input name="propertyKey" type="text"><br>
+Type:
+<select name="propertyType">
+	<% for (int i = 1; i <= 7; i++) { %>
+		<option value="<%= i %>"><%= getTypeName(i) %></option>
+	<% } %>
+</select><br>
+Value: <input name="propertyValue" type="text"><br>
+<input type="submit" name="propertyAdd" value="Add Property">
+</form>
+<%@ include file="nav.jsp" %>
+
+<%@ include file="includes/propertysetMethods.jsp" %>
+<hr />
+<h4>Providers</h4>
+CredentialsProvider: <%= (user.getCredentialsProvider() != null ? user.getCredentialsProvider().getClass().toString() : "None") %><br>
+AccessProvider: <%= (user.getAccessProvider() != null ? user.getAccessProvider().getClass().toString() : "None" )%><br>
+ProfileProvider: <%= (user.getProfileProvider() != null ? user.getProfileProvider().getClass().toString() : "None")%><br>
+

example/testclient/META-INF/MANIFEST.MF

+Manifest-Version: 1.0
+Main-Class: com.opensymphony.user.test.RemoteTestRunner
+

example/testclient/META-INF/application-client.xml

+<application-client>
+
+	<display-name>OSUser testing client</display-name>
+
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/User</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.UserHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.UserRemote</remote>
+	</ejb-ref>
+
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/Group</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.GroupHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.GroupRemote</remote>
+	</ejb-ref>
+
+	<ejb-ref>
+		<ejb-ref-name>ejb/osuser/Membership</ejb-ref-name>
+		<ejb-ref-type>Entity</ejb-ref-type>
+		<home>com.opensymphony.user.provider.ejb.entity.MembershipHome</home>
+		<remote>com.opensymphony.user.provider.ejb.entity.MembershipRemote</remote>
+	</ejb-ref>
+
+</application-client>

example/testclient/META-INF/orion-user.xml

+<opensymphony-user>
+	<provider class="com.opensymphony.user.provider.orion.OrionAccessProvider" />
+	<provider class="com.opensymphony.user.provider.orion.OrionCredentialsProvider" />
+	<provider class="com.opensymphony.user.provider.memory.MemoryProfileProvider" />
+</opensymphony-user>

example/testclient/META-INF/osuser-default.xml

+<opensymphony-user>
+
+	<provider class="com.opensymphony.user.provider.ejb.EJBCredentialsProvider">
+		<property name="location">ejb/osuser/User</property>
+	</provider>
+
+	<provider class="com.opensymphony.user.provider.ejb.EJBProfileProvider">
+		<property name="location.user">ejb/osuser/User</property>
+		<property name="location.group">ejb/osuser/Group</property>
+	</provider>
+
+	<provider class="com.opensymphony.user.provider.ejb.EJBAccessProvider">
+		<property name="location.user">ejb/osuser/User</property>
+		<property name="location.group">ejb/osuser/Group</property>
+		<property name="location.membership">ejb/osuser/Membership</property>
+	</provider>
+
+	<!-- uncomment these to test the memory provider -->
+	<!--
+	<provider class="com.opensymphony.user.provider.memory.MemoryCredentialsProvider" />
+	<provider class="com.opensymphony.user.provider.memory.MemoryProfileProvider" />
+	<provider class="com.opensymphony.user.provider.memory.MemoryAccessProvider" />
+	-->
+
+</opensymphony-user>
Add a comment to this file

lib/build/castor-0.9.3.9.jar

Binary file added.

Add a comment to this file

lib/build/catalina-security.jar

Binary file added.

Add a comment to this file

lib/build/clover-1.2.jar

Binary file added.

Add a comment to this file

lib/build/commons-lang.jar

Binary file added.

Binary file added.

Binary file added.

Binary file added.

Add a comment to this file

lib/build/jalopy/aelfred-1.2.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/jalopy-1.0b10.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/jalopy-ant-0.6.1.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/jaxp-1.2.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/jdom-1.0b8.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/log4j-1.2.6.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/oro-2.0.6.jar

Binary file added.

Add a comment to this file

lib/build/jalopy/sax-2.0.1.jar

Binary file added.

Binary file added.

Add a comment to this file

lib/build/jboss-jaas.jar

Binary file added.

Binary file added.

Add a comment to this file

lib/build/jetty-security.jar

Binary file added.

Binary file added.

Binary file added.

Binary file added.

Binary file added.

Binary file added.

Add a comment to this file

lib/build/ofbcore-entity.jar

Binary file added.

Add a comment to this file

lib/build/ofbcore-share.jar

Binary file added.

Add a comment to this file

lib/build/orionsecurity.jar

Binary file added.

Add a comment to this file

lib/build/pramati_security.jar

Binary file added.

Add a comment to this file

lib/build/pramati_spi.jar

Binary file added.

Add a comment to this file

lib/build/resin-security.jar

Binary file added.

Binary file added.

Add a comment to this file

lib/build/weblogic-logging.jar

Binary file added.

Add a comment to this file

lib/build/weblogic-security.jar

Binary file added.

Binary file added.

Add a comment to this file

lib/optional/commons-beanutils.jar

Binary file added.

Add a comment to this file

lib/optional/commons-collections.jar

Binary file added.

Add a comment to this file

lib/optional/commons-lang.jar

Binary file added.

Binary file added.

Add a comment to this file

lib/optional/hibernate2.jar

Binary file added.

Binary file added.

osuser-readme.txt

+OSUSER
+------
+This is some primitive documentation for OSUser but it should help to get you started. For any questions please ask on the mailing list (see bottom of document for details)
+
+
+BUILDING
+--------
+1) OSUser requires ant 1.5 or later for the building and deployment of the application
+2) There are several build-targets in the build.xml. The default target is named jar and basically compiles all needed sources and puts them into a .jar file
+3) To deploy a test application into an application server like JBoss, please use the build target example-assemble, which will produce an .ear file in the dist directory. This file then can be deployed into the deploy directory of your application server.
+4) Finally you can test your application by calling http://localhost:8080/manager (this is how it works with jboss, it can be, that you have a different port number for your AppServer)
+
+To use OSUser in your own application, simply add the osuser.jar to application.xml.
+
+
+CONFIGURING OSUSER
+------------------
+OSUser is configured by specifying Credentials, Access and Profile providers. It's very flexible in terms of where all 3 are stored and how they are access by the application server.
+
+The configuration is done through an xml file - see src/META-INF/osuser-default.xml for an example of the file format (this is the default configuration if no other config is specified.)
+
+At the moment OSUser will look for the configuration file as follows:
+1) Look for osuser.xml in the classpath
+2) Look for META-INF/osuser.xml in the classpath
+3) Look for the System property osuser.config.file and load the resource from there
+4) Look for the System property osuser.config.url and load the resource from there
+5) Load the default configuration from META-INF/osuser-default.xml
+
+
+SERVER - ORION
+--------------
+- There are two ways to do this, either by using an existing Orion UserManager (a) or using the UserManagerAdapter to connect Orion to existing OSUser storage providers (b).
+- a) In orion-application.xml - setup a user manager (this will not work with EJBUserManager before version 1.5.4 due to bugs in it - however it will work fine with XMLUserManager or DataSourceUserManager). Then configure OSUser to use the Orion providers.
+- b) In orion-application.xml add:
+<user-manager class="com.opensymphony.user.provider.orion.OrionUserManager" />
+then configure OSUser to use it's own storage providers (eg EJBProvider or CastorProvider)
+
+
+SERVER - JBOSS
+--------------
+- If you are using a different database then Oracle 8 with OSUser and JBoss, you have to change the mapping in the build.xml file from "Oracle 8" to the database you are using (e.g. Hypersonic SQL). This has to be done for the jaws.xml file in the oscore module as well. Since oscore comes in a jar file, you have to extract the META-INF/jaws.xml file, edit it and put it back into the jar file.
+- Then you have to edit the auth.conf file of jboss. You have to add the following lines:
+
+osuser {
+        // The following provider is for the usage of OSUser, a part of the OpenSymphony project
+        // Note that you have to add this security domain to the jboss.xml file to use it
+        org.jboss.security.auth.spi.ProxyLoginModule required
+        	moduleName=com.opensymphony.user.provider.jboss.OSUserLoginModule;
+};
+
+Then in various security-domains (such as jboss.xml and jboss-web.xml) you may need to add a security domain of java:/jaas/osuser.
+
+
+AUTHORS
+-------
+Markus May - mmay@gmx.net
+Mike Cannon-Brookes - mike@atlassian.com
+
+
+QUESTIONS
+---------
+For questions please ask on the OSUser mailing list - see http://www.opensymphony.com

src/etc/castor/castor.properties

+# Example properties indent the output, require validation
+# on input and turn debugging on.
+#
+org.exolab.castor.validation=false
+org.exolab.castor.indent=true
+org.exolab.castor.debug=true
+
+

src/etc/castor/database.xml

+<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN"
+                           "http://castor.exolab.org/jdo-conf.dtd">
+<database name="quiz" engine="postgresql" >
+
+
+<!--  feel free to add more database settings in here...
+  just comment them out when you commit...
+-->
+
+
+  <driver   class-name="org.postgresql.Driver"
+            url="jdbc:postgresql:test">
+    <param name="user" value="dood"/>
+    <param name="password" value="dood"/>
+  </driver>
+  <mapping href="mapping.xml" />
+</database>
+

src/etc/castor/mapping.xml

+<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
+                           "http://castor.exolab.org/mapping.dtd">
+<mapping>
+
+  <class name="com.opensymphony.user.provider.castor.entity.CastorGroup"
+         identity="id"  key-generator="MAX">
+    <description>group</description>
+    <map-to table="os_group" xml="osuser_group" />
+    <field name="id" type="big-decimal">
+      <sql name="id" type="decimal"/>
+    </field>
+    <field name="name" type="string">
+      <sql name="name" type="char"/>
+    </field>
+    <field name="users" type="com.opensymphony.user.provider.castor.entity.CastorUser" collection="arraylist" >
+      <sql many-table="os_membership" many-key="group_id" name="user_id" />
+    </field>
+  </class>
+
+  <class name="com.opensymphony.user.provider.castor.entity.CastorUser"
+         identity="id"  key-generator="MAX">
+    <description>user</description>
+    <map-to table="os_user" xml="osuser_user" />
+    <field name="id" type="big-decimal">
+      <sql name="id" type="decimal"/>
+    </field>
+    <field name="name" type="string">
+      <sql name="name" type="char"/>
+    </field>
+    <field name="passwordHash" type="string">
+      <sql name="pwd_hash" type="char"/>
+    </field>
+    <field name="groups" type="com.opensymphony.user.provider.castor.entity.CastorGroup" collection="arraylist" >
+      <sql many-table="os_membership" many-key="user_id" name="group_id" />
+    </field>
+  </class>
+
+</mapping>
+
+

src/etc/ejb/ejb-jar.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
+
+<ejb-jar>
+
+   <description>No Description</description>
+   <display-name>Generated by XDoclet</display-name>
+
+   <enterprise-beans>
+
+      <!-- Session Beans -->
+
+     <!--
+       To add session beans that you have deployment descriptor info for, add
+       a file to your merge directory called session-beans.xml that contains
+       the <session></session> markup for those beans.
+     -->
+
+      <!-- Entity Beans -->
+      <entity id="os.Group">
+         <description><![CDATA[Entity bean representing Group.]]></description>
+
+         <ejb-name>os.Group</ejb-name>
+
+         <home>com.opensymphony.user.provider.ejb.entity.GroupHome</home>
+         <remote>com.opensymphony.user.provider.ejb.entity.GroupRemote</remote>
+         <ejb-class>com.opensymphony.user.provider.ejb.entity.GroupCMP</ejb-class>
+         <persistence-type>Container</persistence-type>
+         <prim-key-class>java.lang.Long</prim-key-class>
+         <reentrant>False</reentrant>
+         <cmp-field>
+            <description><![CDATA[Unique primary key of Group.]]></description>
+            <field-name>id</field-name>
+         </cmp-field>
+         <cmp-field>
+            <description><![CDATA[Get name of Group.]]></description>
+            <field-name>name</field-name>
+         </cmp-field>
+         <primkey-field>id</primkey-field>
+
+         <env-entry>
+            <env-entry-name>sequenceName</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value>OSUEntityEJB</env-entry-value>
+         </env-entry>
+
+         <ejb-ref>
+            <ejb-ref-name>ejb/sequenceGenerator</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.sequence.SequenceGeneratorHome</home>
+            <remote>com.opensymphony.module.sequence.SequenceGenerator</remote>
+         </ejb-ref>
+         <ejb-ref>
+            <ejb-ref-name>ejb/propertyStore</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.propertyset.ejb.PropertyStoreHome</home>
+            <remote>com.opensymphony.module.propertyset.ejb.PropertyStore</remote>
+         </ejb-ref>
+
+      </entity>
+
+      <entity id="os.Membership">
+         <description><![CDATA[Entity bean linking a User to a Group.]]></description>
+
+         <ejb-name>os.Membership</ejb-name>
+
+         <home>com.opensymphony.user.provider.ejb.entity.MembershipHome</home>
+         <remote>com.opensymphony.user.provider.ejb.entity.MembershipRemote</remote>
+         <ejb-class>com.opensymphony.user.provider.ejb.entity.MembershipCMP</ejb-class>
+         <persistence-type>Container</persistence-type>
+         <prim-key-class>java.lang.Long</prim-key-class>
+         <reentrant>False</reentrant>
+         <cmp-field>
+            <description><![CDATA[Unique primary key of Membership.]]></description>
+            <field-name>id</field-name>
+         </cmp-field>
+         <cmp-field>
+            <description><![CDATA[Get User]]></description>
+            <field-name>user</field-name>
+         </cmp-field>
+         <cmp-field>
+            <description><![CDATA[Get Group]]></description>
+            <field-name>group</field-name>
+         </cmp-field>
+         <primkey-field>id</primkey-field>
+
+         <env-entry>
+            <env-entry-name>sequenceName</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value>MembershipEJB</env-entry-value>
+         </env-entry>
+
+         <ejb-ref>
+            <ejb-ref-name>ejb/sequenceGenerator</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.sequence.SequenceGeneratorHome</home>
+            <remote>com.opensymphony.module.sequence.SequenceGenerator</remote>
+         </ejb-ref>
+         <ejb-ref>
+            <ejb-ref-name>ejb/propertyStore</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.propertyset.ejb.PropertyStoreHome</home>
+            <remote>com.opensymphony.module.propertyset.ejb.PropertyStore</remote>
+         </ejb-ref>
+
+      </entity>
+
+      <entity id="os.User">
+         <description><![CDATA[Entity bean representing User.]]></description>
+
+         <ejb-name>os.User</ejb-name>
+
+         <home>com.opensymphony.user.provider.ejb.entity.UserHome</home>
+         <remote>com.opensymphony.user.provider.ejb.entity.UserRemote</remote>
+         <ejb-class>com.opensymphony.user.provider.ejb.entity.UserCMP</ejb-class>
+         <persistence-type>Container</persistence-type>
+         <prim-key-class>java.lang.Long</prim-key-class>
+         <reentrant>False</reentrant>
+         <cmp-field>
+            <description><![CDATA[Unique primary key of User.]]></description>
+            <field-name>id</field-name>
+         </cmp-field>
+         <cmp-field>
+            <description><![CDATA[Get login name of User.]]></description>
+            <field-name>name</field-name>
+         </cmp-field>
+         <cmp-field>
+            <description><![CDATA[]]></description>
+            <field-name>passwordHash</field-name>
+         </cmp-field>
+         <primkey-field>id</primkey-field>
+
+         <env-entry>
+            <env-entry-name>sequenceName</env-entry-name>
+            <env-entry-type>java.lang.String</env-entry-type>
+            <env-entry-value>OSUEntityEJB</env-entry-value>
+         </env-entry>
+
+         <ejb-ref>
+            <ejb-ref-name>ejb/sequenceGenerator</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.sequence.SequenceGeneratorHome</home>
+            <remote>com.opensymphony.module.sequence.SequenceGenerator</remote>
+         </ejb-ref>
+         <ejb-ref>
+            <ejb-ref-name>ejb/propertyStore</ejb-ref-name>
+            <ejb-ref-type>Session</ejb-ref-type>
+            <home>com.opensymphony.module.propertyset.ejb.PropertyStoreHome</home>
+            <remote>com.opensymphony.module.propertyset.ejb.PropertyStore</remote>
+         </ejb-ref>
+
+      </entity>
+
+     <!--
+       To add entity beans that you have deployment descriptor info for, add
+       a file to your merge directory called session-beans.xml that contains
+       the <entity></entity> markup for those beans.
+     -->
+
+   </enterprise-beans>
+
+   <!-- Assembly Descriptor -->
+   <assembly-descriptor>
+
+   <!-- finder permissions -->
+
+   <!-- finder permissions -->
+
+   <!-- finder permissions -->
+
+   <!-- transactions -->
+
+   <!-- finder transactions -->
+   </assembly-descriptor>
+
+</ejb-jar>

src/etc/jalopy.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<jalopy>
+    <general>
+        <compliance>
+            <version>14</version>
+        </compliance>
+        <style>
+            <description>OpenSymphony</description>
+            <name>OpenSymphony</name>
+        </style>
+    </general>
+    <inspector>
+        <enable>false</enable>
+        <naming>
+            <classes>
+                <abstract>[A-Z][a-zA-Z0-9]+</abstract>
+                <general>[A-Z][a-zA-Z0-9]+</general>
+            </classes>
+            <fields>
+                <default>[a-z][\w]+</default>
+                <defaultStatic>[a-z][\w]+</defaultStatic>
+                <defaultStaticFinal>[a-zA-Z][\w]+</defaultStaticFinal>
+                <private>[a-z][\w]+</private>
+                <privateStatic>[a-z][\w]+</privateStatic>
+                <privateStaticFinal>[a-zA-Z][\w]+</privateStaticFinal>
+                <protected>[a-z][\w]+</protected>
+                <protectedStatic>[a-z][\w]+</protectedStatic>
+                <protectedStaticFinal>[a-zA-Z][\w]+</protectedStaticFinal>
+                <public>[a-z][\w]+</public>
+                <publicStatic>[a-z][\w]+</publicStatic>
+                <publicStaticFinal>[a-zA-Z][\w]+</publicStaticFinal>
+            </fields>
+            <interfaces>[A-Z][a-zA-Z0-9]+</interfaces>
+            <labels>\w+</labels>
+            <methods>
+                <default>[a-z][\w]+</default>
+                <defaultStatic>[a-z][\w]+</defaultStatic>
+                <defaultStaticFinal>[a-z][\w]+</defaultStaticFinal>
+                <private>[a-z][\w]+</private>
+                <privateStatic>[a-z][\w]+</privateStatic>
+                <privateStaticFinal>[a-z][\w]+</privateStaticFinal>
+                <protected>[a-z][\w]+</protected>
+                <protectedStatic>[a-z][\w]+</protectedStatic>
+                <protectedStaticFinal>[a-z][\w]+</protectedStaticFinal>
+                <public>[a-z][\w]+</public>
+                <publicStatic>[a-z][\w]+</publicStatic>
+                <publicStaticFinal>[a-z][\w]+</publicStaticFinal>
+            </methods>
+            <packages>[a-z]+(?:\.[a-z]+)*</packages>
+            <parameters>
+                <default>[a-z][\w]+</default>
+                <final>[a-z][\w]+</final>
+            </parameters>
+            <variables>[a-z][\w]*</variables>
+        </naming>
+        <tips>
+            <adhereToNamingConvention>false</adhereToNamingConvention>
+            <alwaysOverrideEquals>false</alwaysOverrideEquals>
+            <alwaysOverrideHashCode>false</alwaysOverrideHashCode>
+            <avoidThreadGroups>false</avoidThreadGroups>
+            <declareCollectionComment>false</declareCollectionComment>
+            <dontIgnoreExceptions>false</dontIgnoreExceptions>
+            <dontSubstituteObjectEquals>false</dontSubstituteObjectEquals>
+            <neverDeclareException>false</neverDeclareException>
+            <neverDeclareThrowable>false</neverDeclareThrowable>
+            <neverInvokeWaitOutsideLoop>false</neverInvokeWaitOutsideLoop>
+            <neverReturnZeroArrays>false</neverReturnZeroArrays>
+            <neverUseEmptyFinally>false</neverUseEmptyFinally>
+            <obeyContractEquals>false</obeyContractEquals>
+            <overrideToString>false</overrideToString>
+            <referToObjectsByInterface>false</referToObjectsByInterface>
+            <replaceStructureWithClass>false</replaceStructureWithClass>
+            <stringLiterallI18n>false</stringLiterallI18n>
+            <useInterfaceOnlyForTypes>false</useInterfaceOnlyForTypes>
+            <wrongCollectionComment>false</wrongCollectionComment>
+        </tips>
+    </inspector>
+    <internal>
+        <version>6</version>
+    </internal>
+    <messages>
+        <priority>
+            <general>30000</general>
+            <parser>30000</parser>
+            <parserJavadoc>30000</parserJavadoc>
+            <printer>30000</printer>
+            <printerJavadoc>30000</printerJavadoc>
+            <transform>30000</transform>
+        </priority>
+        <showErrorStackTrace>true</showErrorStackTrace>
+    </messages>
+    <misc>
+        <threadCount>1</threadCount>
+    </misc>
+    <printer>
+        <alignment>
+            <methodCallChain>true</methodCallChain>
+            <parameterMethodDeclaration>false</parameterMethodDeclaration>
+            <ternaryOperator>true</ternaryOperator>
+            <variableAssignment>false</variableAssignment>
+            <variableIdentifier>false</variableIdentifier>
+        </alignment>
+        <backup>
+            <directory>bak</directory>
+            <level>0</level>
+        </backup>
+        <blanklines>
+            <after>
+                <block>1</block>
+                <braceLeft>0</braceLeft>
+                <class>1</class>
+                <declaration>0</declaration>
+                <footer>1</footer>
+                <header>0</header>
+                <interface>1</interface>
+                <lastImport>2</lastImport>
+                <method>1</method>
+                <package>1</package>
+            </after>
+            <before>
+                <block>1</block>
+                <braceRight>0</braceRight>
+                <caseBlock>1</caseBlock>
+                <comment>
+                    <javadoc>1</javadoc>
+                    <multiline>1</multiline>
+                    <singleline>1</singleline>
+                </comment>
+                <controlStatement>1</controlStatement>
+                <declaration>1</declaration>
+                <footer>0</footer>
+                <header>0</header>
+            </before>
+            <keepUpTo>1</keepUpTo>
+        </blanklines>
+        <braces>
+            <empty>
+                <cuddle>false</cuddle>
+                <insertStatement>false</insertStatement>
+            </empty>
+            <insert>
+                <dowhile>true</dowhile>
+                <for>true</for>
+                <ifelse>true</ifelse>
+                <while>true</while>
+            </insert>
+            <remove>
+                <block>true</block>
+                <dowhile>false</dowhile>
+                <for>false</for>
+                <ifelse>false</ifelse>
+                <while>false</while>
+            </remove>
+            <treatDifferent>
+                <methodClass>false</methodClass>
+                <methodClassIfWrapped>false</methodClassIfWrapped>
+            </treatDifferent>
+        </braces>
+        <chunks>
+            <blanklines>true</blanklines>
+            <comments>true</comments>
+        </chunks>
+        <comments>
+            <format>
+                <multiline>false</multiline>
+            </format>
+            <javadoc>
+                <check>
+                    <innerclass>false</innerclass>
+                    <tags>false</tags>
+                    <throwsTags>false</throwsTags>
+                </check>
+                <fieldsShort>true</fieldsShort>
+                <generate>
+                    <class>1</class>
+                    <constructor>0</constructor>
+                    <field>0</field>
+                    <method>0</method>
+                </generate>
+                <parseComments>false</parseComments>
+                <tags>
+                    <in-line />
+                    <standard />
+                </tags>
+                <templates>
+                    <method>
+                        <bottom> */</bottom>
+                        <exception> * @throws $exceptionType$ DOCUMENT ME!</exception>
+                        <param> * @param $paramType$ DOCUMENT ME!</param>
+                        <return> * @return DOCUMENT ME!</return>
+                        <top>/**| * DOCUMENT ME!</top>
+                    </method>
+                </templates>
+            </javadoc>
+            <remove>
+                <javadoc>false</javadoc>
+                <multiline>false</multiline>
+                <singleline>false</singleline>
+            </remove>
+            <separator>
+                <fillCharacter>/</fillCharacter>
+                <insert>true</insert>
+                <insertRecursive>false</insertRecursive>
+                <text>
+                    <class>Inner Classes</class>
+                    <constructor>Constructors</constructor>
+                    <field>Instance fields</field>
+                    <initializer>Instance initializers</initializer>
+                    <interface>Inner Interfaces</interface>
+                    <method>Methods</method>
+                    <static>Static fields/initializers</static>
+                </text>
+            </separator>
+        </comments>
+        <environment />
+        <footer>
+            <keys />
+            <smartMode>0</smartMode>
+            <use>false</use>
+        </footer>
+        <header>
+            <keys>To change template for new class use|OpenSymphon</keys>
+            <smartMode>0</smartMode>
+            <text>/*| * Copyright (c) 2002-2003 by OpenSymphony| * All rights reserved.| */</text>
+            <use>true</use>
+        </header>
+        <history>
+            <policy>disabled</policy>
+        </history>
+        <imports>
+            <grouping>
+                <defaultDepth>3</defaultDepth>
+                <packages>*:0|gnu:2|java:2|javax:2</packages>
+            </grouping>
+            <policy>disabled</policy>
+            <sort>true</sort>
+        </imports>
+        <indentation>
+            <caseFromSwitch>false</caseFromSwitch>
+            <continuation>
+                <block>true</block>
+                <operator>false</operator>
+            </continuation>
+            <firstColumnComments>true</firstColumnComments>
+            <label>false</label>
+            <policy>
+                <deep>false</deep>
+            </policy>
+            <sizes>
+                <braceCuddled>1</braceCuddled>
+                <braceLeft>1</braceLeft>
+                <braceRight>0</braceRight>
+                <braceRightAfter>1</braceRightAfter>
+                <continuation>4</continuation>
+                <deep>55</deep>
+                <extends>-1</extends>
+                <general>4</general>
+                <implements>-1</implements>
+                <leading>0</leading>
+                <tabs>8</tabs>
+                <throws>-1</throws>
+                <trailingComment>1</trailingComment>
+            </sizes>
+            <tabs>
+                <enable>false</enable>
+                <onlyLeading>false</onlyLeading>
+            </tabs>
+        </indentation>
+        <misc>
+            <arrayBracketsAfterIdent>false</arrayBracketsAfterIdent>