Updated Roster to use new ThdlUser Repository
This commit is contained in:
parent
5ec57eb55a
commit
71ad012fa1
8 changed files with 39 additions and 385 deletions
77
build.xml
77
build.xml
|
@ -19,59 +19,22 @@
|
|||
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"/>
|
||||
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
|
||||
|
||||
<property file="${user.home}/.${ant.project.name}-build.properties"/>
|
||||
<property file="${user.home}/.build.properties"/>
|
||||
<property file="build.properties"/>
|
||||
|
||||
<!-- Classpath Reference -->
|
||||
<path id="roster-classpath">
|
||||
<fileset dir="/usr/local/jakarta-tomcat-4.1.18/common/lib">
|
||||
<fileset dir="${catalina.home}/common/lib">
|
||||
<include name="servlet.jar"/>
|
||||
<include name="mysql-connector-java-3.0.8-stable-bin.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="WEB-INF/lib">
|
||||
<include name="bsf-2.3.0.jar"/>
|
||||
<include name="commons-beanutils-1.6.1.jar"/>
|
||||
<include name="commons-collections-2.1.jar"/>
|
||||
<include name="commons-digester-1.5.jar"/>
|
||||
<include name="commons-fileupload-1.0.jar"/>
|
||||
<include name="commons-lang-1.0.jar"/>
|
||||
<include name="commons-logging-1.0.2.jar"/>
|
||||
<include name="jakarta-oro-2.0.6.jar"/>
|
||||
<include name="javassist-2.5.1.jar"/>
|
||||
<include name="log4j-1.2.6.jar"/>
|
||||
<include name="ognl-2.5.1.jar"/>
|
||||
<include name="tapestry-3.0-beta-3.jar"/>
|
||||
<include name="tapestry-contrib-3.0-beta-3.jar"/>
|
||||
<include name="torque-3.0.jar"/>
|
||||
<include name="mysql-driver.jar"/>
|
||||
<include name="jdbc-2.0.jar"/>
|
||||
<include name="village-2.0-dev-20021111.jar"/>
|
||||
<include name="commons-configuration-1.0-dev.jar"/>
|
||||
<include name="stratum-1.0-b3.jar"/>
|
||||
<include name="commons-dbcp-1.0-dev-20020806.jar"/>
|
||||
<include name="commons-pool-1.0.jar"/>
|
||||
|
||||
<!-- <include name="bcel-5.0.jar"/>
|
||||
<include name="bsf-2.3.0.jar"/>
|
||||
<include name="tapestry-2.4-alpha-5.jar"/>
|
||||
<include name="tapestry-contrib-2.4-alpha-5.jar"/>
|
||||
<include name="ant-1.5.jar"/>
|
||||
<include name="commons-beanutils-1.4.1.jar"/>
|
||||
<include name="commons-collections-2.0.jar"/>
|
||||
<include name="commons-lang-1.0.jar"/>
|
||||
<include name="ejb.jar"/>
|
||||
<include name="jakarta-oro-2.0.6.jar"/>
|
||||
<include name="jcommon-0.6.4.jar"/>
|
||||
<include name="jcs-1.0-dev.jar"/>
|
||||
<include name="jfreechart-0.9.2.jar"/>
|
||||
<include name="jndi-1.2.1.jar"/>
|
||||
<include name="junit-3.8.1.jar"/>
|
||||
<include name="log4j-1.2.6.jar"/>
|
||||
<include name="ognl-2.3.0-opt.jar"/>
|
||||
<include name="tomcat-naming-1.0.jar"/>
|
||||
<include name="velocity-1.3.jar"/>
|
||||
<include name="xercesImpl-2.0.2.jar"/>
|
||||
<include name="xml-apis-2.0.2.jar"/> -->
|
||||
<include name="*.jar"/>
|
||||
</fileset>
|
||||
<fileset dir="WEB-INF/classes">
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
<include name="**/*.class"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<!-- Executable Targets -->
|
||||
|
@ -98,6 +61,11 @@
|
|||
|
||||
<target name="compile" depends="copy" description="Compile web application">
|
||||
<!-- ... construct web application in ${build} subdirectory ... -->
|
||||
<javac srcdir="${thdluser.home}/src/java"
|
||||
destdir="${build}/WEB-INF/classes"
|
||||
deprecation="on"
|
||||
classpathref="roster-classpath"
|
||||
debug="on"/>
|
||||
<javac srcdir="${basedir}/src/java"
|
||||
destdir="${build}/WEB-INF/classes"
|
||||
deprecation="on"
|
||||
|
@ -146,11 +114,18 @@
|
|||
</javadoc>
|
||||
</target>
|
||||
|
||||
<target name="install" description="Install web application"
|
||||
depends="compile">
|
||||
<install url="${url}" username="${username}" password="${password}"
|
||||
path="${path}" war="file://${build}"/>
|
||||
</target>
|
||||
<target name="install" description="Install web application" depends="compile">
|
||||
<install url="${url}"
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
path="${path}"
|
||||
config="file://${basedir}/${roster.context.config}"
|
||||
war="file://${build}"/>
|
||||
</target>
|
||||
|
||||
<target name="reinstall" description="Remove and Re-install web application" depends="remove">
|
||||
<antcall target="install"/>
|
||||
</target>
|
||||
|
||||
<target name="reload" description="Reload web application"
|
||||
depends="compile">
|
||||
|
|
|
@ -71,7 +71,7 @@ public class Person extends org.thdl.roster.om.Member implements RosterMember, j
|
|||
public Person( ThdlUser user ) throws TorqueException
|
||||
{
|
||||
this();
|
||||
getPersonData().setThdlUserId( new Integer( user.getId() ) );
|
||||
getPersonData().setThdlUserId( user.getId() );
|
||||
getPersonData().setFirstname( user.getFirstname() );
|
||||
getPersonData().setMiddlename( user.getMiddlename() );
|
||||
getPersonData().setLastname( user.getLastname() );
|
||||
|
|
|
@ -54,7 +54,7 @@ public class Home extends RosterPage
|
|||
Visit visit = (Visit)getVisit();
|
||||
if ( visit.isAuthenticated() )
|
||||
{
|
||||
Integer userId = new Integer( visit.getThdlUser().getId() );
|
||||
Integer userId = visit.getThdlUser().getId() ;
|
||||
Global global = (Global) getGlobal();
|
||||
Iterator iter = global.getAllPeople().iterator();
|
||||
while( iter.hasNext() )
|
||||
|
|
|
@ -60,10 +60,12 @@ public class Login extends RosterPage
|
|||
public boolean validateUser()
|
||||
{
|
||||
boolean rVal = false;
|
||||
ThdlUser thdlUser = null;
|
||||
try
|
||||
{
|
||||
thdlUser = ThdlUserRepository.getInstance().validate( getLogin(), getPassword() );
|
||||
ThdlUser thdlUser = new ThdlUser();
|
||||
thdlUser.setUsername( getLogin() );
|
||||
thdlUser.setPassword( getPassword() );
|
||||
thdlUser = ThdlUserRepository.getInstance().validate( thdlUser, "roster" );
|
||||
rVal = true;
|
||||
Visit visit = (Visit) getVisit();
|
||||
visit.setThdlUser( thdlUser );
|
||||
|
@ -73,6 +75,10 @@ public class Login extends RosterPage
|
|||
{
|
||||
setMessage( ture.getMessage() );
|
||||
}
|
||||
catch ( java.sql.SQLException e )
|
||||
{
|
||||
throw new ApplicationRuntimeException( e );
|
||||
}
|
||||
|
||||
return rVal;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class ContactInfoPage extends MemberFormSeries
|
|||
{
|
||||
Visit visit = (Visit) getVisit();
|
||||
Member member = (Member) visit.getMember();
|
||||
member.save( new Integer( visit.getThdlUser().getId() ) );
|
||||
member.save( visit.getThdlUser().getId() );
|
||||
try
|
||||
{
|
||||
if ( member instanceof Person )
|
||||
|
|
|
@ -90,7 +90,7 @@ public class MemberData extends MemberFormSeries
|
|||
//don't move this line!
|
||||
List flatDataIds = person.getPersonData().getPersonTypeIdList();
|
||||
|
||||
Integer userId = new Integer( visit.getThdlUser().getId() );
|
||||
Integer userId = visit.getThdlUser().getId() ;
|
||||
person.getPersonData().setThdlUserId( userId );
|
||||
person.getPersonData().save();
|
||||
person.setPersonDataKey( member.getPersonData().getPrimaryKey() );
|
||||
|
|
|
@ -116,7 +116,7 @@ public abstract class MemberFormSeries extends SecureRosterPage
|
|||
if ( ! member.isNew() )
|
||||
{
|
||||
Integer owner = member.getCreatedBy();
|
||||
Integer user = new Integer( visit.getThdlUser().getId() );
|
||||
Integer user = visit.getThdlUser().getId();
|
||||
if ( ! owner.equals( user ) )
|
||||
{
|
||||
RosterPage home = (RosterPage) cycle.getPage( "Home" );
|
||||
|
|
|
@ -1,327 +0,0 @@
|
|||
|
||||
|
||||
|
||||
|
||||
org.thdl.roster.om
|
||||
org.thdl.roster.om
|
||||
org.thdl.roster.om.map
|
||||
|
||||
Failed to create dir or dir already exists: /Users/travis/webapps/roster/src/java/org/thdl/roster/om/
|
||||
|
||||
Failed to create dir or dir already exists: /Users/travis/webapps/roster/src/java/org/thdl/roster/om/map/
|
||||
|
||||
Failed to create dir or dir already exists: /Users/travis/webapps/roster/src/java/org/thdl/roster/om/
|
||||
|
||||
Member
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PersonData
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProjectData
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OrganizationData
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ContactInfo
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Address
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Phone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Publication
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ResearchInterest
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Document
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Country
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CulturalArea
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Language
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Discipline
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
DocumentType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProjectType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OrganizationType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PersonType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PersonPersonType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
OrganizationOrganizationType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProjectProjectType
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ResearchInterestLanguage
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ResearchInterestCulturalArea
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ResearchInterestDiscipline
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in a new issue