Added some .cvsignore files to exclude local-config directory and LexConstantsSecure.java

This commit is contained in:
dubtraxis 2003-10-06 15:08:56 +00:00
parent b8b903a5a9
commit ee70f862c9
4 changed files with 49 additions and 46 deletions

3
.cvsignore Normal file
View file

@ -0,0 +1,3 @@
local-config
.DS_Store

View file

@ -1,5 +1,5 @@
<project name="Lex" default="compile" basedir="/Users/travis/webapps/lex"> <project name="Lex" default="compile" basedir=".">
<!-- Configure the directory into which the web application is built --> <!-- Configure the directory into which the web application is built -->
<property name="build" value="${basedir}/build"/> <property name="build" value="${basedir}/build"/>
@ -18,8 +18,8 @@
<!-- Configure properties to access the Manager application <!-- Configure properties to access the Manager application
user /pass combo should be in $TOMCAT_HOME/conf/tomcat-users.xml with managaer role.--> user /pass combo should be in $TOMCAT_HOME/conf/tomcat-users.xml with managaer role.-->
<property name="url" value="http://localhost:2020/manager"/> <property name="url" value="http://localhost:2020/manager"/>
<property name="username" value=""/> <property name="username" value="user"/>
<property name="password" value=""/> <property name="password" value="pass"/>
<!-- Configure the custom Ant tasks for the Manager application <!-- Configure the custom Ant tasks for the Manager application
These tasks require catalina-ant.jar in $ANT_HOME/lib--> These tasks require catalina-ant.jar in $ANT_HOME/lib-->
@ -35,7 +35,7 @@
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/> <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
<!-- Configure up the classpath --> <!-- Configure up the classpath -->
<path id="lex-classpath"> <path id="classpath">
<fileset dir="${basedir}/lib"> <fileset dir="${basedir}/lib">
<include name="**/*.jar"/> <include name="**/*.jar"/>
<include name="compiletime/lib/javax.servlet.jar"/> <include name="compiletime/lib/javax.servlet.jar"/>
@ -70,7 +70,7 @@
</copy> </copy>
<copy todir="${build}/WEB-INF"> <copy todir="${build}/WEB-INF">
<fileset dir="${config}"> <fileset dir="${basedir}/config">
<filename name="web.xml"/> <filename name="web.xml"/>
</fileset> </fileset>
</copy> </copy>
@ -101,19 +101,17 @@
<target name="compile" description="Compile web application" depends="copy"> <target name="compile" description="Compile web application" depends="copy">
<mkdir dir="${build}/WEB-INF/classes"/> <mkdir dir="${build}/WEB-INF/classes"/>
<javac srcdir="${source}/java" destdir="${build}/WEB-INF/classes" classpathref="lex-classpath" debug="on" listfiles="no"/> <javac srcdir="${source}/java" destdir="${build}/WEB-INF/classes" classpathref="classpath" debug="on" listfiles="no"/>
</target> </target>
<target name="test" description="Testing" depends="compile"> <target name="test" description="Testing" depends="compile">
<java classname="org.thdl.lex.LexMod" classpath="${build}/WEB-INF/classes/" classpathref="lex-classpath"/> <java classname="org.thdl.lex.LexMod" classpath="${build}/WEB-INF/classes/" classpathref="classpath"/>
</target> </target>
<target name="javadoc" description="Create Javadocs"> <target name="javadoc" description="Create Javadocs">
<mkdir dir="${build}/docs/api"/> <mkdir dir="${build}/docs/api"/>
<delete>
<fileset dir="${build}/docs/api/" includes="**/*"/> <javadoc destdir="${build}/docs/api/" classpathref="classpath" author="true" version="true" use="true" windowtitle="THDL Tibetan Collaborative Dictionary API">
</delete>
<javadoc destdir="${build}/docs/api/" classpathref="lex-classpath" author="true" version="true" use="true" windowtitle="THDL Tibetan Collaborative Dictionary API">
<fileset dir="${source}/java" defaultexcludes="yes"> <fileset dir="${source}/java" defaultexcludes="yes">
<include name="org/thdl/**/*.java"/> <include name="org/thdl/**/*.java"/>
@ -135,6 +133,7 @@
</target> </target>
<target name="move-log" description="move old log file"> <target name="move-log" description="move old log file">
<mkdir dir="logs"/>
<tstamp prefix="now"/> <tstamp prefix="now"/>
<touch file="${basedir}/logs/hibernate.log"/> <touch file="${basedir}/logs/hibernate.log"/>
<move file="${basedir}/logs/hibernate.log" tofile="${basedir}/logs/hibernate_${now.DSTAMP}_${now.TSTAMP}.log" overwrite="true"/> <move file="${basedir}/logs/hibernate.log" tofile="${basedir}/logs/hibernate_${now.DSTAMP}_${now.TSTAMP}.log" overwrite="true"/>
@ -160,7 +159,7 @@
<include name="**/*.java"/> <include name="**/*.java"/>
</fileset> </fileset>
</copy> </copy>
<java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="lex-classpath" fork="yes"> <java classname="net.sf.hibernate.tool.hbm2java.CodeGenerator" classpathref="classpath" fork="yes">
<arg value="--output=${source}/java"/> <arg value="--output=${source}/java"/>
<arg value="--config=${basedir}/config/lex-codegen-cfg.xml"/> <arg value="--config=${basedir}/config/lex-codegen-cfg.xml"/>
<arg value="${source}/java/org/thdl/lex/component/LexComponent.hbm.xml"/> <arg value="${source}/java/org/thdl/lex/component/LexComponent.hbm.xml"/>
@ -189,7 +188,7 @@
</target> </target>
<target name="hbm2ddl" description="generate source code"> <target name="hbm2ddl" description="generate source code">
<java classname="net.sf.hibernate.tool.hbm2ddl.SchemaExport" classpathref="lex-classpath" fork="yes"> <java classname="net.sf.hibernate.tool.hbm2ddl.SchemaExport" classpathref="classpath" fork="yes">
<classpath> <classpath>
<pathelement location="${build}/WEB-INF/classes"/> <pathelement location="${build}/WEB-INF/classes"/>
</classpath> </classpath>
@ -225,7 +224,7 @@
</target> </target>
<target name="schema-update"> <target name="schema-update">
<taskdef name="schemaupdate" classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask" classpathref="lex-classpath"/> <taskdef name="schemaupdate" classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdateTask" classpathref="classpath"/>
<schemaupdate> <schemaupdate>
<fileset dir="src"> <fileset dir="src">
<include name="**/*.hbm.xml"/> <include name="**/*.hbm.xml"/>

