Author: lincolnthree
Date: 2010-10-14 16:23:34 -0400 (Thu, 14 Oct 2010)
New Revision: 13880
Added:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/el/
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/el/FacesContextELResolver.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockConversation.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockLogger.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/PhaseTestBase.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/component/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/FacesAnnotationsAdapterExtensionTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/ImproperlyAnnotatedBean.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/MockFlashContext.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/status/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/conversation/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest-beans.xml
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/environment/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/environment/mock.resource
Removed:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockConversation.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockLogger.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/PhaseTestBase.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/component/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtensionTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/ImproperlyAnnotatedBean.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/MockFlashContext.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/conversation/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/util/
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/context/
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/environment/
Modified:
modules/faces/trunk/api/pom.xml
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java
modules/faces/trunk/impl/pom.xml
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationTypeOverrideExtension.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtension.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/conversation/ConversationBoundaryInterceptor.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PreNavigateEventProducer.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/transaction/TransactionPhaseListener.java
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationExtension.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/component/UIValidateFormTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationalBean.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/ExternalContextProducerTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/FacesContextProducerTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockExternalContext.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockFacesContext.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/MockPhaseEventObserver.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/PhaseEventBridgeTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventBridgeTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventObserver.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/status/MessagesAdapterTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationTestObject.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationsTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/Icon.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/IconLiteral.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationEnum.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationTest.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataStoreTest.java
modules/faces/trunk/pom.xml
Log:
* Refactored POMs
* Updated to use latest WeldX & JBoss Logging
* Began @FlashScoped request query-param enhancement (probably still broken.)
Modified: modules/faces/trunk/api/pom.xml
===================================================================
--- modules/faces/trunk/api/pom.xml 2010-10-14 19:35:21 UTC (rev 13879)
+++ modules/faces/trunk/api/pom.xml 2010-10-14 20:23:34 UTC (rev 13880)
@@ -13,6 +13,44 @@
<packaging>jar</packaging>
<name>Seam Faces Module API</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.interceptor</groupId>
+ <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
<profiles>
<profile>
Modified:
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java
===================================================================
---
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/component/UIValidateForm.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -76,7 +76,7 @@
public void validate(final FacesContext context)
{
context.getApplication().publishEvent(context, PreValidateEvent.class,
UIValidateForm.class, this);
- BeanManager manager = BeanManagerAccessor.getManager();
+ BeanManager manager = BeanManagerAccessor.getBeanManager();
manager.fireEvent(this, BEFORE);
Validator validator = context.getApplication().createValidator(validatorId);
Modified:
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java
===================================================================
---
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/api/src/main/java/org/jboss/seam/faces/context/FlashContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -40,7 +40,7 @@
* Return the current ID of this request's {@link FlashContext}. If the ID
* has not yet been set as part of a redirect, the ID will be null.
*/
- String getId();
+ Integer getId();
/**
* Get a key value pair from the {@link FlashContext}.
Modified: modules/faces/trunk/impl/pom.xml
===================================================================
--- modules/faces/trunk/impl/pom.xml 2010-10-14 19:35:21 UTC (rev 13879)
+++ modules/faces/trunk/impl/pom.xml 2010-10-14 20:23:34 UTC (rev 13880)
@@ -1,71 +1,121 @@
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>seam-faces-parent</artifactId>
- <groupId>org.jboss.seam.faces</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <parent>
+ <artifactId>seam-faces-parent</artifactId>
+ <groupId>org.jboss.seam.faces</groupId>
+ <version>3.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
- </parent>
+ </parent>
- <artifactId>seam-faces</artifactId>
- <version>3.0.0-SNAPSHOT</version>
+ <artifactId>seam-faces</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>Seam Faces Module Core Implementation</name>
+ <packaging>jar</packaging>
+ <name>Seam Faces Module Core Implementation</name>
- <dependencies>
- <dependency>
+ <dependencies>
+ <dependency>
+ <artifactId>seam-faces-api</artifactId>
+ <groupId>org.jboss.seam.faces</groupId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.international</groupId>
+ <artifactId>seam-international</artifactId>
+ </dependency>
+ <dependency>
+ <artifactId>seam-persistence-api</artifactId>
+ <groupId>org.jboss.seam.persistence</groupId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.spec.javax.interceptor</groupId>
+ <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<!-- Required until the Servlet 3.0 API can be resolved in Central -->
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <artifactId>seam-faces-api</artifactId>
- <groupId>org.jboss.seam.faces</groupId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.international</groupId>
- <artifactId>seam-international</artifactId>
- <version>${seam.i18n.version}</version>
- </dependency>
- <dependency>
- <artifactId>seam-persistence-api</artifactId>
- <groupId>org.jboss.seam.persistence</groupId>
- <version>${project.version}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <scope>provided</scope>
- </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <scope>provided</scope>
+ </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>code-coverage</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>org.jboss.test-jsf</groupId>
+ <artifactId>jsf-mock</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.sonatype.maven.plugin</groupId>
+ <artifactId>emma4it-maven-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationFieldProducer.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -39,10 +39,10 @@
import javax.faces.convert.Converter;
import javax.inject.Inject;
+import org.jboss.logging.Logger;
import org.jboss.seam.faces.event.qualifier.After;
import org.jboss.seam.faces.event.qualifier.Before;
import org.jboss.seam.faces.validation.InputField;
-import org.slf4j.Logger;
/**
* @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
@@ -51,8 +51,7 @@
@RequestScoped
public class FormValidationFieldProducer
{
- @Inject
- Logger log;
+ Logger log = Logger.getLogger(FormValidationFieldProducer.class);
@Inject
FacesContext context;
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationTypeOverrideExtension.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationTypeOverrideExtension.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/component/FormValidationTypeOverrideExtension.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -33,7 +33,7 @@
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import org.jboss.seam.faces.validation.InputField;
-import org.jboss.weld.extensions.annotated.AnnotatedTypeBuilder;
+import org.jboss.weld.extensions.reflection.annotated.AnnotatedTypeBuilder;
/**
* Ensure that any field annotated with {@link InputField} is produced by the
@@ -49,8 +49,9 @@
public <T> void processAnnotatedType(@Observes final
ProcessAnnotatedType<T> event)
{
- AnnotatedTypeBuilder<T> builder =
AnnotatedTypeBuilder.newInstance(event.getAnnotatedType());
- builder.readAnnotationsFromUnderlyingType();
+ AnnotatedTypeBuilder<T> builder = new AnnotatedTypeBuilder<T>();
+ builder.readFromType(event.getAnnotatedType());
+
boolean modifiedType = false;
for (AnnotatedField<?> f : event.getAnnotatedType().getFields())
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtension.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtension.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtension.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -52,8 +52,13 @@
/*
* For unit testing
*/
- static final Map<Class<?>, Class<? extends Annotation>> aliasedBeans
= new HashMap<Class<?>, Class<? extends Annotation>>();
+ private static final Map<Class<?>, Class<? extends Annotation>>
aliasedBeans = new HashMap<Class<?>, Class<? extends Annotation>>();
+ public static Map<Class<?>, Class<? extends Annotation>>
getAliasedbeans()
+ {
+ return aliasedBeans;
+ }
+
public FacesAnnotationsAdapterExtension()
{
scopeAliasMapping = new HashMap<Class<? extends Annotation>, Class<?
extends Annotation>>(3);
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashContextImpl.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -36,7 +36,8 @@
public class FlashContextImpl implements FlashContext, Serializable
{
private static final long serialVersionUID = 7502050909452181348L;
- private String id = null;
+
+ private Integer id = null;
private final Map<String, Object> map = new ConcurrentHashMap<String,
Object>();
public Object get(final String key)
@@ -44,12 +45,12 @@
return map.get(key);
}
- public String getId()
+ public Integer getId()
{
return id;
}
- public void setId(final String id)
+ public void setId(final int id)
{
this.id = id;
}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/FlashScopedContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -77,7 +77,7 @@
private FlashContext getCurrentFlashContext()
{
- BeanManager manager = BeanManagerAccessor.getManager();
+ BeanManager manager = BeanManagerAccessor.getBeanManager();
return BeanManagerUtils.getContextualInstance(manager, FlashContext.class);
}
@@ -85,15 +85,18 @@
{
if (!isActive())
{
- throw new ContextNotActiveException("Seam context with scope annotation
@FlashScoped is not active with respect to the current thread");
+ throw new ContextNotActiveException("Seam context with scope annotation
@FlashScoped is not active with respect to the current thread. " +
+ "This is probably caused by attempting to access the Flash before it
was created or after it was destroyed.");
}
}
private void initializeCurrentContext()
{
- String currentId = getCurrentId();
+ Integer currentId = getCurrentId();
+
if (savedContextExists(currentId))
{
+ // getFlashForCurrentIdAndReferrer
FlashContext context = (FlashContext)
getSessionMap().get(getSessionKey(currentId));
currentContext = context;
}
@@ -104,35 +107,43 @@
getSessionMap().put(getSessionKey(context.getId()), context);
currentContext = context;
}
+
}
- private String getNextFlashId()
+ private int getNextFlashId()
{
- String result = null;
+ Map<String, Object> sessionMap = getSessionMap();
+ int id = 0;
- Map<String, Object> sessionMap = getSessionMap();
- int i = 0;
- while (result == null)
+ while (sessionMap.containsKey(getSessionKey(id)))
{
- if (!sessionMap.containsKey(getSessionKey(result)))
- {
- result = String.valueOf(i);
- }
+ id++;
}
-
- return result;
+ return id;
}
- private boolean savedContextExists(final String id)
+ private boolean savedContextExists(final int id)
{
return getSessionMap().get(getSessionKey(id)) instanceof FlashContext;
}
- private String getCurrentId()
+ private Integer getCurrentId()
{
Map<String, String> requestParameterMap =
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap();
String currentId = requestParameterMap.get(requestParameterName);
- return currentId;
+ Integer result = null;
+ try
+ {
+ if (currentId != null)
+ {
+ result = Integer.valueOf(currentId);
+ }
+ }
+ catch (NumberFormatException e)
+ {
+ // ignored!
+ }
+ return result;
}
/**
@@ -260,13 +271,10 @@
return externalContext.getSessionMap();
}
- private String getSessionKey(final String id)
+ private String getSessionKey(final int id)
{
String result = SESSION_KEY_PREFIX;
- if (id != null)
- {
- result += "_" + id;
- }
+ result += "_" + id;
return result;
}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/conversation/ConversationBoundaryInterceptor.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/conversation/ConversationBoundaryInterceptor.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/context/conversation/ConversationBoundaryInterceptor.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -32,8 +32,8 @@
import javax.interceptor.Interceptor;
import javax.interceptor.InvocationContext;
+import org.jboss.logging.Logger;
import org.jboss.seam.faces.util.Annotations;
-import org.slf4j.Logger;
/**
* Intercepts methods annotated as Conversational entry points: @{@link Begin}
@@ -47,8 +47,7 @@
{
private static final long serialVersionUID = -2729227895205287477L;
- @Inject
- Logger log;
+ Logger log = Logger.getLogger(ConversationBoundaryInterceptor.class);
@Inject
Conversation conversation;
Added:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/el/FacesContextELResolver.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/el/FacesContextELResolver.java
(rev 0)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/el/FacesContextELResolver.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.seam.faces.el;
+
+import java.beans.FeatureDescriptor;
+import java.util.Iterator;
+
+import javax.annotation.PostConstruct;
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.faces.context.FacesContext;
+
+import org.jboss.weld.extensions.el.Resolver;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
+ *
+ */
+@Resolver
+public class FacesContextELResolver extends ELResolver
+{
+ private ELResolver wrapped;
+
+ @PostConstruct
+ public void postConstruct()
+ {
+ this.wrapped = FacesContext.getCurrentInstance().getELContext().getELResolver();
+ }
+
+ @Override
+ public Object getValue(ELContext context, Object base, Object property)
+ {
+ return wrapped.getValue(context, base, property);
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ {
+ return null;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property, Object value)
+ {
+ wrapped.setValue(context, base, property, value);
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ {
+ return wrapped.isReadOnly(context, base, property);
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
Object base)
+ {
+ return wrapped.getFeatureDescriptors(context, base);
+ }
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base)
+ {
+ return wrapped.getCommonPropertyType(context, base);
+ }
+
+}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -46,7 +46,11 @@
{
parameters = new HashMap<String, List<String>>();
}
- parameters.put(context.getRequestParameterName(),
Arrays.asList(flash.getId()));
+ if (flash.getId() != null)
+ {
+ String id = String.valueOf(flash.getId());
+ parameters.put(context.getRequestParameterName(), Arrays.asList(id));
+ }
}
return super.encodeRedirectURL(baseUrl, parameters);
}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/environment/SeamExternalContextFactory.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -23,7 +23,7 @@
{
try
{
- BeanManager manager = BeanManagerAccessor.getManager();
+ BeanManager manager = BeanManagerAccessor.getBeanManager();
SeamExternalContext seamExternalContext =
BeanManagerUtils.getContextualInstance(manager, SeamExternalContext.class);
seamExternalContext.setWrapped(parent.getExternalContext(context, request,
response));
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PhaseEventBridge.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -31,6 +31,7 @@
import javax.faces.event.PhaseListener;
import javax.inject.Inject;
+import org.jboss.logging.Logger;
import org.jboss.seam.faces.event.qualifier.After;
import org.jboss.seam.faces.event.qualifier.ApplyRequestValues;
import org.jboss.seam.faces.event.qualifier.Before;
@@ -39,7 +40,6 @@
import org.jboss.seam.faces.event.qualifier.RenderResponse;
import org.jboss.seam.faces.event.qualifier.RestoreView;
import org.jboss.seam.faces.event.qualifier.UpdateModelValues;
-import org.slf4j.Logger;
/**
* A PhaseListener used to bridge JSF phase events to the CDI event model.
@@ -66,10 +66,9 @@
{
private static final long serialVersionUID = -6181019551463318453L;
+ private static final Logger log = Logger.getLogger(PhaseEventBridge.class);
+
@Inject
- private Logger log;
-
- @Inject
private BeanManager beanManager;
/**
@@ -115,7 +114,7 @@
* This propagates the event to CDI
*/
Annotation[] qualifiers = new Annotation[] { whenQualifier, phaseQualifier };
- log.debug("Fired event #0 with qualifiers #1", event, qualifiers);
+ log.debugf("Fired event [" + event + "] with qualifiers [" +
qualifiers + "]");
beanManager.fireEvent(event, qualifiers);
}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PreNavigateEventProducer.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PreNavigateEventProducer.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/event/PreNavigateEventProducer.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -60,7 +60,7 @@
@Override
public void handleNavigation(final FacesContext context, final String fromAction,
final String outcome)
{
- BeanManager manager = BeanManagerAccessor.getManager();
+ BeanManager manager = BeanManagerAccessor.getBeanManager();
NavigationCase navigationCase = getNavigationCase(context, fromAction, outcome);
manager.fireEvent(new PreNavigateEvent(context, fromAction, outcome,
navigationCase));
parent.handleNavigation(context, fromAction, outcome);
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -31,6 +31,7 @@
import javax.faces.event.PhaseEvent;
import javax.inject.Inject;
+import org.jboss.logging.Logger;
import org.jboss.seam.faces.context.FlashContext;
import org.jboss.seam.faces.event.PreNavigateEvent;
import org.jboss.seam.faces.event.qualifier.Before;
@@ -38,7 +39,6 @@
import org.jboss.seam.international.status.Level;
import org.jboss.seam.international.status.Message;
import org.jboss.seam.international.status.Messages;
-import org.slf4j.Logger;
/**
* Convert Seam Messages into FacesMessages before RenderResponse phase.<br>
@@ -50,6 +50,7 @@
public class MessagesAdapter implements Serializable
{
private static final long serialVersionUID = -2908193057765795662L;
+ private static final Logger log = Logger.getLogger(MessagesAdapter.class);
private static final String FLASH_MESSAGES_KEY = MessagesAdapter.class.getName() +
".FLASH_KEY";
@@ -59,9 +60,6 @@
@Inject
FlashContext context;
- @Inject
- Logger log;
-
void flushBeforeNavigate(@Observes final PreNavigateEvent event)
{
if (!messages.getAll().isEmpty())
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/transaction/TransactionPhaseListener.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/transaction/TransactionPhaseListener.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/transaction/TransactionPhaseListener.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -30,13 +30,11 @@
import javax.faces.event.PhaseListener;
import javax.inject.Inject;
+import org.jboss.logging.Logger;
import org.jboss.seam.faces.viewdata.ViewDataStore;
import org.jboss.seam.persistence.PersistenceContexts;
import org.jboss.seam.persistence.transaction.SeamTransaction;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
/**
* Phase listener that is resposible for seam managed transactions. It is also
* resposible for setting the correct flush mode on the persistence context
@@ -49,7 +47,7 @@
{
private static final long serialVersionUID = -9127555729455066493L;
- private static final Logger log =
LoggerFactory.getLogger(TransactionPhaseListener.class);
+ private static final Logger log = Logger.getLogger(TransactionPhaseListener.class);
@Inject
SeamTransaction transaction;
@@ -80,7 +78,6 @@
handleTransactionsAfterPhase(event);
}
-
public void handleTransactionsBeforePhase(PhaseEvent event)
{
PhaseId phaseId = event.getPhaseId();
@@ -90,7 +87,7 @@
{
persistenceContexts.beforeRender();
}
- boolean beginTran = (phaseId == PhaseId.RENDER_RESPONSE || phaseId ==
PhaseId.RESTORE_VIEW);
+ boolean beginTran = ((phaseId == PhaseId.RENDER_RESPONSE) || (phaseId ==
PhaseId.RESTORE_VIEW));
if (beginTran)
{
begin(phaseId);
@@ -103,8 +100,8 @@
PhaseId phaseId = event.getPhaseId();
if (seamManagedTransactionStatus(phaseId))
{
- boolean commitTran = phaseId == PhaseId.INVOKE_APPLICATION ||
event.getFacesContext().getRenderResponse() ||
- event.getFacesContext().getResponseComplete() || phaseId ==
PhaseId.RENDER_RESPONSE;
+ boolean commitTran = (phaseId == PhaseId.INVOKE_APPLICATION) ||
event.getFacesContext().getRenderResponse() ||
+ event.getFacesContext().getResponseComplete() || (phaseId ==
PhaseId.RENDER_RESPONSE);
if (commitTran)
{
@@ -151,7 +148,7 @@
log.debug("committing transaction " + phaseString);
transaction.commit();
- }
+ }
catch (IllegalStateException e)
{
log.warn("TX commit failed with illegal state exception. This may be
because the tx timed out and was rolled back in the background.", e);
@@ -187,7 +184,7 @@
{
return false;
}
- else if (config == SeamManagedTransactionType.RENDER_RESPONSE && phase !=
PhaseId.RENDER_RESPONSE)
+ else if ((config == SeamManagedTransactionType.RENDER_RESPONSE) && (phase
!= PhaseId.RENDER_RESPONSE))
{
return false;
}
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationExtension.java
===================================================================
---
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationExtension.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationExtension.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -34,8 +34,7 @@
import javax.enterprise.inject.spi.Extension;
import javax.enterprise.inject.spi.ProcessAnnotatedType;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.jboss.logging.Logger;
/**
* Extension that scans enums for view specific configuration
@@ -46,7 +45,7 @@
public class ViewDataConfigurationExtension implements Extension
{
- private final Logger log =
LoggerFactory.getLogger(ViewDataConfigurationExtension.class);
+ private static final Logger log =
Logger.getLogger(ViewDataConfigurationExtension.class);
private final Map<String, Set<Annotation>> data = new HashMap<String,
Set<Annotation>>();
@@ -57,7 +56,7 @@
{
if (!tp.getJavaClass().isEnum())
{
- log.warn("ViewConfig annotation should only be applied to enums, and {}
is not an enum.", tp.getJavaClass());
+ log.warn("ViewConfig annotation should only be applied to enums, and
[" + tp.getJavaClass() + "] is not an enum.");
}
else
{
Deleted:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockConversation.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockConversation.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockConversation.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.seam.faces;
-
-import javax.enterprise.context.Conversation;
-import javax.enterprise.context.RequestScoped;
-
-/**
- * Provide a mocked conversation object for use in Unit tests. This entire class
- * is a no-op; it does <i>nothing</i>.
- *
- * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
- *
- */
-@RequestScoped
-public class MockConversation implements Conversation
-{
- private long timeout;
- private String id;
- private boolean persistent;
-
- public void begin()
- {
- this.id = "generated";
- persistent = true;
- }
-
- public void begin(final String id)
- {
- this.id = id;
- persistent = true;
- }
-
- public void end()
- {
- persistent = false;
- }
-
- public String getId()
- {
- return id;
- }
-
- public long getTimeout()
- {
- return timeout;
- }
-
- public boolean isTransient()
- {
- return this.persistent == false;
- }
-
- public void setTimeout(final long milliseconds)
- {
- this.timeout = milliseconds;
- }
-
-}
Deleted: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockLogger.java
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockLogger.java 2010-10-14
19:35:21 UTC (rev 13879)
+++ modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockLogger.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,292 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.seam.faces;
-
-import org.slf4j.Logger;
-import org.slf4j.Marker;
-
-/**
- * Provide a completely empty logger implementation for Unit Tests. This entire
- * class is a no-op; it does <i>nothing</i>.
- *
- * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
- *
- */
-public class MockLogger implements Logger
-{
-
- public void debug(final String arg0)
- {
- }
-
- public void debug(final String arg0, final Object arg1)
- {
- }
-
- public void debug(final String arg0, final Object[] arg1)
- {
- }
-
- public void debug(final String arg0, final Throwable arg1)
- {
- }
-
- public void debug(final Marker arg0, final String arg1)
- {
- }
-
- public void debug(final String arg0, final Object arg1, final Object arg2)
- {
- }
-
- public void debug(final Marker arg0, final String arg1, final Object arg2)
- {
- }
-
- public void debug(final Marker arg0, final String arg1, final Object[] arg2)
- {
- }
-
- public void debug(final Marker arg0, final String arg1, final Throwable arg2)
- {
- }
-
- public void debug(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
- {
- }
-
- public void error(final String arg0)
- {
- }
-
- public void error(final String arg0, final Object arg1)
- {
- }
-
- public void error(final String arg0, final Object[] arg1)
- {
- }
-
- public void error(final String arg0, final Throwable arg1)
- {
- }
-
- public void error(final Marker arg0, final String arg1)
- {
- }
-
- public void error(final String arg0, final Object arg1, final Object arg2)
- {
- }
-
- public void error(final Marker arg0, final String arg1, final Object arg2)
- {
- }
-
- public void error(final Marker arg0, final String arg1, final Object[] arg2)
- {
- }
-
- public void error(final Marker arg0, final String arg1, final Throwable arg2)
- {
- }
-
- public void error(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
- {
- }
-
- public String getName()
- {
- return null;
- }
-
- public void info(final String arg0)
- {
- }
-
- public void info(final String arg0, final Object arg1)
- {
- }
-
- public void info(final String arg0, final Object[] arg1)
- {
- }
-
- public void info(final String arg0, final Throwable arg1)
- {
- }
-
- public void info(final Marker arg0, final String arg1)
- {
- }
-
- public void info(final String arg0, final Object arg1, final Object arg2)
- {
- }
-
- public void info(final Marker arg0, final String arg1, final Object arg2)
- {
- }
-
- public void info(final Marker arg0, final String arg1, final Object[] arg2)
- {
- }
-
- public void info(final Marker arg0, final String arg1, final Throwable arg2)
- {
- }
-
- public void info(final Marker arg0, final String arg1, final Object arg2, final Object
arg3)
- {
- }
-
- public boolean isDebugEnabled()
- {
- return false;
- }
-
- public boolean isDebugEnabled(final Marker arg0)
- {
- return false;
- }
-
- public boolean isErrorEnabled()
- {
- return false;
- }
-
- public boolean isErrorEnabled(final Marker arg0)
- {
- return false;
- }
-
- public boolean isInfoEnabled()
- {
- return false;
- }
-
- public boolean isInfoEnabled(final Marker arg0)
- {
- return false;
- }
-
- public boolean isTraceEnabled()
- {
- return false;
- }
-
- public boolean isTraceEnabled(final Marker arg0)
- {
- return false;
- }
-
- public boolean isWarnEnabled()
- {
- return false;
- }
-
- public boolean isWarnEnabled(final Marker arg0)
- {
- return false;
- }
-
- public void trace(final String arg0)
- {
- }
-
- public void trace(final String arg0, final Object arg1)
- {
- }
-
- public void trace(final String arg0, final Object[] arg1)
- {
- }
-
- public void trace(final String arg0, final Throwable arg1)
- {
- }
-
- public void trace(final Marker arg0, final String arg1)
- {
- }
-
- public void trace(final String arg0, final Object arg1, final Object arg2)
- {
- }
-
- public void trace(final Marker arg0, final String arg1, final Object arg2)
- {
- }
-
- public void trace(final Marker arg0, final String arg1, final Object[] arg2)
- {
- }
-
- public void trace(final Marker arg0, final String arg1, final Throwable arg2)
- {
- }
-
- public void trace(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
- {
- }
-
- public void warn(final String arg0)
- {
- }
-
- public void warn(final String arg0, final Object arg1)
- {
- }
-
- public void warn(final String arg0, final Object[] arg1)
- {
- }
-
- public void warn(final String arg0, final Throwable arg1)
- {
- }
-
- public void warn(final Marker arg0, final String arg1)
- {
- }
-
- public void warn(final String arg0, final Object arg1, final Object arg2)
- {
- }
-
- public void warn(final Marker arg0, final String arg1, final Object arg2)
- {
- }
-
- public void warn(final Marker arg0, final String arg1, final Object[] arg2)
- {
- }
-
- public void warn(final Marker arg0, final String arg1, final Throwable arg2)
- {
- }
-
- public void warn(final Marker arg0, final String arg1, final Object arg2, final Object
arg3)
- {
- }
-
-}
Deleted: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/PhaseTestBase.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/PhaseTestBase.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/PhaseTestBase.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.seam.faces;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.inject.Inject;
-
-import org.jboss.seam.faces.event.PhaseEventBridge;
-import org.jboss.test.faces.mock.lifecycle.MockLifecycle;
-import org.jboss.test.faces.stub.faces.StubFacesContext;
-
-/**
- * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
- *
- */
-public class PhaseTestBase
-{
- @Inject
- PhaseEventBridge phaseEventBridge;
-
- protected FacesContext facesContext = new StubFacesContext();
- protected final MockLifecycle lifecycle = new MockLifecycle();
-
- static List<PhaseId> ALL_PHASES = new ArrayList<PhaseId>()
- {
- private static final long serialVersionUID = 1L;
-
- {
- add(PhaseId.APPLY_REQUEST_VALUES);
- add(PhaseId.INVOKE_APPLICATION);
- add(PhaseId.PROCESS_VALIDATIONS);
- add(PhaseId.RENDER_RESPONSE);
- add(PhaseId.RESTORE_VIEW);
- add(PhaseId.UPDATE_MODEL_VALUES);
- }
- };
-
- protected void fireAllPhases()
- {
- fireAllBeforePhases();
- fireAllAfterPhases();
- }
-
- protected void fireAllBeforePhases()
- {
- fireBeforePhases(ALL_PHASES);
- }
-
- protected void fireBeforePhases(final List<PhaseId> phases)
- {
- for (PhaseId phaseId : phases)
- {
- fireBeforePhase(phaseId);
- }
- }
-
- protected void fireBeforePhase(final PhaseId phaseId)
- {
- phaseEventBridge.beforePhase(new PhaseEvent(facesContext, phaseId, lifecycle));
- }
-
- protected void fireAllAfterPhases()
- {
- fireAfterPhases(ALL_PHASES);
- }
-
- protected void fireAfterPhases(final List<PhaseId> phases)
- {
- for (PhaseId phaseId : phases)
- {
- fireAfterPhase(phaseId);
- }
- }
-
- protected void fireAfterPhase(final PhaseId phaseId)
- {
- phaseEventBridge.afterPhase(new PhaseEvent(facesContext, phaseId, lifecycle));
- }
-}
Deleted:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtensionTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtensionTest.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtensionTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.seam.faces.context;
-
-import static org.junit.Assert.assertTrue;
-
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
- */
-(a)RunWith(Arquillian.class)
-public class FacesAnnotationsAdapterExtensionTest
-{
-
- @Deployment
- public static JavaArchive createTestArchive()
- {
- return ShrinkWrap.create("test.jar",
JavaArchive.class).addClasses(ImproperlyAnnotatedBean.class).addManifestResource(new
ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
- }
-
- @Test
- public void testImproperlyAnnotatedClassIsCaptured()
- {
-
assertTrue(FacesAnnotationsAdapterExtension.aliasedBeans.containsKey(ImproperlyAnnotatedBean.class));
- }
-}
Deleted:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/ImproperlyAnnotatedBean.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/ImproperlyAnnotatedBean.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/ImproperlyAnnotatedBean.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,33 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.seam.faces.context;
-
-import javax.faces.bean.RequestScoped;
-
-/**
- * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
- *
- */
-@RequestScoped
-public class ImproperlyAnnotatedBean
-{
-}
Deleted:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/MockFlashContext.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/MockFlashContext.java 2010-10-14
19:35:21 UTC (rev 13879)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/MockFlashContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.jboss.seam.faces.context;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.enterprise.inject.Typed;
-
-/**
- * A mock {@link FlashContext} that can be injected into tests.
- *
- * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
- *
- */
-(a)Typed(FlashContext.class)
-public class MockFlashContext implements FlashContext, Serializable
-{
- private static final long serialVersionUID = 7502050909452181348L;
- private String id = null;
- private final Map<String, Object> map = new ConcurrentHashMap<String,
Object>();
-
- public Object get(final String key)
- {
- return map.get(key);
- }
-
- public String getId()
- {
- return id;
- }
-
- public void setId(final String id)
- {
- this.id = id;
- }
-
- public boolean isEmpty()
- {
- return map.isEmpty();
- }
-
- public void put(final String key, final Object value)
- {
- map.put(key, value);
- }
-
-}
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockConversation.java
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockConversation.java)
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockConversation.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockConversation.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.seam.faces.test;
+
+import javax.enterprise.context.Conversation;
+import javax.enterprise.context.RequestScoped;
+
+/**
+ * Provide a mocked conversation object for use in Unit tests. This entire class
+ * is a no-op; it does <i>nothing</i>.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
+ *
+ */
+@RequestScoped
+public class MockConversation implements Conversation
+{
+ private long timeout;
+ private String id;
+ private boolean persistent;
+
+ public void begin()
+ {
+ this.id = "generated";
+ persistent = true;
+ }
+
+ public void begin(final String id)
+ {
+ this.id = id;
+ persistent = true;
+ }
+
+ public void end()
+ {
+ persistent = false;
+ }
+
+ public String getId()
+ {
+ return id;
+ }
+
+ public long getTimeout()
+ {
+ return timeout;
+ }
+
+ public boolean isTransient()
+ {
+ return this.persistent == false;
+ }
+
+ public void setTimeout(final long milliseconds)
+ {
+ this.timeout = milliseconds;
+ }
+
+}
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockLogger.java
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/MockLogger.java)
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockLogger.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/MockLogger.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,292 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.seam.faces.test;
+
+import org.slf4j.Logger;
+import org.slf4j.Marker;
+
+/**
+ * Provide a completely empty logger implementation for Unit Tests. This entire
+ * class is a no-op; it does <i>nothing</i>.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
+ *
+ */
+public class MockLogger implements Logger
+{
+
+ public void debug(final String arg0)
+ {
+ }
+
+ public void debug(final String arg0, final Object arg1)
+ {
+ }
+
+ public void debug(final String arg0, final Object[] arg1)
+ {
+ }
+
+ public void debug(final String arg0, final Throwable arg1)
+ {
+ }
+
+ public void debug(final Marker arg0, final String arg1)
+ {
+ }
+
+ public void debug(final String arg0, final Object arg1, final Object arg2)
+ {
+ }
+
+ public void debug(final Marker arg0, final String arg1, final Object arg2)
+ {
+ }
+
+ public void debug(final Marker arg0, final String arg1, final Object[] arg2)
+ {
+ }
+
+ public void debug(final Marker arg0, final String arg1, final Throwable arg2)
+ {
+ }
+
+ public void debug(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
+ {
+ }
+
+ public void error(final String arg0)
+ {
+ }
+
+ public void error(final String arg0, final Object arg1)
+ {
+ }
+
+ public void error(final String arg0, final Object[] arg1)
+ {
+ }
+
+ public void error(final String arg0, final Throwable arg1)
+ {
+ }
+
+ public void error(final Marker arg0, final String arg1)
+ {
+ }
+
+ public void error(final String arg0, final Object arg1, final Object arg2)
+ {
+ }
+
+ public void error(final Marker arg0, final String arg1, final Object arg2)
+ {
+ }
+
+ public void error(final Marker arg0, final String arg1, final Object[] arg2)
+ {
+ }
+
+ public void error(final Marker arg0, final String arg1, final Throwable arg2)
+ {
+ }
+
+ public void error(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
+ {
+ }
+
+ public String getName()
+ {
+ return null;
+ }
+
+ public void info(final String arg0)
+ {
+ }
+
+ public void info(final String arg0, final Object arg1)
+ {
+ }
+
+ public void info(final String arg0, final Object[] arg1)
+ {
+ }
+
+ public void info(final String arg0, final Throwable arg1)
+ {
+ }
+
+ public void info(final Marker arg0, final String arg1)
+ {
+ }
+
+ public void info(final String arg0, final Object arg1, final Object arg2)
+ {
+ }
+
+ public void info(final Marker arg0, final String arg1, final Object arg2)
+ {
+ }
+
+ public void info(final Marker arg0, final String arg1, final Object[] arg2)
+ {
+ }
+
+ public void info(final Marker arg0, final String arg1, final Throwable arg2)
+ {
+ }
+
+ public void info(final Marker arg0, final String arg1, final Object arg2, final Object
arg3)
+ {
+ }
+
+ public boolean isDebugEnabled()
+ {
+ return false;
+ }
+
+ public boolean isDebugEnabled(final Marker arg0)
+ {
+ return false;
+ }
+
+ public boolean isErrorEnabled()
+ {
+ return false;
+ }
+
+ public boolean isErrorEnabled(final Marker arg0)
+ {
+ return false;
+ }
+
+ public boolean isInfoEnabled()
+ {
+ return false;
+ }
+
+ public boolean isInfoEnabled(final Marker arg0)
+ {
+ return false;
+ }
+
+ public boolean isTraceEnabled()
+ {
+ return false;
+ }
+
+ public boolean isTraceEnabled(final Marker arg0)
+ {
+ return false;
+ }
+
+ public boolean isWarnEnabled()
+ {
+ return false;
+ }
+
+ public boolean isWarnEnabled(final Marker arg0)
+ {
+ return false;
+ }
+
+ public void trace(final String arg0)
+ {
+ }
+
+ public void trace(final String arg0, final Object arg1)
+ {
+ }
+
+ public void trace(final String arg0, final Object[] arg1)
+ {
+ }
+
+ public void trace(final String arg0, final Throwable arg1)
+ {
+ }
+
+ public void trace(final Marker arg0, final String arg1)
+ {
+ }
+
+ public void trace(final String arg0, final Object arg1, final Object arg2)
+ {
+ }
+
+ public void trace(final Marker arg0, final String arg1, final Object arg2)
+ {
+ }
+
+ public void trace(final Marker arg0, final String arg1, final Object[] arg2)
+ {
+ }
+
+ public void trace(final Marker arg0, final String arg1, final Throwable arg2)
+ {
+ }
+
+ public void trace(final Marker arg0, final String arg1, final Object arg2, final
Object arg3)
+ {
+ }
+
+ public void warn(final String arg0)
+ {
+ }
+
+ public void warn(final String arg0, final Object arg1)
+ {
+ }
+
+ public void warn(final String arg0, final Object[] arg1)
+ {
+ }
+
+ public void warn(final String arg0, final Throwable arg1)
+ {
+ }
+
+ public void warn(final Marker arg0, final String arg1)
+ {
+ }
+
+ public void warn(final String arg0, final Object arg1, final Object arg2)
+ {
+ }
+
+ public void warn(final Marker arg0, final String arg1, final Object arg2)
+ {
+ }
+
+ public void warn(final Marker arg0, final String arg1, final Object[] arg2)
+ {
+ }
+
+ public void warn(final Marker arg0, final String arg1, final Throwable arg2)
+ {
+ }
+
+ public void warn(final Marker arg0, final String arg1, final Object arg2, final Object
arg3)
+ {
+ }
+
+}
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/PhaseTestBase.java (from
rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/PhaseTestBase.java)
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/PhaseTestBase.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/PhaseTestBase.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.seam.faces.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.inject.Inject;
+
+import org.jboss.seam.faces.event.PhaseEventBridge;
+import org.jboss.test.faces.mock.lifecycle.MockLifecycle;
+import org.jboss.test.faces.stub.faces.StubFacesContext;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
+ *
+ */
+public class PhaseTestBase
+{
+ @Inject
+ PhaseEventBridge phaseEventBridge;
+
+ protected FacesContext facesContext = new StubFacesContext();
+ protected final MockLifecycle lifecycle = new MockLifecycle();
+
+ static List<PhaseId> ALL_PHASES = new ArrayList<PhaseId>()
+ {
+ private static final long serialVersionUID = 1L;
+
+ {
+ add(PhaseId.APPLY_REQUEST_VALUES);
+ add(PhaseId.INVOKE_APPLICATION);
+ add(PhaseId.PROCESS_VALIDATIONS);
+ add(PhaseId.RENDER_RESPONSE);
+ add(PhaseId.RESTORE_VIEW);
+ add(PhaseId.UPDATE_MODEL_VALUES);
+ }
+ };
+
+ protected void fireAllPhases()
+ {
+ fireAllBeforePhases();
+ fireAllAfterPhases();
+ }
+
+ protected void fireAllBeforePhases()
+ {
+ fireBeforePhases(ALL_PHASES);
+ }
+
+ protected void fireBeforePhases(final List<PhaseId> phases)
+ {
+ for (PhaseId phaseId : phases)
+ {
+ fireBeforePhase(phaseId);
+ }
+ }
+
+ protected void fireBeforePhase(final PhaseId phaseId)
+ {
+ phaseEventBridge.beforePhase(new PhaseEvent(facesContext, phaseId, lifecycle));
+ }
+
+ protected void fireAllAfterPhases()
+ {
+ fireAfterPhases(ALL_PHASES);
+ }
+
+ protected void fireAfterPhases(final List<PhaseId> phases)
+ {
+ for (PhaseId phaseId : phases)
+ {
+ fireAfterPhase(phaseId);
+ }
+ }
+
+ protected void fireAfterPhase(final PhaseId phaseId)
+ {
+ phaseEventBridge.afterPhase(new PhaseEvent(facesContext, phaseId, lifecycle));
+ }
+}
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/component (from
rev 13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/component)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/component/UIValidateFormTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/component/UIValidateFormTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/component/UIValidateFormTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -20,10 +20,11 @@
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.component;
+package org.jboss.seam.faces.test.component;
import javax.faces.component.UIViewRoot;
+import org.jboss.seam.faces.component.UIValidateForm;
import org.jboss.test.faces.mock.application.MockApplication;
import org.jboss.test.faces.mock.context.MockFacesContext;
import org.junit.Test;
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/FacesAnnotationsAdapterExtensionTest.java
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/FacesAnnotationsAdapterExtensionTest.java)
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/FacesAnnotationsAdapterExtensionTest.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/FacesAnnotationsAdapterExtensionTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.seam.faces.test.context;
+
+import static org.junit.Assert.assertTrue;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.faces.context.FacesAnnotationsAdapterExtension;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
+ */
+(a)RunWith(Arquillian.class)
+public class FacesAnnotationsAdapterExtensionTest
+{
+
+ @Deployment
+ public static JavaArchive createTestArchive()
+ {
+ return ShrinkWrap.create("test.jar",
JavaArchive.class).addClasses(ImproperlyAnnotatedBean.class).addManifestResource(new
ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ }
+
+ @Test
+ public void testImproperlyAnnotatedClassIsCaptured()
+ {
+
assertTrue(FacesAnnotationsAdapterExtension.getAliasedbeans().containsKey(ImproperlyAnnotatedBean.class));
+ }
+}
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/ImproperlyAnnotatedBean.java
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/ImproperlyAnnotatedBean.java)
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/ImproperlyAnnotatedBean.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/ImproperlyAnnotatedBean.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.seam.faces.test.context;
+
+import javax.faces.bean.RequestScoped;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
+ *
+ */
+@RequestScoped
+public class ImproperlyAnnotatedBean
+{
+}
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/MockFlashContext.java
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/MockFlashContext.java)
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/MockFlashContext.java
(rev 0)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/MockFlashContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.seam.faces.test.context;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.enterprise.inject.Typed;
+
+import org.jboss.seam.faces.context.FlashContext;
+
+/**
+ * A mock {@link FlashContext} that can be injected into tests.
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com>Lincoln Baxter,
III</a>
+ *
+ */
+(a)Typed(FlashContext.class)
+public class MockFlashContext implements FlashContext, Serializable
+{
+ private static final long serialVersionUID = 7502050909452181348L;
+ private Integer id = null;
+ private final Map<String, Object> map = new ConcurrentHashMap<String,
Object>();
+
+ public Object get(final String key)
+ {
+ return map.get(key);
+ }
+
+ public Integer getId()
+ {
+ return id;
+ }
+
+ public void setId(final Integer id)
+ {
+ this.id = id;
+ }
+
+ public boolean isEmpty()
+ {
+ return map.isEmpty();
+ }
+
+ public void put(final String key, final Object value)
+ {
+ map.put(key, value);
+ }
+
+}
Copied:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation
(from rev 13870,
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/conversation)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/conversation/ConversationBoundaryInterceptorTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.context.conversation;
+package org.jboss.seam.faces.test.context.conversation;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -30,8 +30,9 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.faces.MockConversation;
-import org.jboss.seam.faces.MockLogger;
+import org.jboss.seam.faces.context.conversation.ConversationBoundaryInterceptor;
+import org.jboss.seam.faces.test.MockConversation;
+import org.jboss.seam.faces.test.MockLogger;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationalBean.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/context/conversation/ConversationalBean.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/context/conversation/ConversationalBean.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,13 +19,15 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.context.conversation;
+package org.jboss.seam.faces.test.context.conversation;
import javax.enterprise.context.Conversation;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import org.jboss.seam.faces.SeamFacesException;
+import org.jboss.seam.faces.context.conversation.Begin;
+import org.jboss.seam.faces.context.conversation.End;
/**
* @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter,
III</a>
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment (from
rev 13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/ExternalContextProducerTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/ExternalContextProducerTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/ExternalContextProducerTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.environment;
+package org.jboss.seam.faces.test.environment;
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.inject.Instance;
@@ -31,6 +31,8 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.faces.environment.ExternalContextProducer;
+import org.jboss.seam.faces.environment.FacesContextProducer;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/FacesContextProducerTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/FacesContextProducerTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/FacesContextProducerTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.environment;
+package org.jboss.seam.faces.test.environment;
import javax.enterprise.context.ContextNotActiveException;
import javax.enterprise.inject.Instance;
@@ -31,6 +31,7 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.faces.environment.FacesContextProducer;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockExternalContext.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/MockExternalContext.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockExternalContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.environment;
+package org.jboss.seam.faces.test.environment;
import javax.faces.context.ExternalContext;
import javax.faces.context.ExternalContextWrapper;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockFacesContext.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/environment/MockFacesContext.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/environment/MockFacesContext.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.environment;
+package org.jboss.seam.faces.test.environment;
import java.util.Iterator;
import javax.faces.application.Application;
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event (from rev
13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/MockPhaseEventObserver.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event/MockPhaseEventObserver.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/MockPhaseEventObserver.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.event;
+package org.jboss.seam.faces.test.event;
import java.util.ArrayList;
import java.util.Arrays;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/PhaseEventBridgeTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event/PhaseEventBridgeTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/PhaseEventBridgeTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,15 +19,16 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.event;
+package org.jboss.seam.faces.test.event;
import javax.faces.event.PhaseId;
import javax.inject.Inject;
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.faces.PhaseTestBase;
-import org.jboss.seam.faces.MockLogger;
+import org.jboss.seam.faces.event.PhaseEventBridge;
+import org.jboss.seam.faces.test.MockLogger;
+import org.jboss.seam.faces.test.PhaseTestBase;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventBridgeTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event/SystemEventBridgeTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventBridgeTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.event;
+package org.jboss.seam.faces.test.event;
import java.util.HashMap;
@@ -47,6 +47,7 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.faces.event.SystemEventBridge;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventObserver.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/event/SystemEventObserver.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/event/SystemEventObserver.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.event;
+package org.jboss.seam.faces.test.event;
import java.util.ArrayList;
import java.util.Arrays;
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/status (from rev
13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/status/MessagesAdapterTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/MessagesAdapterTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/status/MessagesAdapterTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.status;
+package org.jboss.seam.faces.test.status;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -30,10 +30,11 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.seam.faces.MockLogger;
-import org.jboss.seam.faces.PhaseTestBase;
-import org.jboss.seam.faces.context.MockFlashContext;
import org.jboss.seam.faces.event.PhaseEventBridge;
+import org.jboss.seam.faces.status.MessagesAdapter;
+import org.jboss.seam.faces.test.MockLogger;
+import org.jboss.seam.faces.test.PhaseTestBase;
+import org.jboss.seam.faces.test.context.MockFlashContext;
import org.jboss.seam.international.status.Bundles;
import org.jboss.seam.international.status.MessageFactory;
import org.jboss.seam.international.status.Messages;
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util (from rev
13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/util)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationTestObject.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/util/AnnotationTestObject.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationTestObject.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.util;
+package org.jboss.seam.faces.test.util;
import org.jboss.seam.faces.context.conversation.Begin;
import org.jboss.seam.faces.context.conversation.End;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationsTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/util/AnnotationsTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/util/AnnotationsTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.util;
+package org.jboss.seam.faces.test.util;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -28,6 +28,7 @@
import org.jboss.seam.faces.context.conversation.Begin;
import org.jboss.seam.faces.context.conversation.End;
+import org.jboss.seam.faces.util.Annotations;
import org.junit.Test;
/**
Copied: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata (from
rev 13870, modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata)
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/Icon.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/Icon.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/Icon.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.viewdata;
+package org.jboss.seam.faces.test.viewdata;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/IconLiteral.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/IconLiteral.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/IconLiteral.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.viewdata;
+package org.jboss.seam.faces.test.viewdata;
import javax.enterprise.util.AnnotationLiteral;
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationEnum.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationEnum.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationEnum.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,11 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.viewdata;
+package org.jboss.seam.faces.test.viewdata;
+
+import org.jboss.seam.faces.viewdata.ViewConfig;
+import org.jboss.seam.faces.viewdata.ViewData;
+
@ViewConfig
public enum ViewDataConfigurationEnum
{
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/ViewDataConfigurationTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataConfigurationTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.viewdata;
+package org.jboss.seam.faces.test.viewdata;
import java.util.List;
@@ -29,6 +29,8 @@
import org.jboss.arquillian.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.faces.viewdata.ViewDataStore;
+import org.jboss.seam.faces.viewdata.ViewDataStoreImpl;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -44,9 +46,10 @@
@Deployment
public static Archive<?> createTestArchive()
{
- JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class);
- archive.addPackage(ViewDataConfigurationTest.class.getPackage());
- archive.addManifestResource(new ByteArrayAsset(new byte[0]),
ArchivePaths.create("beans.xml"));
+ JavaArchive archive = ShrinkWrap.create("test.jar", JavaArchive.class)
+ .addClass(ViewDataStoreImpl.class)
+ .addPackage(ViewDataConfigurationTest.class.getPackage())
+ .addManifestResource(new ByteArrayAsset(new byte[0]),
ArchivePaths.create("beans.xml"));
return archive;
}
Modified:
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataStoreTest.java
===================================================================
---
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/viewdata/ViewDataStoreTest.java 2010-10-14
15:03:40 UTC (rev 13870)
+++
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/test/viewdata/ViewDataStoreTest.java 2010-10-14
20:23:34 UTC (rev 13880)
@@ -19,12 +19,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
*/
-package org.jboss.seam.faces.viewdata;
+package org.jboss.seam.faces.test.viewdata;
import java.util.List;
import junit.framework.Assert;
+import org.jboss.seam.faces.viewdata.ViewDataStore;
+import org.jboss.seam.faces.viewdata.ViewDataStoreImpl;
import org.junit.Test;
public class ViewDataStoreTest
Added:
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest-beans.xml
===================================================================
---
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest-beans.xml
(rev 0)
+++
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/context/conversation/ConversationBoundaryInterceptorTest-beans.xml 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1,31 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc., and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+-->
+<beans
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+
http://java.sun.com/xml/ns/javaee
+
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+ <interceptors>
+ <class>org.jboss.seam.faces.context.conversation.ConversationBoundaryInterceptor</class>
+ </interceptors>
+
+</beans>
\ No newline at end of file
Added:
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/environment/mock.resource
===================================================================
---
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/environment/mock.resource
(rev 0)
+++
modules/faces/trunk/impl/src/test/resources/org/jboss/seam/faces/test/environment/mock.resource 2010-10-14
20:23:34 UTC (rev 13880)
@@ -0,0 +1 @@
+SomeMockResourceDataHere
\ No newline at end of file
Modified: modules/faces/trunk/pom.xml
===================================================================
--- modules/faces/trunk/pom.xml 2010-10-14 19:35:21 UTC (rev 13879)
+++ modules/faces/trunk/pom.xml 2010-10-14 20:23:34 UTC (rev 13880)
@@ -1,4 +1,5 @@
-<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -33,6 +34,9 @@
<seam.version>3.0.0.b01</seam.version>
<!-- Seam i8ln doesn't have a release yet -->
<seam.i18n.version>3.0.0.Alpha1</seam.i18n.version>
+ <seam.persistence.version>3.0.0.Alpha1</seam.persistence.version>
+ <weld.extensions.version>1.0.0.Beta1</weld.extensions.version>
+ <jboss.logging.version>3.0.0.Beta4</jboss.logging.version>
</properties>
<dependencyManagement>
@@ -48,111 +52,44 @@
<dependency>
<groupId>org.jboss.seam.international</groupId>
- <artifactId>seam-international-api</artifactId>
+ <artifactId>seam-international</artifactId>
<version>${seam.i18n.version}</version>
</dependency>
+ <dependency>
+ <artifactId>seam-persistence-api</artifactId>
+ <groupId>org.jboss.seam.persistence</groupId>
+ <version>${seam.persistence.version}</version>
+ <scope>compile</scope>
+ </dependency>
- <!-- Need to use dependencyManagement to override org.jboss.seam:seam for
submodules -->
+ <!-- Need to use dependencyManagement to override org.jboss.seam:seam
+ for submodules -->
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces-api</artifactId>
<version>${project.version}</version>
</dependency>
-
-
<dependency>
<groupId>org.jboss.seam.faces</groupId>
<artifactId>seam-faces</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging</artifactId>
+ <version>${jboss.logging.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>${weld.extensions.version}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
- <!-- TODO Move these to the correct sub-module -->
- <dependencies>
-
- <dependency>
- <groupId>org.jboss.seam.international</groupId>
- <artifactId>seam-international-api</artifactId>
- </dependency>
-
- <!-- Environment Dependencies -->
- <dependency>
- <!-- This is necessary until a new JSF-API is published to central -->
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.spec.javax.interceptor</groupId>
- <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.annotation</groupId>
- <artifactId>jsr250-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-core</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-simple</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.test-jsf</groupId>
- <artifactId>jsf-mock</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
<profiles>
<profile>
<id>distribution</id>