Author: rich
Date: Mon Aug 2 15:25:31 2004
New Revision: 35604
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseGenerator.java
(contents, props changed)
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/BaseAnnotationProcessor.java
(contents, props changed)
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessor.java
(contents, props changed)
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessorFactory.java
(contents, props changed)
Modified:
incubator/beehive/trunk/netui/ant/webappTemplate.xml
incubator/beehive/trunk/netui/src/compiler/build.xml
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerInfo.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
incubator/beehive/trunk/netui/src/webapp-template/default/Global.app
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/global/Global.app
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13789/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13797/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13803/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14683/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14754/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14764/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b17287/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b18025/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b22957/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b30458/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33322/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33704/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33807/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084b/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b40862/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42486/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42558/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr121496/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/controlTests/getData/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callMethod/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callPageFlow/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/returnNull/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/basic/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/nested/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/pad/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/xmlBeans/serialize/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/demo/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/directFormTest/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/cellRepeaterError/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/forward/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/multipleDatasource/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/unhandledException/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/formTest/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller1/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller2/Jpf2.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test2/Controller1/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test4/Controller1/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test5/Controller1/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/javascript/jsScriptScopeId/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test1/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test2/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test3/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/appState/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/attrBinding/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/binding/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/buttonSubmit/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/cellRepeater/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalAction/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalActionForm/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/linkNav/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multiForms/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipleForms/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nesting/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingRepeater/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingScope/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeOne/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeTwo/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/returnToPage/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug26990/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug27848/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug30303/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/forwards/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nullflow/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfErrors/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfGlobalApp/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPageFlow/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPrevious/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageInput/test11/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/security/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/strutsMerge/test2/Jpf1.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/labelDefaults/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/urlTemplates/urlTemplates/WEB-INF/src/global/Global.app
Log:
- Bug fixing and refactoring in the annotation processors.
- Added a processor for declarative validation annotations on external form
bean classes.
- Added apache-xbean.jar to the manifest classpath of
beehive-netui-compiler.jar, for use in environments that only put the latter on
the classpath.
- Added the (now-required) @Jpf.Controller annotation to all DRT .jpf files.
Modified: incubator/beehive/trunk/netui/ant/webappTemplate.xml
==============================================================================
--- incubator/beehive/trunk/netui/ant/webappTemplate.xml (original)
+++ incubator/beehive/trunk/netui/ant/webappTemplate.xml Mon Aug 2
15:25:31 2004
@@ -120,6 +120,10 @@
<!-- copy the javascript files to the javavscript directory -->
<copy file="${tag.javascript.files}/netui-tree.js"
todir="${javascript.dir}"/>
+
+ <!-- copy the NetUI compiler -->
+ <mkdir dir="${compiler.dist.dir}"/>
+ <copy todir="${compiler.dist.dir}" file="${compiler.jar}"/>
</target>
<patternset id="jsf.runtime">
Modified: incubator/beehive/trunk/netui/src/compiler/build.xml
==============================================================================
--- incubator/beehive/trunk/netui/src/compiler/build.xml (original)
+++ incubator/beehive/trunk/netui/src/compiler/build.xml Mon Aug 2
15:25:31 2004
@@ -28,7 +28,11 @@
<fileset dir="." includes="META-INF/**"/>
</copy>
- <jar jarfile="${build.lib.dir}/${compiler.jar.name}"
basedir="${classes.dir}/${module.name}"/>
+ <jar jarfile="${build.lib.dir}/${compiler.jar.name}"
basedir="${classes.dir}/${module.name}">
+ <manifest>
+ <attribute name="Class-Path" value="apache-xbean.jar"/>
+ </manifest>
+ </jar>
</target>
<target name="compile.schemas">
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseChecker.java
Mon Aug 2 15:25:31 2004
@@ -19,15 +19,15 @@
package org.apache.beehive.netui.compiler;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.TypeDeclaration;
+import com.sun.mirror.declaration.ClassDeclaration;
-import java.util.Collection;
+import java.util.Map;
import java.io.File;
import org.apache.beehive.netui.compiler.model.StrutsApp;
import org.apache.beehive.netui.compiler.model.NoWebInfDirectoryException;
-abstract class BaseChecker
+public abstract class BaseChecker
{
private AnnotationProcessorEnvironment _env;
private Diagnostics _diagnostics;
@@ -38,28 +38,33 @@
{
_env = env;
_diagnostics = diagnostics;
-
+ }
+
+ public final Map check( ClassDeclaration jclass )
+ {
//
// Get a RuntimeVersionChecker (which looks at the manifest of
beehive-netui-pageflow.jar).
//
+ File sourceFile = CompilerUtils.getOriginalFile( jclass );
+
try
{
- Collection< TypeDeclaration > typeDeclarations =
env.getTypeDeclarations();
-
- if ( typeDeclarations.size() > 0 ) // there will be other errors
if not
- {
- File sourceFile = CompilerUtils.getOriginalFile(
typeDeclarations.iterator().next() );
- _webappRoot = StrutsApp.getWebappRootFromJpf( sourceFile );
- setRuntimeVersionChecker( new RuntimeVersionChecker(
_webappRoot ) );
- }
+ _webappRoot = StrutsApp.getWebappRootFromJpf( sourceFile );
+ setRuntimeVersionChecker( new RuntimeVersionChecker( _webappRoot )
);
}
catch ( NoWebInfDirectoryException e )
{
- // Silently fail here. The no-webinf error will be caught
elsewhere.
- setRuntimeVersionChecker( new RuntimeVersionChecker() );
+ getDiagnostics().addError( jclass, "error.web-inf-not-found",
sourceFile );
+ return null;
}
+
+ return onCheck( jclass );
}
-
+
+ public abstract Map onCheck( ClassDeclaration jclass );
+
+ public abstract BaseGenerator getGenerator();
+
protected AnnotationProcessorEnvironment getEnv()
{
return _env;
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseGenerator.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/BaseGenerator.java
Mon Aug 2 15:25:31 2004
@@ -0,0 +1,47 @@
+/*
+ * B E A S Y S T E M S
+ * Copyright 2002-2004 BEA Systems, Inc.
+ *
+ * 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.compiler;
+
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.ClassDeclaration;
+
+public abstract class BaseGenerator
+{
+ private AnnotationProcessorEnvironment _env;
+ private Diagnostics _diagnostics;
+
+
+ protected BaseGenerator( AnnotationProcessorEnvironment env )
+ {
+ _env = env;
+ _diagnostics = new Diagnostics( env );
+ }
+
+ public abstract void generate( ClassDeclaration publicClass );
+
+ protected AnnotationProcessorEnvironment getEnv()
+ {
+ return _env;
+ }
+
+ protected Diagnostics getDiagnostics()
+ {
+ return _diagnostics;
+ }
+}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/CompilerUtils.java
Mon Aug 2 15:25:31 2004
@@ -18,6 +18,11 @@
*/
package org.apache.beehive.netui.compiler;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_FULL_CLASSNAME;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.WEBINF_SRC_DIR;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_PACKAGE;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_CLASSNAME;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_FILE_EXTENSION_DOT;
import com.sun.mirror.declaration.*;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
import com.sun.mirror.type.ClassType;
@@ -25,6 +30,7 @@
import com.sun.mirror.type.TypeMirror;
import com.sun.mirror.type.DeclaredType;
import com.sun.mirror.type.InterfaceType;
+import com.sun.mirror.util.SourcePosition;
import java.net.URI;
import java.net.URISyntaxException;
@@ -632,48 +638,82 @@
/**
* Get the original filename, inferred from the current temporary file
being compiled.
*/
- public static File getOriginalFile( Declaration decl )
+ public static File getOriginalFile( TypeDeclaration decl )
{
- String path = decl.getPosition().file().getPath();
- int pos = path.indexOf( TMP_SRC_DIR );
+ decl = CompilerUtils.getOutermostClass( decl );
+ SourcePosition position = decl.getPosition();
File retVal = null;
-
- if ( pos != -1 )
+
+ if ( position != null )
{
- String prefix = path.substring( 0, pos );
- String suffix = path.substring( pos + TMP_SRC_DIR.length() );
- int extensionPos = suffix.lastIndexOf( JAVA_FILE_EXTENSION_DOT );
- assert extensionPos != -1 : "expected a .java file: " + path;
+ File file = decl.getPosition().file();
+ String path = file.getAbsoluteFile().getPath();
+ int pos = path.indexOf( TMP_SRC_DIR );
- // See if we can find the file by chopping out the temp-dir.
- retVal = new File( prefix + suffix );
-
- if ( ! retVal.exists() )
+ if ( pos != -1 )
{
- // See if we need to replace ".java" with ".jpf" or ".jpfs".
- suffix = suffix.substring( 0, extensionPos );
- retVal = new File( prefix + suffix + JPF_FILE_EXTENSION_DOT );
- if ( ! retVal.exists() ) retVal = new File( prefix + suffix +
SHARED_FLOW_FILE_EXTENSION_DOT );
+ String webappRootPath = path.substring( 0, pos - 1 );
- // See if the .java file lives in WEB-INF/src.
- if ( ! retVal.exists() )
+ //
+ // Global.app (deprecated) can only be
/WEB-INF/src/global/Global.{app,java}
+ //
+ if ( decl.getQualifiedName().equals( GLOBALAPP_FULL_CLASSNAME
) )
{
- StringBuilder retValPath = new StringBuilder( prefix );
- retValPath.append( WEBINF_DIR_NAME ).append(
File.separatorChar );
- retValPath.append( "src" ).append( File.separatorChar );
- retValPath.append( suffix ).append(
JAVA_FILE_EXTENSION_DOT );
- retVal = new File( retValPath.toString() );
+ StringBuilder sb = new StringBuilder( webappRootPath );
+ sb.append( WEBINF_SRC_DIR ).append( '/' );
+ sb.append( GLOBALAPP_PACKAGE ).append( '/' );
+ sb.append( GLOBALAPP_CLASSNAME );
+ String basePath = sb.toString();
+ retVal = new File( basePath + GLOBALAPP_FILE_EXTENSION_DOT
);
+ if ( ! retVal.exists() ) retVal = new File( basePath +
JAVA_FILE_EXTENSION_DOT );
+ }
+ else
+ {
+ String fileRelativePath = path.substring( pos +
TMP_SRC_DIR.length() );
+ retVal = findSourceFileInWebapp( webappRootPath,
fileRelativePath );
}
}
+ else
+ {
+ retVal = new File( path );
+ }
+
}
- else
+
+ return retVal;
+ }
+
+ public static File findSourceFileInWebapp( String webappRootPath, String
fileRelativePath )
+ {
+ int extensionPos = fileRelativePath.lastIndexOf(
JAVA_FILE_EXTENSION_DOT );
+ assert extensionPos != -1 : "expected a .java file: " +
fileRelativePath;
+ webappRootPath += '/';
+
+ // See if we can find the file by chopping out the temp-dir.
+ File retVal = new File( webappRootPath + fileRelativePath );
+
+ if ( ! retVal.exists() )
{
- retVal = new File( path );
+ // See if we need to replace ".java" with ".jpf" or ".jpfs".
+ fileRelativePath = fileRelativePath.substring( 0, extensionPos );
+ retVal = new File( webappRootPath + fileRelativePath +
JPF_FILE_EXTENSION_DOT );
+ if ( ! retVal.exists() ) retVal = new File( webappRootPath +
fileRelativePath + SHARED_FLOW_FILE_EXTENSION_DOT );
+
+ // See if the .java file lives in WEB-INF/src.
+ if ( ! retVal.exists() )
+ {
+ StringBuilder retValPath = new StringBuilder( webappRootPath );
+ retValPath.append( WEBINF_DIR_NAME ).append(
File.separatorChar );
+ retValPath.append( "src" ).append( File.separatorChar );
+ retValPath.append( fileRelativePath ).append(
JAVA_FILE_EXTENSION_DOT );
+ retVal = new File( retValPath.toString() );
+ }
+
+ if ( ! retVal.exists() ) retVal = null;
}
-
+
return retVal;
}
-
public static boolean annotationsAreEqual( AnnotationMirror a1,
AnnotationMirror a2 )
{
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerChecker.java
Mon Aug 2 15:25:31 2004
@@ -35,6 +35,8 @@
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
public abstract class FlowControllerChecker
@@ -51,33 +53,36 @@
{
super( env, diags );
_fcInfo = fcInfo;
-
-
- _controllerGrammar = getControllerGrammar();
- _actionGrammar = new ActionGrammar( getEnv(), getDiagnostics(),
getRuntimeVersionChecker(), _fcInfo );
- _exceptionHandlerGrammar =
- new ExceptionHandlerGrammar( getEnv(), getDiagnostics(),
getRuntimeVersionChecker(), _fcInfo );
- _formBeanChecker = new FormBeanChecker( env, diags );
- fcInfo.setWebappRoot( getWebappRoot() );
}
protected void doAdditionalClassChecks( ClassDeclaration jpfClass, File
webappRoot )
{
}
- protected abstract String getDesiredBaseClass();
+ protected abstract String getDesiredBaseClass( ClassDeclaration jclass );
protected abstract AnnotationGrammar getControllerGrammar();
- public void check( ClassDeclaration jclass )
+ public abstract BaseGenerator getGenerator();
+
+ public Map onCheck( ClassDeclaration jclass )
{
+ _controllerGrammar = getControllerGrammar();
+ _actionGrammar = new ActionGrammar( getEnv(), getDiagnostics(),
getRuntimeVersionChecker(), _fcInfo );
+ _exceptionHandlerGrammar =
+ new ExceptionHandlerGrammar( getEnv(), getDiagnostics(),
getRuntimeVersionChecker(), _fcInfo );
+ _formBeanChecker = new FormBeanChecker( getEnv(), getDiagnostics() );
+ getFlowControllerInfo().setWebappRoot( getWebappRoot() );
+
+ _fcInfo.startBuild();
+
//
// Check the base class.
//
- String desiredBaseClass = getDesiredBaseClass();
+ String desiredBaseClass = getDesiredBaseClass( jclass );
if ( desiredBaseClass != null && ! CompilerUtils.isAssignableFrom(
desiredBaseClass, jclass, getEnv() ) )
{
- getDiagnostics().addError( jclass, "error.does-not-extend-base",
getDesiredBaseClass() );
+ getDiagnostics().addError( jclass, "error.does-not-extend-base",
desiredBaseClass );
}
//
@@ -129,6 +134,10 @@
}
endCheckClass( jclass );
+ _fcInfo.endBuild();
+ Map result = new HashMap();
+ result.put( JpfLanguageConstants.ExtraInfoKeys.flowControllerInfo,
_fcInfo );
+ return result;
}
protected void endCheckClass( ClassDeclaration jclass )
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerGenerator.java
Mon Aug 2 15:25:31 2004
@@ -21,7 +21,6 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
-import java.util.Collection;
import org.apache.beehive.netui.compiler.genmodel.GenStrutsApp;
import org.apache.beehive.netui.compiler.genmodel.GenValidationModel;
@@ -30,23 +29,20 @@
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
import com.sun.mirror.declaration.ClassDeclaration;
import com.sun.mirror.declaration.PackageDeclaration;
-import com.sun.mirror.declaration.MethodDeclaration;
-public abstract class FlowControllerGenerator
+abstract class FlowControllerGenerator
+ extends BaseGenerator
{
private static long _compilerJarTimestamp = -1;
private static final boolean ALWAYS_GENERATE =
System.getProperty( "pageflow.always-generate-struts-config" ) !=
null;
- private AnnotationProcessorEnvironment _env;
- private Diagnostics _diagnostics;
public FlowControllerGenerator( AnnotationProcessorEnvironment env )
{
- _env = env;
- _diagnostics = new Diagnostics( env );
+ super( env );
}
protected abstract GenStrutsApp createStrutsApp( File sourceFile, String
containingPackage, ClassDeclaration cl )
@@ -76,8 +72,8 @@
e.printStackTrace(); // @TODO log
assert e instanceof NoWebInfDirectoryException || e instanceof
XmlException || e instanceof IOException
|| e instanceof FileNotFoundException;
- _diagnostics.addError( publicClass,
"error.could-not-generate-struts-config",
- app != null ? app.getStrutsConfigFile() :
null );
+ getDiagnostics().addError( publicClass,
"error.could-not-generate-struts-config",
+ app != null ? app.getStrutsConfigFile()
: null );
}
}
@@ -113,17 +109,10 @@
|| e instanceof IOException
|| e instanceof XmlException;
- _env.getMessager().printError( publicClass.getPosition(), "" );
- _diagnostics.addError( publicClass,
"error.could-not-generate-struts-config",
- strutsConfigFile != null ? new Object[]{
strutsConfigFile.getPath() } : null,
- null );
+ getEnv().getMessager().printError( publicClass.getPosition(), "" );
+ getDiagnostics().addError( publicClass,
"error.could-not-generate-struts-config",
+ strutsConfigFile != null ? new
Object[]{ strutsConfigFile.getPath() } : null,
+ null );
}
}
-
- protected AnnotationProcessorEnvironment getEnv()
- {
- return _env;
- }
-
-
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerInfo.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerInfo.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FlowControllerInfo.java
Mon Aug 2 15:25:31 2004
@@ -26,6 +26,11 @@
import java.util.ArrayList;
import java.io.File;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_FULL_CLASSNAME;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.WEBINF_SRC_DIR;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_PACKAGE;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_CLASSNAME;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_FILE_EXTENSION_DOT;
public class FlowControllerInfo
{
@@ -94,14 +99,15 @@
}
- public FlowControllerInfo( File sourceFile )
+ public FlowControllerInfo( File sourceFile, String controllerClassName )
{
_sourceFile = sourceFile;
+ _controllerClassName = controllerClassName;
}
void reset()
{
- _actions = new HashSet();
+ _actions = new HashSet< ActionInfo >();
_nested = false;
_returnActions = null;
}
@@ -220,7 +226,30 @@
void setSharedFlowType( TypeDeclaration sharedFlowType )
{
_sharedFlowType = sharedFlowType;
- if ( sharedFlowType != null ) _sharedFlowFile =
CompilerUtils.getOriginalFile( _sharedFlowType );
+
+ if ( sharedFlowType != null )
+ {
+ _sharedFlowFile = CompilerUtils.getOriginalFile( _sharedFlowType );
+
+ if ( _sharedFlowFile == null )
+ {
+ if ( _sharedFlowType.getQualifiedName().equals(
GLOBALAPP_FULL_CLASSNAME ) )
+ {
+ StringBuilder sb = new StringBuilder(
getWebappRoot().getPath() );
+ sb.append( WEBINF_SRC_DIR ).append( '/' );
+ sb.append( GLOBALAPP_PACKAGE ).append( '/' );
+ sb.append( GLOBALAPP_CLASSNAME ).append(
GLOBALAPP_FILE_EXTENSION_DOT );
+ _sharedFlowFile = new File( sb.toString() );
+ }
+ else
+ {
+ String fileRelativePath =
_sharedFlowType.getQualifiedName().replace( '.', '/' ) + ".java";
+ _sharedFlowFile = CompilerUtils.findSourceFileInWebapp(
getWebappRoot().getPath(), fileRelativePath );
+ }
+ }
+
+ assert _sharedFlowFile != null : "could not get shared flow file
for " + sharedFlowType;
+ }
}
public TypeDeclaration getSharedFlowType()
@@ -242,5 +271,10 @@
File getSourceFile()
{
return _sourceFile;
+ }
+
+ public String getControllerClassName()
+ {
+ return _controllerClassName;
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/FormBeanChecker.java
Mon Aug 2 15:25:31 2004
@@ -28,12 +28,14 @@
import com.sun.mirror.declaration.MemberDeclaration;
import java.util.Collection;
+import java.util.Map;
import org.apache.beehive.netui.compiler.grammar.ValidationFieldGrammar;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.VALIDATABLE_PROPERTY_TAG_NAME;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.FORM_CLASS_NAME;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.PROPERTY_NAME_ATTR;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.FORM_BEAN_TAG_NAME;
public class FormBeanChecker
@@ -47,39 +49,48 @@
super( env, diags );
_validatablePropertyGrammar = new GetterValidatablePropertyGrammar();
}
-
- public void check( ClassDeclaration jclass )
+
+ public BaseGenerator getGenerator()
{
- boolean hasOne = false;
-
- //
- // Look for ValidationField annotations on the methods.
- //
- Collection< MethodDeclaration > methods =
CompilerUtils.getClassMethods( jclass, null );
+ return null;
+ }
+
+ public Map onCheck( ClassDeclaration jclass )
+ {
+ boolean isFormBeanClass = CompilerUtils.getAnnotation( jclass,
FORM_BEAN_TAG_NAME ) != null;
- for ( MethodDeclaration method : methods )
+ if ( ! isFormBeanClass )
{
- hasOne |= checkValidationAnnotation( method,
VALIDATABLE_PROPERTY_TAG_NAME, _validatablePropertyGrammar );
- // We don't currently support validation rule annotations directly
on getter methods.
- /*
- hasOne |= checkValidationAnnotation( method, LOCALE_RULES_ATTR,
_validationLocaleRulesGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_REQUIRED_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_RANGE_TAG_NAME, _validateRangeGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_MIN_LENGTH_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_MAX_LENGTH_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_CREDIT_CARD_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_EMAIL_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_MASK_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_DATE_TAG_NAME, _baseValidationRuleGrammar );
- hasOne |= checkValidationAnnotation( method,
VALIDATE_TYPE_TAG_NAME, _validateTypeGrammar );
- */
+ //
+ // Look for ValidationField annotations on the methods.
+ //
+ Collection< MethodDeclaration > methods =
CompilerUtils.getClassMethods( jclass, null );
+
+ for ( MethodDeclaration method : methods )
+ {
+ isFormBeanClass |=
+ checkValidationAnnotation( method,
VALIDATABLE_PROPERTY_TAG_NAME, _validatablePropertyGrammar );
+ // We don't currently support validation rule annotations
directly on getter methods.
+ /*
+ hasOne |= checkValidationAnnotation( method,
LOCALE_RULES_ATTR, _validationLocaleRulesGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_REQUIRED_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_RANGE_TAG_NAME, _validateRangeGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_MIN_LENGTH_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_MAX_LENGTH_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_CREDIT_CARD_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_EMAIL_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_MASK_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_DATE_TAG_NAME, _baseValidationRuleGrammar );
+ hasOne |= checkValidationAnnotation( method,
VALIDATE_TYPE_TAG_NAME, _validateTypeGrammar );
+ */
+ }
}
//
// Make sure ActionForm subclasses are public static, and that they
have default
// constructors.
//
- if ( hasOne || CompilerUtils.isAssignableFrom( FORM_CLASS_NAME,
jclass, getEnv() ) )
+ if ( isFormBeanClass || CompilerUtils.isAssignableFrom(
FORM_CLASS_NAME, jclass, getEnv() ) )
{
if ( jclass.getDeclaringType() != null && !
CompilerUtils.hasModifier( jclass, Modifier.STATIC ) )
{
@@ -97,6 +108,7 @@
}
}
+ return null;
}
private boolean checkValidationAnnotation( MethodDeclaration method,
String annotationTagName,
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/JpfLanguageConstants.java
Mon Aug 2 15:25:31 2004
@@ -38,6 +38,9 @@
public static final String VALIDATABLE_PROPERTY_TAG_NAME =
"ValidatableProperty";
public static final String FORM_BEAN_TAG_NAME = "FormBean";
public static final String ACTION_OUTPUT_TAG_NAME = "ActionOutput";
+ public static final String FACES_BACKING_TAG_NAME = "FacesBacking";
+ public static final String COMMAND_HANDLER_TAG_NAME = "CommandHandler";
+ public static final String RAISE_ACTION_TAG_NAME = "RaiseAction";
public static final String VALIDATE_REQUIRED_TAG_NAME = "ValidateRequired";
public static final String VALIDATE_RANGE_TAG_NAME = "ValidateRange";
@@ -138,6 +141,8 @@
public static final String DEFAULT_MESSAGE_RESOURCES_ATTR =
"defaultMessageBundle";
public static final String APPLY_TO_UNHANDLED_LOCALES_ATTR =
"applyToUnhandledLocales";
public static final String VALIDATION_BEANS_ATTR = "validationBeans";
+ public static final String ACTION_ATTR = "action";
+ public static final String RAISE_ACTIONS_ATTR = "raiseActions";
public static final String MIN_INT_ATTR = "minInt";
public static final String MAX_INT_ATTR = "maxInt";
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/PageFlowChecker.java
Mon Aug 2 15:25:31 2004
@@ -55,6 +55,11 @@
}
}
+ public BaseGenerator getGenerator()
+ {
+ return new PageFlowGenerator( getEnv() );
+ }
+
protected void startCheckClass( ClassDeclaration jclass )
{
//
@@ -203,7 +208,7 @@
}
}
- protected String getDesiredBaseClass()
+ protected String getDesiredBaseClass( ClassDeclaration jclass )
{
return JPF_BASE_CLASS;
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/SharedFlowChecker.java
Mon Aug 2 15:25:31 2004
@@ -39,7 +39,12 @@
{
super( env, diagnostics, fcInfo );
}
-
+
+ public BaseGenerator getGenerator()
+ {
+ return new SharedFlowGenerator( getEnv() );
+ }
+
protected void doAdditionalClassChecks( ClassDeclaration jclass, File
webappRoot )
{
//
@@ -55,11 +60,9 @@
}
}
- protected String getDesiredBaseClass()
+ protected String getDesiredBaseClass( ClassDeclaration jclass )
{
- Collection< TypeDeclaration > typeDecls =
getEnv().getTypeDeclarations();
- if ( typeDecls.size() == 0 ) return null;
- File sourceFile = CompilerUtils.getOriginalFile(
typeDecls.iterator().next() );
+ File sourceFile = CompilerUtils.getOriginalFile( jclass );
if ( sourceFile.getName().endsWith( GLOBALAPP_FILE_EXTENSION_DOT ) )
return GLOBALAPP_BASE_CLASS;
if ( sourceFile.getName().endsWith( SHARED_FLOW_FILE_EXTENSION_DOT ) )
return SHARED_FLOW_BASE_CLASS;
return null;
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/BaseAnnotationProcessor.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/BaseAnnotationProcessor.java
Mon Aug 2 15:25:31 2004
@@ -0,0 +1,80 @@
+/*
+ * B E A S Y S T E M S
+ * Copyright 2002-2004 BEA Systems, Inc.
+ *
+ * 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.compiler.apt;
+
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.declaration.TypeDeclaration;
+import com.sun.mirror.declaration.ClassDeclaration;
+import com.sun.mirror.util.SimpleDeclarationVisitor;
+import org.apache.beehive.netui.compiler.Diagnostics;
+import org.apache.beehive.netui.compiler.BaseChecker;
+import org.apache.beehive.netui.compiler.BaseGenerator;
+
+public abstract class BaseAnnotationProcessor
+ implements AnnotationProcessor
+{
+ private final AnnotationProcessorEnvironment _env;
+
+
+ BaseAnnotationProcessor( AnnotationProcessorEnvironment env )
+ {
+ _env = env;
+ }
+
+ public void process()
+ {
+ ListClassVisitor visitor = new ListClassVisitor();
+
+ for ( TypeDeclaration typeDecl : _env.getSpecifiedTypeDeclarations() )
+ {
+ typeDecl.accept( visitor );
+ }
+ }
+
+ private class ListClassVisitor extends SimpleDeclarationVisitor
+ {
+ public void visitTypeDeclaration( TypeDeclaration decl )
+ {
+ if ( decl instanceof ClassDeclaration )
+ {
+ ClassDeclaration classDecl = ( ClassDeclaration ) decl;
+ Diagnostics diagnostics = new Diagnostics( _env );
+ BaseChecker checker = getChecker( classDecl, diagnostics );
+
+ if ( checker != null )
+ {
+ checker.check( classDecl );
+ if ( ! diagnostics.hadErrors() )
+ {
+ BaseGenerator generator = checker.getGenerator();
+ if ( generator != null ) generator.generate( classDecl
);
+ }
+ }
+ }
+ }
+ }
+
+ protected abstract BaseChecker getChecker( ClassDeclaration decl,
Diagnostics diagnostics );
+
+ protected AnnotationProcessorEnvironment getEnv()
+ {
+ return _env;
+ }
+}
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessor.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessor.java
Mon Aug 2 15:25:31 2004
@@ -0,0 +1,48 @@
+/*
+ * B E A S Y S T E M S
+ * Copyright 2002-2004 BEA Systems, Inc.
+ *
+ * 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.compiler.apt;
+
+import org.apache.beehive.netui.compiler.BaseChecker;
+import org.apache.beehive.netui.compiler.Diagnostics;
+import org.apache.beehive.netui.compiler.FormBeanChecker;
+import org.apache.beehive.netui.compiler.CompilerUtils;
+import com.sun.mirror.declaration.ClassDeclaration;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.FORM_BEAN_TAG_NAME;
+
+
+public class FormBeanAnnotationProcessor
+ extends BaseAnnotationProcessor
+{
+ FormBeanAnnotationProcessor( AnnotationProcessorEnvironment env )
+ {
+ super( env );
+ }
+
+ protected BaseChecker getChecker( ClassDeclaration decl, Diagnostics
diagnostics )
+ {
+ if ( CompilerUtils.getAnnotation( decl, FORM_BEAN_TAG_NAME ) != null )
+ {
+ return new FormBeanChecker( getEnv(), diagnostics );
+ }
+
+ return null;
+ }
+}
Added:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessorFactory.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/FormBeanAnnotationProcessorFactory.java
Mon Aug 2 15:25:31 2004
@@ -0,0 +1,54 @@
+/*
+ * B E A S Y S T E M S
+ * Copyright 2002-2004 BEA Systems, Inc.
+ *
+ * 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.compiler.apt;
+
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorFactory;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+
+import java.util.Set;
+import java.util.Collection;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.ArrayList;
+
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.ANNOTATION_QUALIFIER;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.FORM_BEAN_TAG_NAME;
+
+public class FormBeanAnnotationProcessorFactory
+ implements AnnotationProcessorFactory
+{
+ public Collection<String> supportedAnnotationTypes()
+ {
+ return Collections.unmodifiableCollection(
+ Arrays.asList( new String[]{ ANNOTATION_QUALIFIER +
FORM_BEAN_TAG_NAME + "*" } ) );
+ }
+
+ public Collection< String > supportedOptions()
+ {
+ return new ArrayList< String >();
+ }
+
+ public AnnotationProcessor getProcessorFor( Set< AnnotationTypeDeclaration
> annotationTypeDeclarations,
+ AnnotationProcessorEnvironment
env )
+ {
+ return new FormBeanAnnotationProcessor( env );
+ }
+}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessor.java
Mon Aug 2 15:25:31 2004
@@ -18,76 +18,96 @@
*/
package org.apache.beehive.netui.compiler.apt;
-import com.sun.mirror.apt.AnnotationProcessor;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
-import com.sun.mirror.declaration.TypeDeclaration;
+import com.sun.mirror.declaration.AnnotationMirror;
import com.sun.mirror.declaration.ClassDeclaration;
-import com.sun.mirror.util.SimpleDeclarationVisitor;
-
-
-import org.apache.beehive.netui.compiler.PageFlowGenerator;
-import org.apache.beehive.netui.compiler.PageFlowChecker;
-import org.apache.beehive.netui.compiler.FlowControllerInfo;
+import com.sun.mirror.declaration.Modifier;
+import org.apache.beehive.netui.compiler.BaseChecker;
import org.apache.beehive.netui.compiler.CompilerUtils;
-import org.apache.beehive.netui.compiler.FlowControllerChecker;
-import org.apache.beehive.netui.compiler.FlowControllerGenerator;
-import org.apache.beehive.netui.compiler.SharedFlowChecker;
-import org.apache.beehive.netui.compiler.SharedFlowGenerator;
import org.apache.beehive.netui.compiler.Diagnostics;
-
+import org.apache.beehive.netui.compiler.FlowControllerInfo;
+import org.apache.beehive.netui.compiler.PageFlowChecker;
+import org.apache.beehive.netui.compiler.SharedFlowChecker;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.JPF_BASE_CLASS;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.SHARED_FLOW_BASE_CLASS;
import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_BASE_CLASS;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.JPF_FILE_EXTENSION_DOT;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.SHARED_FLOW_FILE_EXTENSION_DOT;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.GLOBALAPP_FILE_EXTENSION_DOT;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.CONTROLLER_TAG_NAME;
+import static
org.apache.beehive.netui.compiler.JpfLanguageConstants.ANNOTATIONS_CLASSNAME;
public class PageFlowAnnotationProcessor
- implements AnnotationProcessor
+ extends BaseAnnotationProcessor
{
- private final AnnotationProcessorEnvironment _env;
-
- PageFlowAnnotationProcessor( AnnotationProcessorEnvironment env )
+ protected PageFlowAnnotationProcessor( AnnotationProcessorEnvironment env )
{
- _env = env;
+ super( env );
}
- public void process()
+ protected BaseChecker getChecker( ClassDeclaration classDecl, Diagnostics
diagnostics )
{
- for ( TypeDeclaration typeDecl : _env.getSpecifiedTypeDeclarations() )
+ FlowControllerInfo fcInfo =
+ new FlowControllerInfo( CompilerUtils.getOriginalFile(
classDecl ), classDecl.getQualifiedName() );
+
+ if ( CompilerUtils.isAssignableFrom( JPF_BASE_CLASS, classDecl,
getEnv() ) )
+ {
+ if ( expectControllerAnnotation( classDecl,
JPF_FILE_EXTENSION_DOT, JPF_BASE_CLASS, diagnostics ) )
+ {
+ return new PageFlowChecker( getEnv(), diagnostics, fcInfo );
+ }
+ }
+ else if ( CompilerUtils.isAssignableFrom( SHARED_FLOW_BASE_CLASS,
classDecl, getEnv() ) )
+ {
+ if ( expectControllerAnnotation( classDecl,
SHARED_FLOW_FILE_EXTENSION_DOT, SHARED_FLOW_BASE_CLASS,
+ diagnostics ) )
+ {
+ return new SharedFlowChecker( getEnv(), diagnostics, fcInfo );
+ }
+ }
+ else if ( CompilerUtils.isAssignableFrom( GLOBALAPP_BASE_CLASS,
classDecl, getEnv() ) )
{
- typeDecl.accept( new ListClassVisitor() );
+ if ( expectControllerAnnotation( classDecl,
GLOBALAPP_FILE_EXTENSION_DOT, GLOBALAPP_BASE_CLASS,
+ diagnostics ) )
+ {
+ return new SharedFlowChecker( getEnv(), diagnostics, fcInfo );
+ }
}
+ else
+ {
+ AnnotationMirror ann = CompilerUtils.getAnnotation( classDecl,
CONTROLLER_TAG_NAME );
+
+ if ( ann != null )
+ {
+ diagnostics.addError( ann,
"error.controller-annotation-invalid-base-class",
+ JPF_BASE_CLASS, SHARED_FLOW_BASE_CLASS );
+ }
+ }
+
+ return null;
}
- private class ListClassVisitor extends SimpleDeclarationVisitor
+ private boolean expectControllerAnnotation( ClassDeclaration classDecl,
String fileExtensionRequiresAnnotation,
+ String baseClass, Diagnostics
diagnostics )
{
- public void visitTypeDeclaration( TypeDeclaration decl )
+ if ( CompilerUtils.getAnnotation( classDecl, CONTROLLER_TAG_NAME ) !=
null )
{
- if ( decl instanceof ClassDeclaration )
- {
- ClassDeclaration classDecl = ( ClassDeclaration ) decl;
- FlowControllerInfo fcInfo = new FlowControllerInfo(
CompilerUtils.getOriginalFile( decl ) );
- Diagnostics diagnostics = new Diagnostics( _env );
- FlowControllerChecker checker = null;
- FlowControllerGenerator generator = null;
-
- if ( CompilerUtils.isAssignableFrom( JPF_BASE_CLASS, decl,
_env ) )
- {
- checker = new PageFlowChecker( _env, diagnostics, fcInfo );
- generator = new PageFlowGenerator( _env );
- }
- else if ( CompilerUtils.isAssignableFrom(
SHARED_FLOW_BASE_CLASS, decl, _env )
- || CompilerUtils.isAssignableFrom(
GLOBALAPP_BASE_CLASS, decl, _env ) )
- {
- checker = new SharedFlowChecker( _env, diagnostics, fcInfo
);
- generator = new SharedFlowGenerator( _env );
- }
-
- if ( checker != null )
- {
- checker.check( classDecl );
- if ( ! diagnostics.hadErrors() ) generator.generate(
classDecl );
- }
- }
+ return true;
+ }
+
+ String fileName = classDecl.getPosition().file().getName();
+
+ if ( fileExtensionRequiresAnnotation != null && fileName.endsWith(
fileExtensionRequiresAnnotation ) )
+ {
+ diagnostics.addError( classDecl,
"error.controller-annotation-required",
+ fileExtensionRequiresAnnotation,
ANNOTATIONS_CLASSNAME + "." + CONTROLLER_TAG_NAME );
+ }
+ else if ( ! CompilerUtils.hasModifier( classDecl, Modifier.ABSTRACT ) )
+ {
+ diagnostics.addWarning( classDecl,
"warning.no-controller-annotation", baseClass );
}
+
+ return false;
}
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/apt/PageFlowAnnotationProcessorFactory.java
==============================================================================
---
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 Aug 2 15:25:31 2004
@@ -29,6 +29,8 @@
import java.util.Collections;
import java.util.ArrayList;
+import org.apache.beehive.netui.compiler.JpfLanguageConstants;
+
public class PageFlowAnnotationProcessorFactory
implements AnnotationProcessorFactory
{
@@ -47,5 +49,4 @@
{
return new PageFlowAnnotationProcessor( env );
}
-
}
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/diagnostics.properties
Mon Aug 2 15:25:31 2004
@@ -130,3 +130,9 @@
error.incompatible-locale-annotations = The attribute "{0}" may not be present
when attribute "{1}" is true.
error.missing-locale-annotations = The attribute "{0}" must be present when
attribute "{1}" is false.
+
+error.controller-annotation-invalid-base-class = \
+This annotation is not valid on this class. The class should extend {0} or
{1}.
+
+error.controller-annotation-required = Files ending with "{0}" must have the
{1} annotation.
+warning.no-controller-annotation = This class extends {0}, but it does not
have the {1} annotation and is not abstract.
Modified:
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
==============================================================================
---
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
(original)
+++
incubator/beehive/trunk/netui/src/compiler/org/apache/beehive/netui/compiler/grammar/WebappPathType.java
Mon Aug 2 15:25:31 2004
@@ -95,7 +95,7 @@
}
boolean fileExists = true;
- File jpfFile = CompilerUtils.getOriginalFile( classMember );
+ File jpfFile = CompilerUtils.getOriginalFile(
CompilerUtils.getOuterClass( classMember ) );
File fileToCheck = null;
if ( stringValue.startsWith( "/" ) ) // relative to webapp root
Modified:
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
==============================================================================
---
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
(original)
+++
incubator/beehive/trunk/netui/src/pageflow/org/apache/beehive/netui/pageflow/annotations/Jpf.java
Mon Aug 2 15:25:31 2004
@@ -704,4 +704,25 @@
{
String defaultMessageBundle() default "";
}
+
+ @Target( ElementType.TYPE )
+ @Retention( RetentionPolicy.RUNTIME )
+ public @interface FacesBacking
+ {
+ }
+
+ @Target( ElementType.METHOD )
+ @Retention( RetentionPolicy.RUNTIME )
+ public @interface CommandHandler
+ {
+ RaiseAction[] raiseActions() default {};
+ }
+
+ @Target( ElementType.ANNOTATION_TYPE )
+ @Retention( RetentionPolicy.RUNTIME )
+ public @interface RaiseAction
+ {
+ String action();
+ String outputFormBean() default "";
+ }
}
Modified: incubator/beehive/trunk/netui/src/webapp-template/default/Global.app
==============================================================================
--- incubator/beehive/trunk/netui/src/webapp-template/default/Global.app
(original)
+++ incubator/beehive/trunk/netui/src/webapp-template/default/Global.app
Mon Aug 2 15:25:31 2004
@@ -5,7 +5,7 @@
/**
* The Global page flow is used to define actions which can be invoked by any
other
- * page flow in a webapp. The "jpf:catch" annotation provides a global way to
catch
+ * page flow in a webapp. The Jpf.Catch annotation provides a global way to
catch
* unhandled exceptions by forwarding to an error page.
*/
@Jpf.Controller(
@@ -48,7 +48,7 @@
* which is thrown when an unknown page flow action is requested). This
handler
* allows PageFlowExceptions to write informative error pages to the
response.
* To use the standard exception-handler for these exceptions, simply
remove
- * this method and the "jpf:catch" annotation for PageFlowException.
+ * this method and the Jpf.Catch annotation for PageFlowException.
*/
@Jpf.ExceptionHandler
public Forward handlePageFlowException(PageFlowException ex, String
actionName, String message, Object form)
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/global/Global.app
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/global/Global.app
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/WEB-INF/src/global/Global.app
Mon Aug 2 15:25:31 2004
@@ -36,6 +36,7 @@
import pageFlowCore.returnToTest.returnToTestController.InputForm;
[EMAIL PROTECTED]
public class Global extends GlobalApp
{
private String _pageGroupState = "";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13789/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13789/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13789/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -30,6 +30,7 @@
import javax.servlet.http.HttpSession;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _string = null;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13797/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13797/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13797/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -45,6 +45,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _string = "String";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13803/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13803/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b13803/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -39,6 +39,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _string = "String";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14683/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14683/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14683/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -39,6 +39,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public String getData() {
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14754/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14754/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14754/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -33,6 +33,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
String[] _values = {"1", "2", "3", "4", "5", "6"};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14764/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14764/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b14764/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
String _last = "Blow";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b17287/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b17287/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b17287/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.FormData;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private int[] _data = {1,2,3,4,5,6,7,8,9,10};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b18025/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b18025/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b18025/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -4,6 +4,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b22957/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b22957/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b22957/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -26,6 +26,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String lastAction = null;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b30458/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b30458/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b30458/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String[] _stuff = {"Foo", "Bar", "Baz", "Blee"};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33322/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33322/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33322/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private int foo = 12;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33704/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33704/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33704/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private java.util.Calendar foo;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33807/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33807/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b33807/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -9,6 +9,7 @@
/**
*/
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _name = "foo";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084b/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084b/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b35084b/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -9,6 +9,7 @@
/**
*/
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public String name = "foo";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b40862/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b40862/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b40862/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -19,6 +19,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42486/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42486/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42486/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -16,6 +16,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42558/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42558/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/b42558/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -12,6 +12,7 @@
// external imports
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr121496/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr121496/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/cr121496/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -11,6 +11,7 @@
/**
*/
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
// Uncomment this declaration to access Global.app.
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/controlTests/getData/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/controlTests/getData/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/controlTests/getData/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String[] _stuff = {"Foo", "Bar", "Baz", "Blee"};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callMethod/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callMethod/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callMethod/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -16,6 +16,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callPageFlow/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callPageFlow/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/callPageFlow/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -19,6 +19,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/returnNull/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/returnNull/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/callMethod/returnNull/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -15,6 +15,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/basic/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/basic/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/datagrid/basic/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -25,6 +25,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/nested/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/nested/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/nested/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -15,6 +15,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/pad/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/pad/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/repeater/pad/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -18,6 +18,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/xmlBeans/serialize/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/xmlBeans/serialize/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/databinding/xmlBeans/serialize/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -17,6 +17,7 @@
/**
*
*/
[EMAIL PROTECTED]
public class Controller
extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/demo/Controller.jpf
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/demo/Controller.jpf
(original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/demo/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -9,6 +9,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String[] animals = {"pig", "frog", "dog"};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/directFormTest/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/directFormTest/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/directFormTest/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -27,6 +27,7 @@
import java.io.Serializable;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private Form _form = new Form();
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/cellRepeaterError/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/cellRepeaterError/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/cellRepeaterError/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.FormData;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
int[] _data = {1,2,3,4,5,6,7,8,9,10};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/forward/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/forward/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/forward/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/multipleDatasource/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/multipleDatasource/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/multipleDatasource/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
String _last = "Blow";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/unhandledException/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/unhandledException/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/errors/unhandledException/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/formTest/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/formTest/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/formTest/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -26,6 +26,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.FormData;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private Form _form = new Form();
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller1/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller1/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller1/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -18,6 +18,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
@Jpf.Action(
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller2/Jpf2.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller2/Jpf2.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test1/Controller2/Jpf2.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
//-------------------------------------------------------
// See the TestHeader.jsp for the interop path
//-------------------------------------------------------
[EMAIL PROTECTED]
public class Jpf2 extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test2/Controller1/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test2/Controller1/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test2/Controller1/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
//-------------------------------------------------------
// See the TestHeader.jsp for the interop path
//-------------------------------------------------------
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
protected global.Global ga; //= new global.Global();
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test4/Controller1/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test4/Controller1/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test4/Controller1/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
//-------------------------------------------------------
// See the TestHeader.jsp for the interop path
//-------------------------------------------------------
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test5/Controller1/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test5/Controller1/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/interOp/test5/Controller1/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
//-------------------------------------------------------
// See the TestHeader.jsp for the interop path
//-------------------------------------------------------
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/javascript/jsScriptScopeId/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/javascript/jsScriptScopeId/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/javascript/jsScriptScopeId/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -114,6 +114,7 @@
"<pageflow-object id='formbean:jsScriptScopeId.Controller.NameBean'/>",
"</view-properties>"
})
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public String getAction() {
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test1/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test1/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test1/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -6,6 +6,7 @@
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test2/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test2/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test2/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -6,6 +6,7 @@
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
protected static final String TEST_KEY = "key1";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test3/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test3/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/jpfSecurity/test3/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -6,6 +6,7 @@
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
protected static final String TEST_KEY = "key1";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/appState/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/appState/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/appState/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -21,6 +21,7 @@
import org.apache.beehive.netui.pageflow.*;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
protected transient global.Global globalApp;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/attrBinding/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/attrBinding/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/attrBinding/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/binding/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/binding/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/binding/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -27,6 +27,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
import java.util.HashMap;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
String[] _values = {"0", "1", "2", "3", "4", "5"};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/buttonSubmit/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/buttonSubmit/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/buttonSubmit/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -25,6 +25,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/cellRepeater/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/cellRepeater/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/cellRepeater/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.FormData;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
int[] _data = {1,2,3,4,5,6,7,8,9,10};
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalAction/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalAction/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalAction/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -21,6 +21,7 @@
import org.apache.beehive.netui.pageflow.*;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalActionForm/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalActionForm/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/globalActionForm/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -21,6 +21,7 @@
import org.apache.beehive.netui.pageflow.*;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/linkNav/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/linkNav/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/linkNav/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -24,6 +24,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multiForms/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multiForms/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multiForms/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -24,6 +24,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipleForms/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipleForms/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/multipleForms/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -24,6 +24,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nesting/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nesting/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nesting/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -24,6 +24,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingRepeater/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingRepeater/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingRepeater/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -24,6 +24,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public static class Info implements java.io.Serializable {
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingScope/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingScope/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/nestingScope/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private int _visit = 0;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeOne/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeOne/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeOne/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private int _visit = 0;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeTwo/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeTwo/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/pageScope/scopeTwo/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private int _visit = 0;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/returnToPage/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/returnToPage/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miniTests/returnToPage/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -23,6 +23,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _action;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug26990/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug26990/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug26990/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
import org.apache.struts.action.ActionServlet;
import javax.servlet.http.HttpSession;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
private int eCnt = 0;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug27848/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug27848/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug27848/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -5,6 +5,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
import javax.servlet.http.HttpServletRequest;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug30303/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug30303/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/miscJpf/bug30303/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -5,6 +5,7 @@
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
private static final String STRUTS_VALUE = "Struts Value";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/forwards/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/forwards/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/forwards/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -43,6 +43,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public static class Redirector extends DefaultHandler implements
ForwardRedirectHandler
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -8,6 +8,7 @@
import org.apache.struts.action.*;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private static final String INFO_LIST_ATTR = "info";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nullflow/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nullflow/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/lifecycle/nullflow/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -4,6 +4,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfErrors/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfErrors/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfErrors/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -31,6 +31,7 @@
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
public String getGenErrors()
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfGlobalApp/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfGlobalApp/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfGlobalApp/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -52,6 +52,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
protected transient global.Global globalApp;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPageFlow/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPageFlow/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPageFlow/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -58,6 +58,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
StringBuffer _sb;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPrevious/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPrevious/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageFlowCore/pfPrevious/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -49,6 +49,7 @@
"</view-properties>"
}
)
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String _url;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageInput/test11/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageInput/test11/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/pageInput/test11/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -7,6 +7,7 @@
import org.apache.struts.action.ActionMapping;
import javax.servlet.http.HttpServletRequest;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
public static final String PG_FLD_1 = "Page Input field 1 value";
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/security/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/security/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/security/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -4,6 +4,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
/**
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/strutsMerge/test2/Jpf1.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/strutsMerge/test2/Jpf1.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/strutsMerge/test2/Jpf1.jpf
Mon Aug 2 15:25:31 2004
@@ -5,6 +5,7 @@
import org.apache.beehive.netui.pageflow.annotations.Jpf;
import org.apache.struts.action.ActionMapping;
[EMAIL PROTECTED]
public class Jpf1 extends PageFlowController
{
protected transient global.Global globalApp;
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/labelDefaults/Controller.jpf
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/labelDefaults/Controller.jpf
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/tags/labelDefaults/Controller.jpf
Mon Aug 2 15:25:31 2004
@@ -22,6 +22,7 @@
import org.apache.beehive.netui.pageflow.Forward;
import org.apache.beehive.netui.pageflow.annotations.Jpf;
[EMAIL PROTECTED]
public class Controller extends PageFlowController
{
private String defaultBound = "[NULL - In PageFlow]";
Modified:
incubator/beehive/trunk/netui/test/webapps/urlTemplates/urlTemplates/WEB-INF/src/global/Global.app
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/urlTemplates/urlTemplates/WEB-INF/src/global/Global.app
(original)
+++
incubator/beehive/trunk/netui/test/webapps/urlTemplates/urlTemplates/WEB-INF/src/global/Global.app
Mon Aug 2 15:25:31 2004
@@ -2,31 +2,21 @@
import org.apache.beehive.netui.pageflow.*;
-/**
- * The Global page flow is used to define actions which can be invoked by any
other
- * page flow in a webapp. The "jpf:catch" annotation provides a global way to
catch
- * unhandled exceptions by forwarding to an error page.
- *
- * @jpf:catch type="Exception" method="handleException"
- * @jpf:catch type="PageFlowException" method="handlePageFlowException"
- */
[EMAIL PROTECTED](
+ catches={
+ @Jpf.Catch(type=java.lang.Exception.class, method="handleException"),
+ @Jpf.Catch(type=PageFlowException.class,
method="handlePageFlowException")
+ }
+)
public class Global extends GlobalApp
{
- /**
- * Sample global action that will return to the default Controller.jpf in
- * the webapp root.
- * @jpf:action
- * @jpf:forward name="home" path="/Controller.jpf"
- */
+ @Jpf.Action([EMAIL PROTECTED](name="home", path="/Controller.jpf")})
public Forward home()
{
return new Forward( "home" );
}
- /**
- * @jpf:exception-handler
- * @jpf:forward name="errorPage" path="/error.jsp"
- */
+ @Jpf.ExceptionHandler([EMAIL PROTECTED](name="errorPage",
path="/error.jsp")})
protected Forward handleException( Exception ex, String actionName,
String message, FormData form )
{
@@ -36,15 +26,7 @@
return new Forward( "errorPage" );
}
- /**
- * Handler for native page flow exceptions (e.g., ActionNotFoundException,
- * which is thrown when an unknown page flow action is requested). This
handler
- * allows PageFlowExceptions to write informative error pages to the
response.
- * To use the standard exception-handler for these exceptions, simply
remove
- * this method and the "jpf:catch" annotation for PageFlowException.
- *
- * @jpf:exception-handler
- */
+ @Jpf.ExceptionHandler
public Forward handlePageFlowException( PageFlowException ex, String
message,
String action, FormData form )
throws java.io.IOException