View file

@ -0,0 +1 @@
LexConstantsSecure.java

View file

@ -1,25 +1,25 @@
package org.thdl.lex; package org.thdl.lex;
import java.io.IOException;
import org.thdl.lex.component.*; import java.util.HashMap;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;
import javax.servlet.FilterConfig; import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import java.io.IOException; import org.thdl.lex.component.*;
import java.util.HashMap;
/** /**
* Description of the Class * Description of the Class
* *
*@author travis * @author travis
*@created October 1, 2003 * @created October 1, 2003
*/ */
public class LexComponentFilter implements Filter public class LexComponentFilter implements Filter
{ {
@ -32,8 +32,8 @@ public class LexComponentFilter implements Filter
/** /**
* Sets the blanks attribute of the LexComponentFilter object * Sets the blanks attribute of the LexComponentFilter object
* *
*@param blanks The new blanks value * @param blanks The new blanks value
*@since * @since
*/ */
public void setBlanks( HashMap blanks ) public void setBlanks( HashMap blanks )
{ {
@ -44,8 +44,8 @@ public class LexComponentFilter implements Filter
/** /**
* Sets the sessionMgr attribute of the LexComponentFilter object * Sets the sessionMgr attribute of the LexComponentFilter object
* *
*@param sessionMgr The new sessionMgr value * @param sessionMgr The new sessionMgr value
*@since * @since
*/ */
public void setSessionMgr( UserSessionManager sessionMgr ) public void setSessionMgr( UserSessionManager sessionMgr )
{ {
@ -56,8 +56,8 @@ public class LexComponentFilter implements Filter
/** /**
* Gets the blanks attribute of the LexComponentFilter object * Gets the blanks attribute of the LexComponentFilter object
* *
*@return The blanks value * @return The blanks value
*@since * @since
*/ */
public HashMap getBlanks() public HashMap getBlanks()
{ {
@ -68,8 +68,8 @@ public class LexComponentFilter implements Filter
/** /**
* Gets the sessionMgr attribute of the LexComponentFilter object * Gets the sessionMgr attribute of the LexComponentFilter object
* *
*@return The sessionMgr value * @return The sessionMgr value
*@since * @since
*/ */
public UserSessionManager getSessionMgr() public UserSessionManager getSessionMgr()
{ {
@ -86,9 +86,9 @@ public class LexComponentFilter implements Filter
/** /**
* Description of the Method * Description of the Method
* *
*@param config Description of Parameter * @param config Description of Parameter
*@exception ServletException Description of Exception * @exception ServletException Description of Exception
*@since * @since
*/ */
public void init( FilterConfig config ) throws ServletException public void init( FilterConfig config ) throws ServletException
{ {
@ -98,7 +98,7 @@ public class LexComponentFilter implements Filter
getBlanks().put( LexConstants.TERMLABEL_VALUE, new Term() ); getBlanks().put( LexConstants.TERMLABEL_VALUE, new Term() );
getBlanks().put( LexConstants.PRONUNCIATIONLABEL_VALUE, new Pronunciation() ); getBlanks().put( LexConstants.PRONUNCIATIONLABEL_VALUE, new Pronunciation() );
getBlanks().put( LexConstants.ETYMOLOGYLABEL_VALUE, new Etymology() ); getBlanks().put( LexConstants.ETYMOLOGYLABEL_VALUE, new Etymology() );
getBlanks().put( LexConstants.FUNCTIONLABEL_VALUE, new Function() ); getBlanks().put( LexConstants.FUNCTIONLABEL_VALUE, new GrammaticalFunction() );
getBlanks().put( LexConstants.SPELLINGLABEL_VALUE, new Spelling() ); getBlanks().put( LexConstants.SPELLINGLABEL_VALUE, new Spelling() );
getBlanks().put( LexConstants.ENCYCLOPEDIA_ARTICLE_LABEL_VALUE, new EncyclopediaArticle() ); getBlanks().put( LexConstants.ENCYCLOPEDIA_ARTICLE_LABEL_VALUE, new EncyclopediaArticle() );
getBlanks().put( LexConstants.DEFINITIONLABEL_VALUE, new Definition() ); getBlanks().put( LexConstants.DEFINITIONLABEL_VALUE, new Definition() );
@ -108,12 +108,12 @@ public class LexComponentFilter implements Filter
getBlanks().put( LexConstants.KEYWORDLABEL_VALUE, new Keyword() ); getBlanks().put( LexConstants.KEYWORDLABEL_VALUE, new Keyword() );
getBlanks().put( LexConstants.RELATEDTERMLABEL_VALUE, new RelatedTerm() ); getBlanks().put( LexConstants.RELATEDTERMLABEL_VALUE, new RelatedTerm() );
getBlanks().put( LexConstants.MODELSENTENCELABEL_VALUE, new ModelSentence() ); getBlanks().put( LexConstants.MODELSENTENCELABEL_VALUE, new ModelSentence() );
getBlanks().put( LexConstants.REGISTERLABEL_VALUE, new Register() ); getBlanks().put( LexConstants.REGISTERLABEL_VALUE, new SpeechRegister() );
getBlanks().put( "analyticalNote", new AnalyticalNote() ); getBlanks().put( "analyticalNote", new AnalyticalNote() );
getBlanks().put( "transitionalData", new TransitionalData() ); getBlanks().put( "transitionalData", new TransitionalData() );
// getBlanks().put( LexConstants.INPUTSESSIONLABEL_VALUE, new Preferences() ); // getBlanks().put( LexConstants.INPUTSESSIONLABEL_VALUE, new Preferences() );
} }
// catch (LexComponentException labe) // catch (LexComponentException labe)
catch ( Exception labe ) catch ( Exception labe )
{ {
throw new ServletException( "LABE says: " + labe.getMessage() ); throw new ServletException( "LABE says: " + labe.getMessage() );
@ -124,12 +124,12 @@ public class LexComponentFilter implements Filter
/** /**
* Description of the Method * Description of the Method
* *
*@param request Description of Parameter * @param request Description of Parameter
*@param response Description of Parameter * @param response Description of Parameter
*@param chain Description of Parameter * @param chain Description of Parameter
*@exception IOException Description of Exception * @exception IOException Description of Exception
*@exception ServletException Description of Exception * @exception ServletException Description of Exception
*@since * @since
*/ */
public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException
{ {
@ -141,12 +141,12 @@ public class LexComponentFilter implements Filter
String labelValue = req.getParameter( LexConstants.LABEL_REQ_PARAM ); String labelValue = req.getParameter( LexConstants.LABEL_REQ_PARAM );
try try
{ {
// this if block is for TESTING ONLY // this if block is for TESTING ONLY
if ( getBlanks().get( labelValue ) != null ) if ( getBlanks().get( labelValue ) != null )
{ {
Class glass = getBlanks().get( labelValue ).getClass(); Class glass = getBlanks().get( labelValue ).getClass();
LexComponent component = (LexComponent) glass.newInstance(); LexComponent component = (LexComponent) glass.newInstance();
//component.appendDebugMap( "LCFilterMadeNewInstance", component ); //component.appendDebugMap( "LCFilterMadeNewInstance", component );
req.setAttribute( LexConstants.COMPONENT_REQ_ATTR, component ); req.setAttribute( LexConstants.COMPONENT_REQ_ATTR, component );
} }
else else
@ -188,7 +188,7 @@ public class LexComponentFilter implements Filter
/** /**
* Description of the Method * Description of the Method
* *
*@since * @since
*/ */
public void destroy() { } public void destroy() { }
@ -199,7 +199,7 @@ public class LexComponentFilter implements Filter
/** /**
* Constructor for the LexComponentFilter object * Constructor for the LexComponentFilter object
* *
*@since * @since
*/ */
public LexComponentFilter() { } public LexComponentFilter() { }
} }