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 -->
<property name="build" value="${basedir}/build"/>
@ -18,8 +18,8 @@
<!-- Configure properties to access the Manager application
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="username" value=""/>
<property name="password" value=""/>
<property name="username" value="user"/>
<property name="password" value="pass"/>
<!-- Configure the custom Ant tasks for the Manager application
These tasks require catalina-ant.jar in $ANT_HOME/lib-->
@ -35,7 +35,7 @@
<taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
<!-- Configure up the classpath -->
<path id="lex-classpath">
<path id="classpath">
<fileset dir="${basedir}/lib">
<include name="**/*.jar"/>
<include name="compiletime/lib/javax.servlet.jar"/>
@ -70,7 +70,7 @@
</copy>
<copy todir="${build}/WEB-INF">
<fileset dir="${config}">
<fileset dir="${basedir}/config">
<filename name="web.xml"/>
</fileset>
</copy>
@ -101,19 +101,17 @@
<target name="compile" description="Compile web application" depends="copy">
<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 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 name="javadoc" description="Create Javadocs">
<mkdir dir="${build}/docs/api"/>
<delete>
<fileset dir="${build}/docs/api/" includes="**/*"/>
</delete>
<javadoc destdir="${build}/docs/api/" classpathref="lex-classpath" author="true" version="true" use="true" windowtitle="THDL Tibetan Collaborative Dictionary API">
<javadoc destdir="${build}/docs/api/" classpathref="classpath" author="true" version="true" use="true" windowtitle="THDL Tibetan Collaborative Dictionary API">
<fileset dir="${source}/java" defaultexcludes="yes">
<include name="org/thdl/**/*.java"/>
@ -135,6 +133,7 @@
</target>
<target name="move-log" description="move old log file">
<mkdir dir="logs"/>
<tstamp prefix="now"/>
<touch file="${basedir}/logs/hibernate.log"/>
<move file="${basedir}/logs/hibernate.log" tofile="${basedir}/logs/hibernate_${now.DSTAMP}_${now.TSTAMP}.log" overwrite="true"/>
@ -160,7 +159,7 @@
<include name="**/*.java"/>
</fileset>
</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="--config=${basedir}/config/lex-codegen-cfg.xml"/>
<arg value="${source}/java/org/thdl/lex/component/LexComponent.hbm.xml"/>
@ -189,7 +188,7 @@
</target>
<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>
<pathelement location="${build}/WEB-INF/classes"/>
</classpath>
@ -225,7 +224,7 @@
</target>
<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>
<fileset dir="src">
<include name="**/*.hbm.xml"/>

View file

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

View file

@ -1,25 +1,25 @@
package org.thdl.lex;
import org.thdl.lex.component.*;
import java.io.IOException;
import java.util.HashMap;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import java.io.IOException;
import java.util.HashMap;
import org.thdl.lex.component.*;
/**
* Description of the Class
*
*@author travis
*@created October 1, 2003
* @author travis
* @created October 1, 2003
*/
public class LexComponentFilter implements Filter
{
@ -32,8 +32,8 @@ public class LexComponentFilter implements Filter
/**
* Sets the blanks attribute of the LexComponentFilter object
*
*@param blanks The new blanks value
*@since
* @param blanks The new blanks value
* @since
*/
public void setBlanks( HashMap blanks )
{
@ -44,8 +44,8 @@ public class LexComponentFilter implements Filter
/**
* Sets the sessionMgr attribute of the LexComponentFilter object
*
*@param sessionMgr The new sessionMgr value
*@since
* @param sessionMgr The new sessionMgr value
* @since
*/
public void setSessionMgr( UserSessionManager sessionMgr )
{
@ -56,8 +56,8 @@ public class LexComponentFilter implements Filter
/**
* Gets the blanks attribute of the LexComponentFilter object
*
*@return The blanks value
*@since
* @return The blanks value
* @since
*/
public HashMap getBlanks()
{
@ -68,8 +68,8 @@ public class LexComponentFilter implements Filter
/**
* Gets the sessionMgr attribute of the LexComponentFilter object
*
*@return The sessionMgr value
*@since
* @return The sessionMgr value
* @since
*/
public UserSessionManager getSessionMgr()
{
@ -86,9 +86,9 @@ public class LexComponentFilter implements Filter
/**
* Description of the Method
*
*@param config Description of Parameter
*@exception ServletException Description of Exception
*@since
* @param config Description of Parameter
* @exception ServletException Description of Exception
* @since
*/
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.PRONUNCIATIONLABEL_VALUE, new Pronunciation() );
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.ENCYCLOPEDIA_ARTICLE_LABEL_VALUE, new EncyclopediaArticle() );
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.RELATEDTERMLABEL_VALUE, new RelatedTerm() );
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( "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 )
{
throw new ServletException( "LABE says: " + labe.getMessage() );
@ -124,12 +124,12 @@ public class LexComponentFilter implements Filter
/**
* Description of the Method
*
*@param request Description of Parameter
*@param response Description of Parameter
*@param chain Description of Parameter
*@exception IOException Description of Exception
*@exception ServletException Description of Exception
*@since
* @param request Description of Parameter
* @param response Description of Parameter
* @param chain Description of Parameter
* @exception IOException Description of Exception
* @exception ServletException Description of Exception
* @since
*/
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 );
try
{
// this if block is for TESTING ONLY
// this if block is for TESTING ONLY
if ( getBlanks().get( labelValue ) != null )
{
Class glass = getBlanks().get( labelValue ).getClass();
LexComponent component = (LexComponent) glass.newInstance();
//component.appendDebugMap( "LCFilterMadeNewInstance", component );
//component.appendDebugMap( "LCFilterMadeNewInstance", component );
req.setAttribute( LexConstants.COMPONENT_REQ_ATTR, component );
}
else
@ -188,7 +188,7 @@ public class LexComponentFilter implements Filter
/**
* Description of the Method
*
*@since
* @since
*/
public void destroy() { }
@ -199,7 +199,7 @@ public class LexComponentFilter implements Filter
/**
* Constructor for the LexComponentFilter object
*
*@since
* @since
*/
public LexComponentFilter() { }
}