Setup Eclipse project for sandbox.
Also did some cleanup of the source code to avoid compiler warnings.
This commit is contained in:
42
spring-webflow-sandbox/.classpath
Normal file
42
spring-webflow-sandbox/.classpath
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src/main/java"/>
|
||||
<classpathentry kind="src" path="src/test/java"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/spring-webflow"/>
|
||||
<classpathentry kind="lib" path="lib/test/junit.jar"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/spring-binding"/>
|
||||
<classpathentry kind="lib" path="lib/global/antlr.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/aopalliance.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/asm.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/asm-attrs.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/cglib.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/commons-codec.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/commons-collections.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/commons-logging.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/dom4j.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/ehcache.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/hibernate.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/hibernate-annotations.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/hibernate-entitymanager.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/hsqldb.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/javassist.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/jboss-archive-browsing.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/jstl.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/jta.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/log4j.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/ognl.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/persistence-api.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/servlet-api.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-aop.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-beans.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-context.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-core.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-dao.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-jdbc.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-jpa.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-web.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/spring-webmvc.jar"/>
|
||||
<classpathentry kind="lib" path="lib/global/standard.jar"/>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
17
spring-webflow-sandbox/.project
Normal file
17
spring-webflow-sandbox/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>spring-webflow-sandbox</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
74
spring-webflow-sandbox/.settings/org.eclipse.jdt.core.prefs
Normal file
74
spring-webflow-sandbox/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,74 @@
|
||||
#Wed Mar 07 21:33:41 CET 2007
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.doc.comment.support=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
@@ -0,0 +1,3 @@
|
||||
#Wed Mar 07 21:34:27 CET 2007
|
||||
eclipse.preferences.version=1
|
||||
internal.default.compliance=default
|
||||
@@ -8,7 +8,7 @@
|
||||
<property file="${common.build.dir}/project.properties" />
|
||||
<property file="${user.home}/build.properties" />
|
||||
|
||||
<property name="build.web" value="true"/>
|
||||
<property name="build.web" value="true"/>
|
||||
|
||||
<property name="project.title" value="Spring Web Flow Sandbox" />
|
||||
<property name="project.package" value="org.springframework.webflow" />
|
||||
|
||||
@@ -11,6 +11,7 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
public abstract class AbstractResourceHolder<E> implements ResourceHolder<E>
|
||||
, MethodReplacer {//todo replace on injector in config
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object reimplement(Object aObj, Method aMethod, Object[] aArgs) throws Throwable {
|
||||
Object retVal = null;
|
||||
if( aArgs.length == 0 ){
|
||||
|
||||
@@ -84,10 +84,10 @@ public class ExtendedFlowExecutionListenerInterceptor extends FlowExecutionListe
|
||||
* invoked.
|
||||
*
|
||||
* @param aContext The request aContext
|
||||
* @param aFlowDefinition
|
||||
* @param aInput
|
||||
* @throws EnterStateVetoException
|
||||
* The start state transition was not allowed
|
||||
* @param aFlowDefinition
|
||||
*/
|
||||
public final void sessionStarting(RequestContext aContext, FlowDefinition aFlowDefinition, MutableAttributeMap aInput) {
|
||||
aContext.getRequestScope().put(FIRST_EVENT_SIGNALED, Boolean.TRUE);
|
||||
|
||||
@@ -6,7 +6,7 @@ import javax.persistence.EntityManager;
|
||||
* Lifycycle controller that hide vendor specific routines for entity manager like:
|
||||
* <ul>
|
||||
* <li>Application transaction commit implementation. See, for example,
|
||||
* {@link org.hibernate.annotations.FlushModeType.MANUAL}</li>
|
||||
* <code>org.hibernate.annotations.FlushModeType.MANUAL</code></li>
|
||||
* <li>Binding/Unbinding persistence context resources for current thread</li>
|
||||
* </ul>
|
||||
*
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
package org.springframework.webflow.jpa;
|
||||
|
||||
import org.springframework.webflow.execution.ExtendedFlowExecutionListenerInterceptor;
|
||||
import org.springframework.webflow.execution.RequestContext;
|
||||
import org.springframework.webflow.execution.FlowSession;
|
||||
import org.springframework.webflow.execution.FlowExecutionContext;
|
||||
import org.springframework.webflow.execution.ConversationLifecycleListener;
|
||||
import org.springframework.webflow.execution.ConversationLifecycleListenerAdapter;
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.web.context.request.WebRequestInterceptor;
|
||||
import org.springframework.webflow.definition.FlowDefinition;
|
||||
import org.springframework.webflow.definition.StateDefinition;
|
||||
import org.springframework.webflow.engine.EndState;
|
||||
import org.springframework.web.context.request.WebRequestInterceptor;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import org.springframework.webflow.execution.ConversationLifecycleListenerAdapter;
|
||||
import org.springframework.webflow.execution.FlowExecutionContext;
|
||||
import org.springframework.webflow.execution.FlowSession;
|
||||
import org.springframework.webflow.execution.RequestContext;
|
||||
/**
|
||||
* Intended for those wating a long session model within webflows. A entity
|
||||
* manager is created when the flow begins, and is disconnected and reconnected
|
||||
|
||||
@@ -29,6 +29,7 @@ public abstract class HibernateUtils {
|
||||
}
|
||||
@Deprecated public static List<Class> getEntityClasses( EntityManager aEntityManager ) {
|
||||
SessionFactory sessionFactory = getSession(aEntityManager).getSessionFactory();
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, ClassMetadata> metadataMap = sessionFactory.getAllClassMetadata();
|
||||
List<Class> retVal = new LinkedList<Class>();
|
||||
for (ClassMetadata classMetadata : metadataMap.values()) {
|
||||
|
||||
Reference in New Issue
Block a user