Modified: incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java (original) +++ incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/NetuiDocletTask.java Mon Apr 11 23:42:11 2005 @@ -60,7 +60,7 @@ if ( message.getLine() > 0 ) { - String[] args = { Integer.valueOf( message.getLine() ).toString() }; + String[] args = { new Integer( message.getLine() ).toString() }; System.err.println( XDocletCompilerUtils.getMessage( "compiler.line", args ) ); } @@ -79,8 +79,8 @@ } System.err.println( XDocletCompilerUtils.getMessage( "compiler.build.results", - new String[]{ Integer.valueOf( errorCount ).toString(), - Integer.valueOf( warningCount ).toString(), + new String[]{ new Integer( errorCount ).toString(), + new Integer( warningCount ).toString(), sourceFile } ) ); } }
Modified: incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java (original) +++ incubator/beehive/trunk/netui/src/compiler-xdoclet/org/apache/beehive/netui/xdoclet/XDocletCompilerUtils.java Mon Apr 11 23:42:11 2005 @@ -18,10 +18,13 @@ package org.apache.beehive.netui.xdoclet; import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition; -import xjavadoc.SourceClass; +import org.apache.beehive.netui.compiler.typesystem.declaration.TypeDeclaration; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; +import org.apache.beehive.netui.compiler.xdoclet.typesystem.impl.WrapperFactory; import xjavadoc.XClass; import xjavadoc.XJavaDoc; import xjavadoc.XPackage; +import xjavadoc.Type; import java.text.MessageFormat; import java.util.Iterator; @@ -54,42 +57,127 @@ return message; } - public static XClass getXClass( String typeName ) + public static TypeDeclaration resolveTypeDeclaration( String typeName ) { - if ( typeName.endsWith( ".class" ) ) typeName = typeName.substring( 0, typeName.length() - 6 ); - XJavaDoc xJavaDoc = NetuiSubTask.get().getXJavaDoc(); + assert ! typeName.endsWith( "[]" ) : "array type not allowed here: " + typeName; + return ( TypeDeclaration ) resolveTypeInstanceOrTypeDecl( typeName, true, null, false ); + } + + private static XClass getXClass( String typeName, XJavaDoc xJavaDoc ) + { + assert ! typeName.endsWith( "[]" ) : "array type not allowed here: " + typeName; + XClass type = xJavaDoc.getXClass( typeName ); - if ( isUnknownClass( type ) ) type = xJavaDoc.getXClass( "java.lang." + typeName ); // - // If it's still unknown, try to resolve it against imports in the current source file. + // This may be an inner class, which needs a '$' instead of a '.'. // - if ( isUnknownClass( type ) && typeName.indexOf( '.' ) == -1 ) + if ( isUnknownClass( type ) ) + { + int lastDot = typeName.lastIndexOf( '.' ); + + if ( lastDot != -1 ) + { + return getXClass( typeName.substring( 0, lastDot ) + '$' + typeName.substring( lastDot + 1 ), xJavaDoc ); + } + } + + return type; + } + + private static boolean isUnknownClass( XClass xclass ) + { + return xclass == null || xclass.getClass().getName().equals( "xjavadoc.UnknownClass" ); + } + + public static TypeInstance resolveType( String typeName, boolean allowErrorType, XClass currentClass ) + { + return ( TypeInstance ) resolveTypeInstanceOrTypeDecl( typeName, allowErrorType, currentClass, true ); + } + + private static Object resolveTypeInstanceOrTypeDecl( String typeName, boolean allowUnknownType, XClass currentClass, + boolean returnTypeInstance ) + { + int arrayDimensions = 0; + + if ( typeName.endsWith( ".class" ) ) typeName = typeName.substring( 0, typeName.length() - 6 ); + + while ( typeName.endsWith( "[]" ) ) + { + typeName = typeName.substring( 0, typeName.length() - 2 ); + ++arrayDimensions; + } + + if ( currentClass == null ) currentClass = NetuiSubTask.get().getCurrentSourceClass(); + XJavaDoc xJavaDoc = currentClass.getXJavaDoc(); + + XClass originalResolvedType = getXClass( typeName, xJavaDoc ); + XClass attemptedResolvedType = originalResolvedType; + + if ( isUnknownClass( attemptedResolvedType ) ) { - SourceClass sourceClass = NetuiSubTask.get().getCurrentSourceClass(); - List importedClasses = sourceClass.getImportedClasses(); + attemptedResolvedType = getXClass( "java.lang." + typeName, xJavaDoc ); + } + if ( isUnknownClass( attemptedResolvedType ) ) + { + // See if it was an imported class. + List importedClasses = currentClass.getImportedClasses(); + String dotPrepended = '.' + typeName; + for ( Iterator i = importedClasses.iterator(); i.hasNext(); ) { XClass importedClass = ( XClass ) i.next(); - if ( importedClass.getName().equals( typeName ) ) return importedClass; + if ( importedClass.getQualifiedName().endsWith( dotPrepended ) ) + { + attemptedResolvedType = getXClass( importedClass.getQualifiedName(), xJavaDoc ); + break; + } } - - List importedPackages = sourceClass.getImportedPackages(); - + } + + if ( isUnknownClass( attemptedResolvedType ) ) + { + // See if it was in an imported package. + List importedPackages = currentClass.getImportedPackages(); + String dotPrepended = '.' + typeName; + for ( Iterator i = importedPackages.iterator(); i.hasNext(); ) { XPackage importedPackage = ( XPackage ) i.next(); - type = xJavaDoc.getXClass( importedPackage.getName() + '.' + typeName ); - if ( ! isUnknownClass( type ) ) return type; + XClass implicitImportedClass = getXClass( importedPackage.getName() + dotPrepended, xJavaDoc ); + if ( ! isUnknownClass( implicitImportedClass ) ) + { + attemptedResolvedType = implicitImportedClass; + break; + } } } + + if ( isUnknownClass( attemptedResolvedType ) ) + { + // Try it with the full outer classname appended. + String outerClassName = currentClass.getQualifiedName(); + attemptedResolvedType = getXClass( outerClassName + '.' + typeName, xJavaDoc ); + } + + if ( isUnknownClass( attemptedResolvedType ) ) + { + // Finally, it may be of the form <outer-class-short-name>.<inner-class-name> + String outerClassName = currentClass.getQualifiedName(); + int lastDot = outerClassName.lastIndexOf( '.' ); + outerClassName = lastDot != -1 ? outerClassName.substring( 0, lastDot ) : outerClassName; + attemptedResolvedType = getXClass( outerClassName + '.' + typeName, xJavaDoc ); + } - return type; - } - - public static boolean isUnknownClass( XClass xclass ) - { - return xclass == null || xclass.getClass().getName().equals( "xjavadoc.UnknownClass" ); + if ( isUnknownClass( attemptedResolvedType ) ) + { + if ( ! allowUnknownType ) return null; + if ( returnTypeInstance ) return WrapperFactory.get().getTypeInstance( originalResolvedType ); + return WrapperFactory.get().getTypeDeclaration( originalResolvedType ); + } + + if ( returnTypeInstance ) return WrapperFactory.get().getTypeInstance( attemptedResolvedType, arrayDimensions ); + return WrapperFactory.get().getTypeDeclaration( attemptedResolvedType ); } } Copied: incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build-xdoclet.xml (from r160182, incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build.xml) URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build-xdoclet.xml?view=diff&rev=161025&p1=incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build.xml&r1=160182&p2=incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build-xdoclet.xml&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build.xml (original) +++ incubator/beehive/trunk/netui/src/compiler-xdoclet/pageflow-webapp-build-xdoclet.xml Mon Apr 11 23:42:11 2005 @@ -2,26 +2,57 @@ <project name="Netui XDoclet Build" default="build" basedir="."> - <property file="pageflow-webapp-build.properties"/> + <!-- Note: ${tomcat.home} is used to pick up the Servlet/JSP APIs for compilation. This default + behavior can be overridden by changing the value of servlet-api.jar/jsp-api.jar. --> + <property environment="os"/> + <property name="tomcat.home" location="${os.CATALINA_HOME}"/> + <property name="servlet-api.jar" location="${tomcat.home}/common/lib/servlet-api.jar"/> + <property name="jsp-api.jar" location="${tomcat.home}/common/lib/jsp-api.jar"/> + + <!-- compiler.lib.dir is the directory that contains the Page Flow XDoclet compiler as well as XDoclet/XJavaDoc jars. + It defaults to "lib" in the current directory, but can be overridden. --> + <property name="compiler.lib.dir" value="lib"/> + <!-- webapp.dir must be provided externally --> + <property name="webinf.dir" value="${webapp.dir}/WEB-INF"/> <property name="temp.build.dir" value="${webinf.dir}/.tmpbeansrc"/> + <property name="webapp.classes.dir" value="${webinf.dir}/classes"/> + + <!-- this is the classpath to include when building webapp sources --> + <path id="webapp.classpath"> + <pathelement location="${webapp.classes.dir}"/> + <fileset dir="${webapp.dir}/WEB-INF/lib"> + <include name="*.jar"/> + </fileset> + <pathelement path="${servlet-api.jar}"/> + <pathelement path="${jsp-api.jar}"/> + </path> + + <path id="xdoclet-compiler.classpath"> + <path refid="webapp.classpath"/> + <fileset dir="${compiler.lib.dir}"> + <include name="*.jar"/> + </fileset> + </path> <!-- =================================================================== --> <!-- Initialise --> <!-- =================================================================== --> <target name="init"> + <available property="webapp.dir.available" file="${webapp.dir}" type="dir"/> + <fail unless="webapp.dir.available" message="Can't find the webapp directory ${webapp.dir}"/> <tstamp> <format property="TODAY" pattern="d-MM-yy"/> </tstamp> - <echo>build.class.path ( ${build.class.path} )</echo> + <echo>webapp.classpath ( ${webapp.classpath} )</echo> <taskdef name="netuidoclet" classname="org.apache.beehive.netui.xdoclet.NetuiDocletTask" - classpath="${build.class.path};${webapp.classes.dir}" /> + classpathRef="xdoclet-compiler.classpath" /> <taskdef name="source-copy" - classname="org.apache.beehive.netui.tasks.SourceCopy" - classpath="${build.class.path}" /> + classname="org.apache.beehive.netui.compiler.xdoclet.tools.SourceCopy" + classpathRef="xdoclet-compiler.classpath" /> </target> <!-- =================================================================== --> @@ -31,23 +62,25 @@ <echo>Copying pageflows and webapp source files for compilation...</echo> - <!-- copy all java and jpf files to a temp directory --> + <!-- copy all java and jpf/jpfs files to a temp directory --> <delete dir="${temp.build.dir}" /> <mkdir dir="${temp.build.dir}" /> <source-copy todir="${temp.build.dir}"> - <fileset dir="${src.dir}"> + <fileset dir="${webapp.dir}"> <include name="**/*.java" /> <include name="**/*.jpf" /> + <include name="**/*.jpfs" /> <include name="**/*.app" /> </fileset> <fileset dir="${webinf.dir}/src"> <include name="**/*.java" /> <include name="**/*.jpf" /> + <include name="**/*.jpfs" /> <include name="**/*.app" /> </fileset> </source-copy> - <!-- rename .jpf and .app to .java --> + <!-- rename .jpf/.jpfs and .app to .java --> <move todir="${temp.build.dir}"> <fileset dir="${temp.build.dir}"> <include name="**/*.jpf"/> @@ -56,6 +89,12 @@ </move> <move todir="${temp.build.dir}"> <fileset dir="${temp.build.dir}"> + <include name="**/*.jpfs"/> + </fileset> + <mapper type="glob" from="*.jpfs" to="*.java"/> + </move> + <move todir="${temp.build.dir}"> + <fileset dir="${temp.build.dir}"> <include name="**/Global.app"/> </fileset> <mapper type="glob" from="*.app" to="*.java"/> @@ -67,8 +106,8 @@ <mkdir dir="${webapp.classes.dir}" /> <javac srcdir="${temp.build.dir}" destdir="${webapp.classes.dir}" - classpath="${build.class.path}" - source="${compile.source}"> + classpathRef="webapp.classpath" + source="1.4"> <include name="**/*.java"/> </javac> @@ -76,7 +115,7 @@ <!-- set verbose="true" to view informational messages --> <netuidoclet - webapproot="${webapp.root.dir}" + webapproot="${webapp.dir}" excludedtags="@version,@author,@todo" force="true" verbose="false" @@ -97,21 +136,11 @@ <!-- =================================================================== --> <!-- Clean --> <!-- =================================================================== --> - <target name="clean"> + <target name="clean" depends="init"> <delete dir="${temp.build.dir}"/> <delete dir="${webapp.classes.dir}"/> - <!-- delete gen'd struts-config files too? --> - </target> - - <target name="update.libs" description="Update the netui jars in this webapp"> - <copy file="${netui.scoping.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.util.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.pageflow.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.tags.html.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.tags.databinding.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.tags.template.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${netui.generic.webapp.jar}" todir="${webinf.dir}/lib" overwrite="true" /> - <copy file="${struts.jar}" todir="${webinf.dir}/lib" overwrite="true" /> + <delete dir="${webinf.dir}/.pageflow-struts-generated"/> + <delete dir="${temp.build.dir}"/> </target> </project> Modified: incubator/beehive/trunk/netui/src/compiler/build.xml URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/build.xml?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/build.xml (original) +++ incubator/beehive/trunk/netui/src/compiler/build.xml Mon Apr 11 23:42:11 2005 @@ -28,7 +28,7 @@ debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" - source="${compile.source}"> + source="1.5"> <include name="**/*.java"/> </javac> Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java Mon Apr 11 23:42:11 2005 @@ -64,7 +64,7 @@ public Collection supportedOptions() { - return Collections.emptyList(); + return Collections.EMPTY_LIST; } public AnnotationProcessor getProcessorFor( AnnotationTypeDeclaration[] atds, AnnotationProcessorEnvironment env ) Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/WrapperFactory.java Mon Apr 11 23:42:11 2005 @@ -33,7 +33,7 @@ import org.apache.beehive.netui.compiler.typesystem.type.InterfaceType; import org.apache.beehive.netui.compiler.typesystem.type.PrimitiveType; import org.apache.beehive.netui.compiler.typesystem.type.ReferenceType; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; import org.apache.beehive.netui.compiler.typesystem.type.TypeVariable; import org.apache.beehive.netui.compiler.typesystem.type.VoidType; @@ -53,7 +53,7 @@ return INSTANCE; } - public TypeMirror getTypeMirror( com.sun.mirror.type.TypeMirror delegate ) + public TypeInstance getTypeInstance( com.sun.mirror.type.TypeMirror delegate ) { if ( delegate == null ) return null; @@ -166,11 +166,11 @@ return new AnnotationTypeImpl( delegate ); } - public AnnotationMirror getAnnotationMirror( com.sun.mirror.declaration.AnnotationMirror delegate ) + public AnnotationInstance getAnnotationInstance( com.sun.mirror.declaration.AnnotationMirror delegate ) { if ( delegate == null ) return null; - return new AnnotationMirrorImpl( delegate ); + return new AnnotationInstanceImpl( delegate ); } public AnnotationValue getAnnotationValue( com.sun.mirror.declaration.AnnotationValue delegate ) @@ -332,7 +332,7 @@ if ( o instanceof com.sun.mirror.type.TypeMirror ) { - return getTypeMirror( ( com.sun.mirror.type.TypeMirror ) o ); + return getTypeInstance( ( com.sun.mirror.type.TypeMirror ) o ); } else if ( o instanceof com.sun.mirror.declaration.Declaration ) { @@ -340,7 +340,7 @@ } else if ( o instanceof com.sun.mirror.declaration.AnnotationMirror ) { - return getAnnotationMirror( ( com.sun.mirror.declaration.AnnotationMirror ) o ); + return getAnnotationInstance( ( com.sun.mirror.declaration.AnnotationMirror ) o ); } else if ( o instanceof com.sun.mirror.declaration.AnnotationValue ) { Copied: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationInstanceImpl.java (from r159330, incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationMirrorImpl.java) URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationInstanceImpl.java?view=diff&rev=161025&p1=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationMirrorImpl.java&r1=159330&p2=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationInstanceImpl.java&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationMirrorImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/AnnotationInstanceImpl.java Mon Apr 11 23:42:11 2005 @@ -17,7 +17,7 @@ */ package org.apache.beehive.netui.compiler.typesystem.impl.declaration; -import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationMirror; +import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance; import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationTypeElementDeclaration; import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationValue; import org.apache.beehive.netui.compiler.typesystem.impl.DelegatingImpl; @@ -30,13 +30,13 @@ import java.util.Map; import java.util.Set; -public class AnnotationMirrorImpl +public class AnnotationInstanceImpl extends DelegatingImpl - implements AnnotationMirror + implements AnnotationInstance { private Map< AnnotationTypeElementDeclaration, AnnotationValue > _elementValues; - public AnnotationMirrorImpl( com.sun.mirror.declaration.AnnotationMirror delegate ) + public AnnotationInstanceImpl( com.sun.mirror.declaration.AnnotationMirror delegate ) { super( delegate ); } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/DeclarationImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/DeclarationImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/DeclarationImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/DeclarationImpl.java Mon Apr 11 23:42:11 2005 @@ -18,7 +18,7 @@ package org.apache.beehive.netui.compiler.typesystem.impl.declaration; import org.apache.beehive.netui.compiler.typesystem.declaration.Declaration; -import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationMirror; +import org.apache.beehive.netui.compiler.typesystem.declaration.AnnotationInstance; import org.apache.beehive.netui.compiler.typesystem.declaration.Modifier; import org.apache.beehive.netui.compiler.typesystem.util.SourcePosition; import org.apache.beehive.netui.compiler.typesystem.impl.env.SourcePositionImpl; @@ -33,7 +33,7 @@ extends DelegatingImpl implements Declaration { - private AnnotationMirror[] _annotations; + private AnnotationInstance[] _annotations; private Set _modifiers; public DeclarationImpl( com.sun.mirror.declaration.Declaration delegate ) @@ -46,16 +46,16 @@ return getDelegate().getDocComment(); } - public AnnotationMirror[] getAnnotationMirrors() + public AnnotationInstance[] getAnnotationInstances() { if ( _annotations == null ) { Collection<com.sun.mirror.declaration.AnnotationMirror> delegateCollection = getDelegate().getAnnotationMirrors(); - AnnotationMirror[] array = new AnnotationMirror[delegateCollection.size()]; + AnnotationInstance[] array = new AnnotationInstance[delegateCollection.size()]; int j = 0; for ( com.sun.mirror.declaration.AnnotationMirror i : delegateCollection ) { - array[j++] = WrapperFactory.get().getAnnotationMirror( i ); + array[j++] = WrapperFactory.get().getAnnotationInstance( i ); } _annotations = array; } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/FieldDeclarationImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/FieldDeclarationImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/FieldDeclarationImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/FieldDeclarationImpl.java Mon Apr 11 23:42:11 2005 @@ -19,7 +19,7 @@ import org.apache.beehive.netui.compiler.typesystem.declaration.FieldDeclaration; import org.apache.beehive.netui.compiler.typesystem.impl.WrapperFactory; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; public class FieldDeclarationImpl extends MemberDeclarationImpl @@ -30,9 +30,9 @@ super( delegate ); } - public TypeMirror getType() + public TypeInstance getType() { - return WrapperFactory.get().getTypeMirror( getDelegate().getType() ); + return WrapperFactory.get().getTypeInstance( getDelegate().getType() ); } public Object getConstantValue() Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/MethodDeclarationImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/MethodDeclarationImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/MethodDeclarationImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/MethodDeclarationImpl.java Mon Apr 11 23:42:11 2005 @@ -19,7 +19,7 @@ import org.apache.beehive.netui.compiler.typesystem.declaration.MethodDeclaration; import org.apache.beehive.netui.compiler.typesystem.impl.WrapperFactory; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; public class MethodDeclarationImpl extends ExecutableDeclarationImpl @@ -30,8 +30,8 @@ super( delegate ); } - public TypeMirror getReturnType() + public TypeInstance getReturnType() { - return WrapperFactory.get().getTypeMirror( ( ( com.sun.mirror.declaration.MethodDeclaration ) getDelegate() ).getReturnType() ); + return WrapperFactory.get().getTypeInstance( ( ( com.sun.mirror.declaration.MethodDeclaration ) getDelegate() ).getReturnType() ); } } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/ParameterDeclarationImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/ParameterDeclarationImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/ParameterDeclarationImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/declaration/ParameterDeclarationImpl.java Mon Apr 11 23:42:11 2005 @@ -19,7 +19,7 @@ import org.apache.beehive.netui.compiler.typesystem.declaration.ParameterDeclaration; import org.apache.beehive.netui.compiler.typesystem.impl.WrapperFactory; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; public class ParameterDeclarationImpl extends DeclarationImpl @@ -30,9 +30,9 @@ super( delegate ); } - public TypeMirror getType() + public TypeInstance getType() { - return WrapperFactory.get().getTypeMirror( ( ( com.sun.mirror.declaration.ParameterDeclaration ) getDelegate() ).getType() ); + return WrapperFactory.get().getTypeInstance( ( ( com.sun.mirror.declaration.ParameterDeclaration ) getDelegate() ).getType() ); } } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ArrayTypeImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ArrayTypeImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ArrayTypeImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ArrayTypeImpl.java Mon Apr 11 23:42:11 2005 @@ -18,7 +18,7 @@ package org.apache.beehive.netui.compiler.typesystem.impl.type; import org.apache.beehive.netui.compiler.typesystem.type.ArrayType; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; import org.apache.beehive.netui.compiler.typesystem.impl.WrapperFactory; public class ArrayTypeImpl @@ -30,8 +30,8 @@ super( delegate ); } - public TypeMirror getComponentType() + public TypeInstance getComponentType() { - return WrapperFactory.get().getTypeMirror( ( ( com.sun.mirror.type.ArrayType ) getDelegate() ).getComponentType() ); + return WrapperFactory.get().getTypeInstance( ( ( com.sun.mirror.type.ArrayType ) getDelegate() ).getComponentType() ); } } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/DeclaredTypeImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/DeclaredTypeImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/DeclaredTypeImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/DeclaredTypeImpl.java Mon Apr 11 23:42:11 2005 @@ -46,9 +46,9 @@ } /* - public TypeMirror[] getActualTypeArguments() + public TypeInstance[] getActualTypeArguments() { - return new TypeMirror[0]; + return new TypeInstance[0]; } */ Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/PrimitiveTypeImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/PrimitiveTypeImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/PrimitiveTypeImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/PrimitiveTypeImpl.java Mon Apr 11 23:42:11 2005 @@ -20,7 +20,7 @@ import org.apache.beehive.netui.compiler.typesystem.type.PrimitiveType; public class PrimitiveTypeImpl - extends TypeMirrorImpl + extends TypeInstanceImpl implements PrimitiveType { public PrimitiveTypeImpl( com.sun.mirror.type.PrimitiveType delegate ) Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ReferenceTypeImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ReferenceTypeImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ReferenceTypeImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/ReferenceTypeImpl.java Mon Apr 11 23:42:11 2005 @@ -20,7 +20,7 @@ import org.apache.beehive.netui.compiler.typesystem.type.ReferenceType; public class ReferenceTypeImpl - extends TypeMirrorImpl + extends TypeInstanceImpl implements ReferenceType { public ReferenceTypeImpl( com.sun.mirror.type.ReferenceType delegate ) Copied: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeInstanceImpl.java (from r159330, incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeMirrorImpl.java) URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeInstanceImpl.java?view=diff&rev=161025&p1=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeMirrorImpl.java&r1=159330&p2=incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeInstanceImpl.java&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeMirrorImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/TypeInstanceImpl.java Mon Apr 11 23:42:11 2005 @@ -17,14 +17,14 @@ */ package org.apache.beehive.netui.compiler.typesystem.impl.type; -import org.apache.beehive.netui.compiler.typesystem.type.TypeMirror; +import org.apache.beehive.netui.compiler.typesystem.type.TypeInstance; import org.apache.beehive.netui.compiler.typesystem.impl.DelegatingImpl; -public class TypeMirrorImpl +public class TypeInstanceImpl extends DelegatingImpl - implements TypeMirror + implements TypeInstance { - public TypeMirrorImpl( com.sun.mirror.type.TypeMirror delegate ) + public TypeInstanceImpl( com.sun.mirror.type.TypeMirror delegate ) { super( delegate ); } Modified: incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/VoidTypeImpl.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/VoidTypeImpl.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/VoidTypeImpl.java (original) +++ incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/typesystem/impl/type/VoidTypeImpl.java Mon Apr 11 23:42:11 2005 @@ -20,7 +20,7 @@ import org.apache.beehive.netui.compiler.typesystem.type.VoidType; public class VoidTypeImpl - extends TypeMirrorImpl + extends TypeInstanceImpl implements VoidType { public VoidTypeImpl( com.sun.mirror.type.VoidType delegate ) Added: incubator/beehive/trunk/netui/src/pageflow-jdk14/build.xml URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow-jdk14/build.xml?view=auto&rev=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow-jdk14/build.xml (added) +++ incubator/beehive/trunk/netui/src/pageflow-jdk14/build.xml Mon Apr 11 23:42:11 2005 @@ -0,0 +1,63 @@ +<?xml version="1.0"?> + +<project name="Beehive/NetUI/PageFlow-JDK1.4" default="build" basedir="."> + + <import file="../../netui-imports.xml"/> + + <property name="module.name" value="pageflow-jdk14"/> + <property name="module.dir" location="${src.dir}/${module.name}"/> + <property name="module.classes.dir" location="${classes.dir}/${module.name}"/> + + <path id="module.classpath"> + <path refid="xbean.dependency.path"/> + <path refid="servlet.dependency.path"/> + <pathelement path="${classes.dir}/pageflow"/> + <pathelement path="${classes.dir}/util"/> + </path> + + <target name="build"> + <echo>compile module: ${module.name}</echo> + <property name="classpath" refid="module.classpath"/> + <echo>module classpath: ${classpath}</echo> + <echo>basedir: ${basedir}</echo> + + <mkdir dir="${module.classes.dir}"/> + + <javac srcdir="${module.dir}" + destdir="${module.classes.dir}" + classpathref="module.classpath" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="${compile.source}" + target="${compile.target}"> + <include name="**/*.java"/> + </javac> + + <copy todir="${module.classes.dir}"> + <fileset dir="${module.dir}" includes="**/*.properties"/> + <fileset dir="${module.dir}" includes="**/*.xml"/> + <fileset dir="${module.dir}" includes="META-INF/**"/> + </copy> + + <jar jarfile="${build.lib.dir}/beehive-netui-pageflow-jdk14.jar" basedir="${classes.dir}/${module.name}"> + <manifest> + <attribute name="Extension-Name" value="Beehive NetUI "/> + <attribute name="Specification-Title" value="Beehive NetUI - support for JDK1.4"/> + <attribute name="Specification-Vendor" value="Apache Software Foundation"/> + <attribute name="Specification-Version" value="${beehive.version}"/> + <attribute name="Implementation-Vendor" value="Apache Software Foundation"/> + <attribute name="Implementation-Version" value="${beehive.version}"/> + <attribute name="Beehive-Version" value="${beehive.version}"/> + </manifest> + </jar> + + <!-- Update the jar with all the other classes (etc.) from beehive-netui-pageflow.jar --> + <jar jarfile="${build.lib.dir}/beehive-netui-pageflow-jdk14.jar" basedir="${classes.dir}/pageflow" update="true" duplicate="fail" excludes="**/JavaControlUtils*.class"/> + </target> + + <target name="clean"> + <delete dir="${module.classes.dir}"/> + </target> + +</project> Propchange: incubator/beehive/trunk/netui/src/pageflow-jdk14/build.xml ------------------------------------------------------------------------------ svn:eol-style = native Added: incubator/beehive/trunk/netui/src/pageflow-jdk14/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow-jdk14/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java?view=auto&rev=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow-jdk14/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java (added) +++ incubator/beehive/trunk/netui/src/pageflow-jdk14/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java Mon Apr 11 23:42:11 2005 @@ -0,0 +1,57 @@ +/* + * Copyright 2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * $Header:$ + */ +package org.apache.beehive.netui.pageflow.internal; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.ServletContext; + +import org.apache.beehive.netui.util.logging.Logger; +import org.apache.beehive.netui.pageflow.PageFlowManagedObject; + + +/** + * @exclude + */ +public class JavaControlUtils +{ + private static final Logger _log = Logger.getInstance( JavaControlUtils.class ); + + public static void initializeControlContext( HttpServletRequest request, HttpServletResponse response, + ServletContext servletContext ) + { + } + + public static void uninitializeControlContext( HttpServletRequest request, HttpServletResponse response, + ServletContext servletContext ) + { + } + + public static void destroyControl( Object controlInstance ) + { + } + + public static void initJavaControls( HttpServletRequest request, HttpServletResponse response, + ServletContext servletContext, PageFlowManagedObject controlClient ) + { + } + + public static void uninitJavaControls( ServletContext servletContext, PageFlowManagedObject controlClient ) + { + } +} Propchange: incubator/beehive/trunk/netui/src/pageflow-jdk14/org/apache/beehive/netui/pageflow/internal/JavaControlUtils.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: incubator/beehive/trunk/netui/src/pageflow/build.xml URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/build.xml?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/build.xml (original) +++ incubator/beehive/trunk/netui/src/pageflow/build.xml Mon Apr 11 23:42:11 2005 @@ -6,6 +6,8 @@ <property name="module.name" value="pageflow"/> <property name="module.dir" location="${src.dir}/${module.name}"/> + <property name="compiler-core.module.dir" location="${src.dir}/compiler-core"/> + <property name="module.classes.dir" value="${classes.dir}/${module.name}"/> <path id="module.classpath"> <path refid="commons-el.dependency.path"/> @@ -27,31 +29,53 @@ <echo>module classpath: ${classpath}</echo> <echo>debug: ${compile.debug}</echo> - <mkdir dir="${classes.dir}/${module.name}"/> + <mkdir dir="${module.classes.dir}"/> + <!-- run the XMLBean compiler for the schema(s) in this module --> <ant antfile="${netui.ant.dir}/xmlBean.xml"> <property name="xsd.root.dir" value="${module.dir}/schema/"/> - <property name="class.output.dir" value="${classes.dir}/${module.name}"/> + <property name="class.output.dir" value="${module.classes.dir}"/> <property name="xbean.inputs" value="${module.dir}/schema/*.xsd*"/> <property name="xbean.output" value="${build.lib.dir}/${pageflow.jar.name}"/> </ant> + <!-- run the XMLBean compiler for the processed-annotations schema, in the compiler module --> + <ant antfile="${netui.ant.dir}/xmlBean.xml"> + <property name="xsd.root.dir" value="${compiler-core.module.dir}/schema/processed-annotations"/> + <property name="class.output.dir" value="${module.classes.dir}"/> + <property name="xbean.inputs" value="${compiler-core.module.dir}/schema/processed-annotations/*.xsd*"/> + <property name="xbean.output" value="${module.classes.dir}/org/apache/beehive/netui/compiler/schema/annotations/ProcessedAnnotationsDocument.class"/> + </ant> + + + <javac srcdir="${module.dir}" + destdir="${module.classes.dir}" + classpathref="module.classpath" + debug="${compile.debug}" + deprecation="${compile.deprecation}" + optimize="${compile.optimize}" + source="1.5"> + <include name="**/Jpf.java"/> + </javac> + <javac srcdir="${module.dir}" - destdir="${classes.dir}/${module.name}" + destdir="${module.classes.dir}" classpathref="module.classpath" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" - source="${compile.source}"> + source="${compile.source}" + target="${compile.target}"> <include name="**/*.java"/> + <exclude name="**/Jpf.java"/> </javac> - <copy todir="${classes.dir}/${module.name}"> + <copy todir="${module.classes.dir}"> <fileset dir="${module.dir}" includes="**/*.properties"/> </copy> <jar jarfile="${build.lib.dir}/${pageflow.jar.name}"> - <fileset dir="${classes.dir}/${module.name}"> + <fileset dir="${module.classes.dir}"> <include name="**/*.class"/> <include name="**/*.properties"/> <include name="**/*.xsb"/> @@ -71,7 +95,7 @@ </target> <target name="clean"> - <delete dir="${classes.dir}/${module.name}"/> + <delete dir="${module.classes.dir}" failonerror="true"/> <delete file="${build.lib.dir}/${pageflow.jar.name}"/> </target> Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/AutoRegisterActionServlet.java Mon Apr 11 23:42:11 2005 @@ -59,7 +59,9 @@ import java.util.Enumeration; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; +import java.util.Iterator; + +import org.apache.beehive.netui.util.internal.concurrent.InternalConcurrentHashMap; /** @@ -77,7 +79,7 @@ public static String MODULE_CONFIG_LOCATOR_CLASS_ATTR = "moduleConfigLocators"; /** Map of module-path to ModuleConfig */ - private Map< String, ModuleConfig > _registeredModules = new ConcurrentHashMap< String, ModuleConfig >(); + private Map/*< String, ModuleConfig >*/ _registeredModules = new InternalConcurrentHashMap/*< String, ModuleConfig >*/(); private transient Digester _cachedConfigDigester = null; private Map _configParams = null; private ModuleConfigLocator[] _moduleConfigLocators = null; @@ -97,7 +99,7 @@ private void setupModuleConfigLocators() { ModuleConfigLocator[] defaultLocators = getDefaultModuleConfigLocators(); - ArrayList< ModuleConfigLocator > locators = new ArrayList< ModuleConfigLocator >(); + ArrayList/*< ModuleConfigLocator >*/ locators = new ArrayList/*< ModuleConfigLocator >*/(); for ( int i =0; i < defaultLocators.length; ++i ) { @@ -146,10 +148,10 @@ } } - _moduleConfigLocators = locators.toArray( new ModuleConfigLocator[locators.size()] ); + _moduleConfigLocators = ( ModuleConfigLocator[] ) locators.toArray( new ModuleConfigLocator[locators.size()] ); } - private static void addModuleConfigLocator( String locatorClassName, ArrayList< ModuleConfigLocator > locators ) + private static void addModuleConfigLocator( String locatorClassName, ArrayList/*< ModuleConfigLocator >*/ locators ) { try { @@ -539,7 +541,7 @@ if ( _log.isInfoEnabled() ) { - StringBuilder msg = new StringBuilder( "Dynamically registering module " ).append( modulePath ); + StringBuffer msg = new StringBuffer( "Dynamically registering module " ).append( modulePath ); _log.info( msg.append( ", config XML " ).append( configFilePath ).toString() ); } @@ -627,7 +629,7 @@ if ( _log.isErrorEnabled() ) { - StringBuilder msg = new StringBuilder( "No module configuration registered for " ); + StringBuffer msg = new StringBuffer( "No module configuration registered for " ); msg.append( relativeURI ).append( " (module path " ).append( modulePath ).append( ")." ); _log.error( msg.toString() ); } @@ -637,7 +639,8 @@ // if ( modulePath.length() == 0 ) modulePath = "/"; InternalUtils.sendDevTimeError( "PageFlow_NoModuleConf", null, HttpServletResponse.SC_NOT_FOUND, - request, response, servletContext, relativeURI, modulePath ); + request, response, servletContext, + new Object[]{ relativeURI, modulePath } ); } } } @@ -682,7 +685,7 @@ { ensureModuleRegistered( modulePath, request ); - ModuleConfig mc = _registeredModules.get( modulePath ); + ModuleConfig mc = ( ModuleConfig ) _registeredModules.get( modulePath ); if ( mc.getPrefix() == null ) { @@ -715,7 +718,7 @@ // are consistent, and the worst that will happen is that the module will get // registered with a valid ModuleConfig a few times. // - ModuleConfig ac = _registeredModules.get( modulePath ); + ModuleConfig ac = ( ModuleConfig ) _registeredModules.get( modulePath ); if ( ac == null ) { @@ -877,8 +880,9 @@ { ServletContext servletContext = getServletContext(); - for ( String modulePrefix : _registeredModules.keySet() ) + for ( Iterator ii = _registeredModules.keySet().iterator(); ii.hasNext(); ) { + String modulePrefix = ( String ) ii.next(); servletContext.removeAttribute( Globals.MODULE_KEY + modulePrefix ); } Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/DefaultServletContainerAdapter.java Mon Apr 11 23:42:11 2005 @@ -28,7 +28,6 @@ import javax.servlet.http.HttpServletResponse; import javax.security.auth.login.LoginException; -import org.apache.beehive.controls.api.context.ControlBeanContext; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; @@ -50,7 +49,7 @@ if ( productionModeFlag != null ) { - _productionMode = Boolean.parseBoolean( productionModeFlag ); + _productionMode = Boolean.valueOf( productionModeFlag ).booleanValue(); } else { @@ -136,7 +135,7 @@ { } - public ControlBeanContext createControlBeanContext( HttpServletRequest request, HttpServletResponse response ) + public Object createControlBeanContext( HttpServletRequest request, HttpServletResponse response ) { return new PageFlowBeanContext(); } @@ -311,7 +310,7 @@ private static class LogMsg { private String _eventName; - private StringBuilder _logMessage; + private StringBuffer _logMessage; public LogMsg( String eventName ) { @@ -322,7 +321,7 @@ { if ( _logMessage == null ) { - _logMessage = new StringBuilder( _eventName ).append( ": " ); + _logMessage = new StringBuffer( _eventName ).append( ": " ); } else { Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/ExpressionMessage.java Mon Apr 11 23:42:11 2005 @@ -23,7 +23,7 @@ public class ExpressionMessage extends ActionMessage { - public ExpressionMessage( String expression, Object ... messageArgs ) + public ExpressionMessage( String expression, Object[] messageArgs ) { super( InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + expression, expressionizeArgs( messageArgs ) ); } @@ -35,6 +35,8 @@ private static Object[] expressionizeArgs( Object[] args ) { + if ( args == null ) return null; + for ( int i = 0; i < args.length; i++ ) { args[i] = InternalConstants.MESSAGE_IS_EXPRESSION_PREFIX + args[i]; Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBean.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBean.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBean.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FacesBackingBean.java Mon Apr 11 23:42:11 2005 @@ -70,6 +70,8 @@ public void reinitialize( HttpServletRequest request, HttpServletResponse response, ServletContext servletContext ) { + super.reinitialize( request, response, servletContext ); + if ( _pageInputs == null ) { Map map = InternalUtils.getActionOutputMap( request, false ); @@ -104,10 +106,10 @@ if ( fieldIsUninitialized( field ) ) { - Map< String, SharedFlowController > sharedFlows = PageFlowUtils.getSharedFlows( request ); + Map/*< String, SharedFlowController >*/ sharedFlows = PageFlowUtils.getSharedFlows( request ); String name = fi.sharedFlowName; SharedFlowController sf = - name != null ? sharedFlows.get( name ) : PageFlowUtils.getGlobalApp( request ); + name != null ? ( SharedFlowController ) sharedFlows.get( name ) : PageFlowUtils.getGlobalApp( request ); if ( sf != null ) { @@ -121,8 +123,6 @@ } } } - - super.reinitialize( request, response, servletContext ); } protected Object getPageInput( String pageInputName ) @@ -142,7 +142,7 @@ if ( info == null ) { - info = new CachedFacesBackingInfo( getClass() ); + info = new CachedFacesBackingInfo( getClass(), getServletContext() ); cache.setCacheObject( CACHED_INFO_KEY, info ); } Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowController.java Mon Apr 11 23:42:11 2005 @@ -18,11 +18,11 @@ package org.apache.beehive.netui.pageflow; import org.apache.beehive.netui.core.urls.MutableURI; -import org.apache.beehive.netui.pageflow.annotations.Jpf; import org.apache.beehive.netui.pageflow.config.PageFlowActionMapping; import org.apache.beehive.netui.pageflow.internal.InternalUtils; import org.apache.beehive.netui.pageflow.internal.InternalExpressionUtils; import org.apache.beehive.netui.pageflow.internal.AdapterManager; +import org.apache.beehive.netui.pageflow.internal.InternalConstants; import org.apache.beehive.netui.pageflow.handler.LoginHandler; import org.apache.beehive.netui.pageflow.handler.ExceptionsHandler; import org.apache.beehive.netui.pageflow.handler.Handlers; @@ -65,7 +65,6 @@ import java.util.Locale; import java.util.Map; -import static org.apache.beehive.netui.pageflow.internal.InternalConstants.ATTR_PREFIX; /** @@ -85,8 +84,8 @@ { private static final Logger _log = Logger.getInstance( FlowController.class ); - private static final String ONCREATE_EXCEPTION_FORWARD = ATTR_PREFIX + "onCreateException"; - private static final String CACHEID_ACTION_METHODS = ATTR_PREFIX + "actionMethods"; + private static final String ONCREATE_EXCEPTION_FORWARD = InternalConstants.ATTR_PREFIX + "onCreateException"; + private static final String CACHEID_ACTION_METHODS = InternalConstants.ATTR_PREFIX + "actionMethods"; private static final int DEFAULT_MAX_CONCURRENT_REQUEST_COUNT = 4; private static final String MAX_CONCURRENT_REQUESTS_PARAM = "pageflow-max-concurrent-requests"; private static final int EXCEEDED_MAX_CONCURRENT_REQUESTS_ERRORCODE = 503; @@ -177,9 +176,9 @@ // Cache the associated ModuleConfig. This is used throughout the code, in places where the request // isn't available to do a lazy initialization. // + super.reinitialize( request, response, servletContext ); initModuleConfig( servletContext, request ); servlet = getServlet(); - super.reinitialize( request, response, servletContext ); } /** @@ -235,7 +234,8 @@ protected void sendError( String errText, HttpServletRequest request, HttpServletResponse response ) throws IOException { - InternalUtils.sendError( "PageFlow_Custom_Error", null, request, response, getDisplayName(), errText ); + InternalUtils.sendError( "PageFlow_Custom_Error", null, request, response, + new Object[]{ getDisplayName(), errText } ); } /** @@ -752,7 +752,7 @@ if ( _log.isWarnEnabled() ) { - StringBuilder msg = new StringBuilder( "Could not find matching action method for action=" ); + StringBuffer msg = new StringBuffer( "Could not find matching action method for action=" ); msg.append( actionName ).append( ", form=" ); msg.append( inputForm != null ? inputForm.getClass().getName() :"[none]" ); _log.warn( msg.toString() ); @@ -765,7 +765,7 @@ private static String getFormQualifiedActionPath( Class formClass, String actionPath ) { - StringBuilder ret = new StringBuilder( actionPath ); + StringBuffer ret = new StringBuffer( actionPath ); ret.append( '_' ); ret.append( formClass.getName().replace( '.', '_' ).replace( '$', '_' ) ); return ret.toString(); @@ -817,7 +817,7 @@ _log.debug( "Invoking action method " + method.getName() + "()" ); } - return ( ActionForward ) method.invoke( this ); + return ( ActionForward ) method.invoke( this, null ); } } finally @@ -1416,7 +1416,7 @@ * @param messageKey the message-resources key for the message. * @param messageArgs zero or more arguments to the message. */ - public void addActionError( String propertyName, String messageKey, Object ... messageArgs ) + public void addActionError( String propertyName, String messageKey, Object[] messageArgs ) { InternalUtils.addActionError( propertyName, new ActionMessage( messageKey, messageArgs ), getRequest() ); } @@ -1428,7 +1428,7 @@ * @param expression the expression that will be evaluated to generate the error message. * @param messageArgs zero or more arguments to the message. */ - public void addActionErrorExpression( String propertyName, String expression, Object ... messageArgs ) + public void addActionErrorExpression( String propertyName, String expression, Object[] messageArgs ) { InternalUtils.addActionError( propertyName, new ExpressionMessage( expression, messageArgs ), getRequest() ); } @@ -1464,17 +1464,17 @@ ServletContext servletContext ) { - Map< String, String > conditionalForwards = mapping.getConditionalForwardsMap(); + Map/*< String, String >*/ conditionalForwards = mapping.getConditionalForwardsMap(); if ( ! conditionalForwards.isEmpty() ) { Object formBean = InternalUtils.unwrapFormBean( wrappedFormBean ); - for ( Iterator< Map.Entry< String, String > > i = conditionalForwards.entrySet().iterator(); i.hasNext(); ) + for ( Iterator/*< Map.Entry< String, String > >*/ i = conditionalForwards.entrySet().iterator(); i.hasNext(); ) { - Map.Entry< String, String > entry = i.next(); - String expression = entry.getKey(); - String forwardName = entry.getValue(); + Map.Entry/*< String, String >*/ entry = ( Map.Entry ) i.next(); + String expression = ( String ) entry.getKey(); + String forwardName = ( String ) entry.getValue(); try { Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FlowControllerFactory.java Mon Apr 11 23:42:11 2005 @@ -38,6 +38,7 @@ import java.io.IOException; import java.util.Map; import java.util.LinkedHashMap; +import java.util.Iterator; /** @@ -373,7 +374,7 @@ * @throws InstantiationException if a declared shared flow class could not be instantiated. * @throws IllegalAccessException if a declared shared flow class was not accessible. */ - public Map< String, SharedFlowController > getSharedFlowsForRequest( RequestContext context ) + public Map/*< String, SharedFlowController >*/ getSharedFlowsForRequest( RequestContext context ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { String path = InternalUtils.getDecodedServletPath( context.getHttpRequest() ); @@ -392,7 +393,7 @@ * @throws InstantiationException if a declared shared flow class could not be instantiated. * @throws IllegalAccessException if a declared shared flow class was not accessible. */ - public Map< String, SharedFlowController > getSharedFlowsForPath( RequestContext context, String path ) + public Map/*< String, SharedFlowController >*/ getSharedFlowsForPath( RequestContext context, String path ) throws ClassNotFoundException, InstantiationException, IllegalAccessException { String parentDir = PageFlowUtils.getModulePathForRelativeURI( path ); @@ -406,17 +407,18 @@ if ( cc instanceof PageFlowControllerConfig ) { - Map< String, String > sharedFlowTypes = ( ( PageFlowControllerConfig ) cc ).getSharedFlowTypes(); + Map/*< String, String >*/ sharedFlowTypes = ( ( PageFlowControllerConfig ) cc ).getSharedFlowTypes(); if ( sharedFlowTypes != null && sharedFlowTypes.size() > 0 ) { - LinkedHashMap< String, SharedFlowController > sharedFlows = - new LinkedHashMap< String, SharedFlowController >(); + LinkedHashMap/*< String, SharedFlowController >*/ sharedFlows = + new LinkedHashMap/*< String, SharedFlowController >*/(); - for ( Map.Entry< String, String > entry : sharedFlowTypes.entrySet() ) + for ( Iterator/*<Map.Entry>*/ i = sharedFlowTypes.entrySet().iterator(); i.hasNext(); ) { - String name = entry.getKey(); - String className = entry.getValue(); + Map.Entry entry = ( Map.Entry ) i.next(); + String name = ( String ) entry.getKey(); + String className = ( String ) entry.getValue(); SharedFlowController sf = PageFlowUtils.getSharedFlow( className, request ); // Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FormData.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FormData.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FormData.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/FormData.java Mon Apr 11 23:42:11 2005 @@ -129,9 +129,8 @@ { try { - Validator validator = - ( Validator ) _legacyInitValidatorMethod.invoke( Resources.class, beanName, bean, context, - request, errors, page ); + Object[] args = new Object[]{ beanName, bean, context, request, errors, new Integer( page ) }; + Validator validator = ( Validator ) _legacyInitValidatorMethod.invoke( Resources.class, args ); // // The NetUI validator rules work on both 1.1 and 1.2. They take ActionMessages instead of ActionErrors. Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/Forward.java Mon Apr 11 23:42:11 2005 @@ -41,8 +41,6 @@ import org.apache.beehive.netui.pageflow.handler.ReloadableClassHandler; import org.apache.beehive.netui.pageflow.handler.Handlers; -import org.apache.beehive.netui.pageflow.annotations.Jpf; - /** * An object of this type is returned from an action methods in a [EMAIL PROTECTED] PageFlowController} to @@ -76,7 +74,7 @@ private static final String RETURN_TO_PREVIOUS_ACTION_STR = "previousAction"; private static final String RETURN_TO_ACTION_LEGACY_STR = "action"; - private static final Map< String, Class > PRIMITIVE_TYPES = new HashMap< String, Class >(); + private static final Map/*< String, Class >*/ PRIMITIVE_TYPES = new HashMap/*< String, Class >*/(); static { @@ -98,7 +96,7 @@ private transient FlowController _flowController = null; // will be reinitialized as necessary by PreviousPageInfo private transient ServletContext _servletContext = null; // will be reinitialized as necessary by PreviousPageInfo private String _mappingPath; - private StringBuilder _queryString; + private StringBuffer _queryString; private boolean _explicitPath = false; private String _returnFormType = null; private Map _actionOutputs = null; @@ -628,7 +626,7 @@ expectedTypeName = expectedTypeName.substring( 0, expectedTypeName.length() - 2 ); } - Class expectedType = PRIMITIVE_TYPES.get( expectedTypeName ); + Class expectedType = ( Class ) PRIMITIVE_TYPES.get( expectedTypeName ); if ( expectedType == null ) { @@ -647,7 +645,7 @@ Class actualType = actualActionOutput.getClass(); int actualArrayDims = 0; - StringBuilder arraySuffix = new StringBuilder(); + StringBuffer arraySuffix = new StringBuffer(); while ( actualType.isArray() && actualArrayDims <= expectedArrayDims ) { @@ -839,11 +837,11 @@ } else if ( queryString.charAt( 0 ) == '?' ) { - _queryString = new StringBuilder( queryString ); + _queryString = new StringBuffer( queryString ); } else { - _queryString = new StringBuilder( "?" ).append( queryString ); + _queryString = new StringBuffer( "?" ).append( queryString ); } } @@ -868,7 +866,7 @@ { if ( _queryString == null ) { - _queryString = new StringBuilder( "?" ); + _queryString = new StringBuffer( "?" ); } else { Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowActionServlet.java Mon Apr 11 23:42:11 2005 @@ -32,8 +32,6 @@ import java.io.Serializable; import java.io.IOException; -import static org.apache.beehive.netui.pageflow.internal.InternalConstants.FACES_BACKING_EXTENSION; -import static org.apache.beehive.netui.pageflow.internal.InternalConstants.SHARED_FLOW_EXTENSION; /** @@ -81,21 +79,21 @@ { public String getModuleConfigPath( String moduleName ) { - StringBuilder moduleConfPath = new StringBuilder( getGenDir() ); - moduleConfPath.append( '/' ).append( PageFlowConstants.JPF_MODULE_CONFIG_PREFIX ); + StringBuffer moduleConfPath = new StringBuffer( getGenDir() ); + moduleConfPath.append( '/' ).append( PageFlowConstants.PAGEFLOW_MODULE_CONFIG_PREFIX ); if ( moduleName.length() > 1 ) { moduleConfPath.append( moduleName.replace( '/', '-' ) ); } - moduleConfPath.append( PageFlowConstants.JPF_MODULE_CONFIG_EXTENSION ); + moduleConfPath.append( PageFlowConstants.PAGEFLOW_MODULE_CONFIG_EXTENSION ); return moduleConfPath.toString(); } protected String getGenDir() { - return PageFlowConstants.JPF_MODULE_CONFIG_GEN_DIR; + return PageFlowConstants.PAGEFLOW_MODULE_CONFIG_GEN_DIR; } } @@ -137,7 +135,8 @@ // If this is a direct request for a shared flow (.jpfs) or a Faces backing bean (.jsfb), return a 404 status. // These are not web-addressable. String servletPath = request.getServletPath(); - if ( servletPath.endsWith( SHARED_FLOW_EXTENSION ) || servletPath.endsWith( FACES_BACKING_EXTENSION ) ) + if ( servletPath.endsWith( InternalConstants.SHARED_FLOW_EXTENSION ) || + servletPath.endsWith( InternalConstants.FACES_BACKING_EXTENSION ) ) { if ( _log.isDebugEnabled() ) { @@ -187,7 +186,7 @@ * Last chance to handle an unhandled action URI. * @return <code>true</code> if this method handled it (by forwarding somewhere or writing to the response). */ - @Override + protected boolean processUnhandledAction( HttpServletRequest request, HttpServletResponse response, String uri ) throws IOException, ServletException { @@ -199,7 +198,7 @@ if ( ga != null ) { - StringBuilder sfActionURI = new StringBuilder( ga.getModulePath() ); + StringBuffer sfActionURI = new StringBuffer( ga.getModulePath() ); sfActionURI.append( '/' ); sfActionURI.append( ServletUtils.getBaseName( uri ) ); PageFlowRequestWrapper.get( request ).setOriginalServletPath( uri ); Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowContextListener.java Mon Apr 11 23:42:11 2005 @@ -36,13 +36,13 @@ import java.io.IOException; import java.io.InputStream; -import static org.apache.beehive.netui.pageflow.internal.InternalConstants.NETUI_CONFIG_PATH; /** * Performs various initialization at ServletContext-init time. */ -public class PageFlowContextListener implements ServletContextListener +public class PageFlowContextListener + implements ServletContextListener { private static final String ALREADY_INIT_ATTR = InternalConstants.ATTR_PREFIX + "contextInit"; @@ -69,7 +69,7 @@ try { - InputStream configInput = servletContext.getResourceAsStream( NETUI_CONFIG_PATH ); + InputStream configInput = servletContext.getResourceAsStream( InternalConstants.NETUI_CONFIG_PATH ); try { @@ -85,15 +85,15 @@ { if ( _log.isErrorEnabled() ) { - _log.error( "Could not close input for " + NETUI_CONFIG_PATH ); + _log.error( "Could not close input for " + InternalConstants.NETUI_CONFIG_PATH ); } } } } catch ( ConfigInitializationException e ) { - _log.fatal( "Could not initialize from " + NETUI_CONFIG_PATH, e ); - throw new IllegalStateException( "Could not initialize from " + NETUI_CONFIG_PATH, e ); + _log.fatal( "Could not initialize from " + InternalConstants.NETUI_CONFIG_PATH, e ); + throw new IllegalStateException( "Could not initialize from " + InternalConstants.NETUI_CONFIG_PATH, e ); } AdapterManager.initServletContext( servletContext ); Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowController.java Mon Apr 11 23:42:11 2005 @@ -43,10 +43,6 @@ import org.apache.beehive.netui.pageflow.internal.PageFlowRequestWrapper; import org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils; -import org.apache.beehive.netui.pageflow.annotations.Jpf; - -import static org.apache.beehive.netui.pageflow.internal.InternalConstants.*; - /** * Base class for user-defined state and controller logic associated with a particular web @@ -70,6 +66,7 @@ */ public abstract class PageFlowController extends FlowController + implements InternalConstants { /** * A 'return-to="page"' forward brings the user back to the previous page. This object @@ -266,10 +263,12 @@ if ( fieldIsUninitialized( field ) ) { - Map< String, SharedFlowController > sharedFlows = PageFlowUtils.getSharedFlows( request ); + Map/*< String, SharedFlowController >*/ sharedFlows = PageFlowUtils.getSharedFlows( request ); String name = fi.sharedFlowName; SharedFlowController sf = - name != null ? sharedFlows.get( name ) : PageFlowUtils.getGlobalApp( request ); + name != null ? + ( SharedFlowController ) sharedFlows.get( name ) : + PageFlowUtils.getGlobalApp( request ); if ( sf != null ) { @@ -289,7 +288,7 @@ * Get the a map of shared flow name to shared flow instance. * @return a Map of shared flow name (string) to shared flow instance ([EMAIL PROTECTED] SharedFlowController}). */ - public Map< String, SharedFlowController > getSharedFlows() + public Map/*< String, SharedFlowController >*/ getSharedFlows() { return PageFlowUtils.getSharedFlows( getRequest() ); } @@ -304,7 +303,7 @@ */ public SharedFlowController getSharedFlow( String sharedFlowName ) { - return PageFlowUtils.getSharedFlows( getRequest() ).get( sharedFlowName ); + return ( SharedFlowController ) PageFlowUtils.getSharedFlows( getRequest() ).get( sharedFlowName ); } /** @@ -893,7 +892,7 @@ { String className = getClass().getName(); int lastDot = className.lastIndexOf( '.' ); - StringBuilder ret = new StringBuilder( "/" ); + StringBuffer ret = new StringBuffer( "/" ); return ret.append( className.substring( lastDot + 1 ) ).append( JPF_EXTENSION ).toString(); } @@ -904,7 +903,7 @@ if ( info == null ) { - info = new CachedPageFlowInfo( getClass() ); + info = new CachedPageFlowInfo( getClass(), getServletContext() ); cache.setCacheObject( CACHED_INFO_KEY, info ); } Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowFacesFilter.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowFacesFilter.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowFacesFilter.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowFacesFilter.java Mon Apr 11 23:42:11 2005 @@ -29,7 +29,7 @@ public class PageFlowFacesFilter extends PageFlowPageFilter { - private static Set< String > VALID_FILE_EXTENSIONS = new HashSet< String >(); + private static Set/*< String >*/ VALID_FILE_EXTENSIONS = new HashSet/*< String >*/(); static { Modified: incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowJspFilter.java URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowJspFilter.java?view=diff&r1=161024&r2=161025 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowJspFilter.java (original) +++ incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/PageFlowJspFilter.java Mon Apr 11 23:42:11 2005 @@ -27,7 +27,7 @@ public class PageFlowJspFilter extends PageFlowPageFilter { - private static Set< String > VALID_FILE_EXTENSIONS = new HashSet< String >(); + private static Set/*< String >*/ VALID_FILE_EXTENSIONS = new HashSet/*< String >*/(); static {
