Seam SVN: r13184 - in modules/faces/trunk/impl/src: test/java/org/jboss/seam/faces/status and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-06-16 12:49:35 -0400 (Wed, 16 Jun 2010)
New Revision: 13184
Modified:
modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java
modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/MessagesAdapterTest.java
Log:
Fixed compilation issues due to i18n pom dependency pulling Alpha, not Snapshot
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-06-16 16:45:55 UTC (rev 13183)
+++ modules/faces/trunk/impl/src/main/java/org/jboss/seam/faces/status/MessagesAdapter.java 2010-06-16 16:49:35 UTC (rev 13184)
@@ -37,7 +37,7 @@
import org.jboss.seam.faces.event.qualifier.RenderResponse;
import org.jboss.seam.international.status.Level;
import org.jboss.seam.international.status.Message;
-import org.jboss.seam.international.status.MessagesImpl;
+import org.jboss.seam.international.status.Messages;
import org.slf4j.Logger;
/**
@@ -54,7 +54,7 @@
private static final String FLASH_MESSAGES_KEY = MessagesAdapter.class.getName() + ".FLASH_KEY";
@Inject
- MessagesImpl messages;
+ Messages messages;
@Inject
FlashContext context;
@@ -64,7 +64,7 @@
void flushBeforeNavigate(@Observes final PreNavigateEvent event)
{
- if (!messages.isEmpty())
+ if (!messages.getAll().isEmpty())
{
log.debug("Saving status Messages to Flash Scope");
context.put(FLASH_MESSAGES_KEY, messages.getAll());
Modified: modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/MessagesAdapterTest.java
===================================================================
--- modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/MessagesAdapterTest.java 2010-06-16 16:45:55 UTC (rev 13183)
+++ modules/faces/trunk/impl/src/test/java/org/jboss/seam/faces/status/MessagesAdapterTest.java 2010-06-16 16:49:35 UTC (rev 13184)
@@ -36,7 +36,7 @@
import org.jboss.seam.faces.event.PhaseEventBridge;
import org.jboss.seam.international.status.Bundles;
import org.jboss.seam.international.status.MessageFactory;
-import org.jboss.seam.international.status.MessagesImpl;
+import org.jboss.seam.international.status.Messages;
import org.jboss.seam.international.status.builder.BundleTemplateMessageImpl;
import org.jboss.seam.international.status.builder.TemplateMessageImpl;
import org.jboss.shrinkwrap.api.ArchivePaths;
@@ -58,11 +58,11 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessagesAdapter.class, MessagesImpl.class, MockFlashContext.class, MessageFactory.class, TemplateMessageImpl.class, BundleTemplateMessageImpl.class, Bundles.class, PhaseEventBridge.class, MockLogger.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessagesAdapter.class, Messages.class, MockFlashContext.class, MessageFactory.class, TemplateMessageImpl.class, BundleTemplateMessageImpl.class, Bundles.class, PhaseEventBridge.class, MockLogger.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
@Inject
- MessagesImpl messages;
+ Messages messages;
String text = "Hey! This is a message";
14 years, 3 months
Seam SVN: r13183 - modules/international/trunk/api/src/main/java/org/jboss/seam/international/status.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-06-16 12:45:55 -0400 (Wed, 16 Jun 2010)
New Revision: 13183
Modified:
modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java
Log:
Update messages API to include isEmpty()
Modified: modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java
===================================================================
--- modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java 2010-06-16 16:39:15 UTC (rev 13182)
+++ modules/international/trunk/api/src/main/java/org/jboss/seam/international/status/Messages.java 2010-06-16 16:45:55 UTC (rev 13183)
@@ -50,6 +50,12 @@
public void clear();
/**
+ * Return true if there are no pending {@link Message} or
+ * {@link MessageBuilder} objects in the queue.
+ */
+ public boolean isEmpty();
+
+ /**
* Retrieve all pending {@link Messages} in their final state - as they will
* be displayed to the user. Calling this method will call
* {@link MessageBuilder#build()} on any queued {@link MessageBuilder}
14 years, 3 months
Seam SVN: r13182 - in modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status: builder and 1 other directory.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-06-16 12:39:15 -0400 (Wed, 16 Jun 2010)
New Revision: 13182
Modified:
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/MessagesTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/builder/BundleTemplateMessageImplTest.java
Log:
fixed tests that required a MockLogger
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/MessagesTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/MessagesTest.java 2010-06-16 16:37:00 UTC (rev 13181)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/MessagesTest.java 2010-06-16 16:39:15 UTC (rev 13182)
@@ -36,6 +36,7 @@
import org.jboss.seam.international.status.builder.BundleKey;
import org.jboss.seam.international.status.builder.BundleTemplateMessageImpl;
import org.jboss.seam.international.status.builder.TemplateMessageImpl;
+import org.jboss.seam.international.test.MockLogger;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -56,7 +57,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessagesImpl.class, MessageFactory.class, BundleTemplateMessageImpl.class, TemplateMessageImpl.class, Bundles.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessagesImpl.class, MessageFactory.class, BundleTemplateMessageImpl.class, TemplateMessageImpl.class, Bundles.class, MockLogger.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
@Inject
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/builder/BundleTemplateMessageImplTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/builder/BundleTemplateMessageImplTest.java 2010-06-16 16:37:00 UTC (rev 13181)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/status/builder/BundleTemplateMessageImplTest.java 2010-06-16 16:39:15 UTC (rev 13182)
@@ -32,6 +32,7 @@
import org.jboss.seam.international.status.builder.BundleTemplateMessageImpl;
import org.jboss.seam.international.status.builder.TemplateMessage;
import org.jboss.seam.international.status.builder.TemplateMessageImpl;
+import org.jboss.seam.international.test.MockLogger;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -50,7 +51,7 @@
@Deployment
public static Archive<?> createTestArchive()
{
- return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessageFactory.class, BundleTemplateMessageImpl.class, TemplateMessageImpl.class, Bundles.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MessageFactory.class, BundleTemplateMessageImpl.class, TemplateMessageImpl.class, Bundles.class, MockLogger.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
@Inject
14 years, 3 months
Seam SVN: r13181 - examples/trunk/booking-simplified.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-06-16 12:37:00 -0400 (Wed, 16 Jun 2010)
New Revision: 13181
Modified:
examples/trunk/booking-simplified/pom.xml
Log:
back to seam-faces 3.0.0.Alpha3
Modified: examples/trunk/booking-simplified/pom.xml
===================================================================
--- examples/trunk/booking-simplified/pom.xml 2010-06-16 11:18:36 UTC (rev 13180)
+++ examples/trunk/booking-simplified/pom.xml 2010-06-16 16:37:00 UTC (rev 13181)
@@ -38,7 +38,7 @@
<jboss-as-client.version>6.0.0.20100216-M2</jboss-as-client.version>
<jboss-javaee6-spec.version>1.0.0.Beta4</jboss-javaee6-spec.version>
<jboss-server-manager.version>1.0.3.GA</jboss-server-manager.version>
- <seam-faces.version>3.0.0-SNAPSHOT</seam-faces.version>
+ <seam-faces.version>3.0.0.Alpha3</seam-faces.version>
</properties>
<repositories>
14 years, 3 months
Seam SVN: r13180 - in branches/enterprise/JBPAPP_5_0: examples/spring/resources/META-INF and 1 other directories.
by seam-commits@lists.jboss.org
Author: kpiwko(a)redhat.com
Date: 2010-06-16 07:18:36 -0400 (Wed, 16 Jun 2010)
New Revision: 13180
Modified:
branches/enterprise/JBPAPP_5_0/build/root.pom.xml
branches/enterprise/JBPAPP_5_0/examples/spring/resources/META-INF/persistence-spring.xml
branches/enterprise/JBPAPP_5_0/examples/spring/resources/WEB-INF/applicationContext.xml
Log:
JBPAPP-4486, upgraded Spring to 2.5.6.SEC01
Modified: branches/enterprise/JBPAPP_5_0/build/root.pom.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2010-06-16 05:35:05 UTC (rev 13179)
+++ branches/enterprise/JBPAPP_5_0/build/root.pom.xml 2010-06-16 11:18:36 UTC (rev 13180)
@@ -51,6 +51,7 @@
<version.drools>5.0.1</version.drools>
<version.testng>5.9</version.testng>
<version.resteasy>1.2.1.GA_CP02</version.resteasy>
+ <version.spring>2.5.6.SEC01</version.spring>
</properties>
<dependencyManagement>
@@ -868,7 +869,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
- <version>2.0.6</version>
+ <version>${version.spring}</version>
<exclusions>
<!-- Prevent the insanity which is commons-logging pom introducing dependencies
on weird stuff -->
Modified: branches/enterprise/JBPAPP_5_0/examples/spring/resources/META-INF/persistence-spring.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/spring/resources/META-INF/persistence-spring.xml 2010-06-16 05:35:05 UTC (rev 13179)
+++ branches/enterprise/JBPAPP_5_0/examples/spring/resources/META-INF/persistence-spring.xml 2010-06-16 11:18:36 UTC (rev 13180)
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/persistence
- http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="bookingDatabase" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
+ <!-- classes must be enumerated due to a known bug in Seam 2.5.6, SPR-5787 -->
+ <class>org.jboss.seam.example.spring.Booking</class>
+ <class>org.jboss.seam.example.spring.Hotel</class>
+ <class>org.jboss.seam.example.spring.User</class>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.show_sql" value="true"/>
Modified: branches/enterprise/JBPAPP_5_0/examples/spring/resources/WEB-INF/applicationContext.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/examples/spring/resources/WEB-INF/applicationContext.xml 2010-06-16 05:35:05 UTC (rev 13179)
+++ branches/enterprise/JBPAPP_5_0/examples/spring/resources/WEB-INF/applicationContext.xml 2010-06-16 11:18:36 UTC (rev 13180)
@@ -26,7 +26,7 @@
<property name="dataSource" ref="dataSource"/>
<property name="persistenceUnitName" value="bookingDatabase"/>
<!-- Use alternate location to prevent JBoss AS from automatically loading persistence units (in-container) -->
- <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-spring.xml"/>
+ <property name="persistenceXmlLocation" value="classpath*:/META-INF/persistence-spring.xml"/>
</bean>
<!-- This example uses resource local JpaTransactionManager. You could just as easily use a JtaTransactionManager -->
14 years, 3 months
Seam SVN: r13179 - in modules/xml/trunk/impl: src/main/java/org/jboss/seam/xml/bootstrap and 13 other directories.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-06-16 01:35:05 -0400 (Wed, 16 Jun 2010)
New Revision: 13179
Added:
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/SimpleXmlProvider.java
Removed:
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/TestXmlProvider.java
Modified:
modules/xml/trunk/impl/pom.xml
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/AbstractXMLTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/BootstrapTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/NamespaceResolverTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/constructor/ConstructorTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetArrayFieldValueBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetCollectionFieldValueBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetFieldValueBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetMapFieldValueBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/iface/InterfaceTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/ProducerFieldValueBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/QualifierAttributesTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/interceptor/InterceptorTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/PrimitiveMethodTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/producer/MultipleProducerBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/simple/SimpleBeanTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/stereotype/StereotypeTest.java
modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/types/TypesTest.java
modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
Log:
changed from testng to junit to keep in line with module handbook recommendation
Modified: modules/xml/trunk/impl/pom.xml
===================================================================
--- modules/xml/trunk/impl/pom.xml 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/pom.xml 2010-06-16 05:35:05 UTC (rev 13179)
@@ -49,13 +49,26 @@
<groupId>org.jboss.weld</groupId>
<artifactId>weld-extensions</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
<scope>test</scope>
- <classifier>jdk15</classifier>
</dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+
</dependencies>
<scm>
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -49,7 +49,7 @@
private final List<ResourceLoader> resourceLoaders;
- static final String[] DEFAULT_RESOURCES = { "seam-beans.xml", "META-INF/seam-beans.xml", "META-INF/beans.xml" };
+ static final String[] DEFAULT_RESOURCES = { "seam-beans.xml", "META-INF/seam-beans.xml", "META-INF/beans.xml", "WEB-INF/beans.xml" };
final String[] resources;
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/AbstractXMLTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/AbstractXMLTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/AbstractXMLTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -29,8 +29,8 @@
import org.jboss.weld.environment.se.Weld;
import org.jboss.weld.environment.se.WeldContainer;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
+import org.junit.After;
+import org.junit.Before;
public abstract class AbstractXMLTest
{
@@ -40,17 +40,17 @@
protected abstract String getXmlFileName();
- @BeforeClass
+ @Before
public void setup()
{
String fileName = getClass().getPackage().getName().replace('.', '/') + "/" + getXmlFileName();
- TestXmlProvider.fileName = fileName;
+ SimpleXmlProvider.fileName = fileName;
weld = new Weld();
WeldContainer container = weld.initialize();
manager = container.getBeanManager();
}
- @AfterClass
+ @After
public void teardown()
{
weld.shutdown();
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/BootstrapTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/BootstrapTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/BootstrapTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -25,26 +25,23 @@
import org.jboss.seam.xml.bootstrap.XmlDocumentProvider;
import org.jboss.seam.xml.bootstrap.XmlExtension;
-import org.testng.annotations.Test;
+import org.junit.Test;
-/**
- * Unit test for simple App.
- */
public class BootstrapTest extends AbstractXMLTest
{
- @Override
- protected String getXmlFileName()
- {
- return "single-bean.xml";
- }
-
@Test
public void testDocumentProviders()
{
- XmlExtension x = getReference(XmlExtension.class);
- List<Class<? extends XmlDocumentProvider>> providers = x.getDocumentProviders();
+ XmlExtension extension = getReference(XmlExtension.class);
+ List<Class<? extends XmlDocumentProvider>> providers = extension.getDocumentProviders();
assert providers.size() == 2;
}
+
+ @Override
+ protected String getXmlFileName()
+ {
+ return null;
+ }
}
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/NamespaceResolverTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/NamespaceResolverTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/NamespaceResolverTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -33,7 +33,7 @@
import org.jboss.seam.xml.parser.namespace.NamespaceElementResolver;
import org.jboss.seam.xml.parser.namespace.PackageNamespaceElementResolver;
import org.jboss.seam.xml.test.simple.Bean1;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class NamespaceResolverTest
{
Copied: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/SimpleXmlProvider.java (from rev 13171, modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/TestXmlProvider.java)
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/SimpleXmlProvider.java (rev 0)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/SimpleXmlProvider.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -0,0 +1,53 @@
+/*
+ * 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.xml.test;
+
+import org.jboss.seam.xml.bootstrap.ResourceLoaderXmlDocumentProvider;
+import org.jboss.seam.xml.bootstrap.XmlDocument;
+import org.jboss.seam.xml.bootstrap.XmlDocumentProvider;
+
+public class SimpleXmlProvider implements XmlDocumentProvider
+{
+
+ public static String fileName;
+
+ ResourceLoaderXmlDocumentProvider docProvider;
+
+ public void close()
+ {
+ docProvider.close();
+ }
+
+ public XmlDocument getNextDocument()
+ {
+ return docProvider.getNextDocument();
+ }
+
+ public void open()
+ {
+ String[] r = new String[1];
+ r[0] = fileName;
+ docProvider = new ResourceLoaderXmlDocumentProvider(r);
+ docProvider.open();
+ }
+
+}
Deleted: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/TestXmlProvider.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/TestXmlProvider.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/TestXmlProvider.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -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.xml.test;
-
-import org.jboss.seam.xml.bootstrap.ResourceLoaderXmlDocumentProvider;
-import org.jboss.seam.xml.bootstrap.XmlDocument;
-import org.jboss.seam.xml.bootstrap.XmlDocumentProvider;
-
-public class TestXmlProvider implements XmlDocumentProvider
-{
-
- public static String fileName;
-
- ResourceLoaderXmlDocumentProvider docProvider;
-
- public void close()
- {
- docProvider.close();
- }
-
- public XmlDocument getNextDocument()
- {
- return docProvider.getNextDocument();
- }
-
- public void open()
- {
- String[] r = new String[1];
- r[0] = fileName;
- docProvider = new ResourceLoaderXmlDocumentProvider(r);
- docProvider.open();
- }
-
-}
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/constructor/ConstructorTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/constructor/ConstructorTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/constructor/ConstructorTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -22,7 +22,7 @@
package org.jboss.seam.xml.test.constructor;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class ConstructorTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetArrayFieldValueBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetArrayFieldValueBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetArrayFieldValueBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -23,7 +23,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class SetArrayFieldValueBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetCollectionFieldValueBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetCollectionFieldValueBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetCollectionFieldValueBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -23,7 +23,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class SetCollectionFieldValueBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetFieldValueBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetFieldValueBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetFieldValueBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -27,7 +27,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.seam.xml.test.method.QualifierEnum;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class SetFieldValueBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetMapFieldValueBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetMapFieldValueBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/fieldset/SetMapFieldValueBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -23,7 +23,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class SetMapFieldValueBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/generic/GenericBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -24,7 +24,7 @@
import javax.enterprise.util.AnnotationLiteral;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class GenericBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/iface/InterfaceTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/iface/InterfaceTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/iface/InterfaceTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -24,7 +24,7 @@
import javax.enterprise.util.AnnotationLiteral;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class InterfaceTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/ProducerFieldValueBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/ProducerFieldValueBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/ProducerFieldValueBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -22,7 +22,7 @@
package org.jboss.seam.xml.test.injection;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class ProducerFieldValueBeanTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/QualifierAttributesTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/QualifierAttributesTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/injection/QualifierAttributesTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -23,7 +23,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
/**
* Test that XML configured Qualifiers work as expected
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/interceptor/InterceptorTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/interceptor/InterceptorTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/interceptor/InterceptorTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -22,7 +22,7 @@
package org.jboss.seam.xml.test.interceptor;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class InterceptorTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/MethodTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -22,7 +22,7 @@
package org.jboss.seam.xml.test.method;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class MethodTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/PrimitiveMethodTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/PrimitiveMethodTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/method/PrimitiveMethodTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -24,7 +24,7 @@
import javax.enterprise.util.AnnotationLiteral;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class PrimitiveMethodTest extends AbstractXMLTest
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/producer/MultipleProducerBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/producer/MultipleProducerBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/producer/MultipleProducerBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -22,7 +22,7 @@
package org.jboss.seam.xml.test.producer;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
public class MultipleProducerBeanTest extends AbstractXMLTest
{
@@ -38,17 +38,16 @@
{
Reciever s = getReference(Reciever.class);
- assert s.val1==1;
- assert s.val2==2;
+ assert s.val1 == 1;
+ assert s.val2 == 2;
}
-
-
+
@Test
public void testProducerMethod()
{
Reciever s = getReference(Reciever.class);
- assert s.meth1==1;
- assert s.meth2==2;
+ assert s.meth1 == 1;
+ assert s.meth2 == 2;
}
}
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/simple/SimpleBeanTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/simple/SimpleBeanTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/simple/SimpleBeanTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -27,7 +27,7 @@
import javax.enterprise.util.AnnotationLiteral;
import org.jboss.seam.xml.test.AbstractXMLTest;
-import org.testng.annotations.Test;
+import org.junit.Test;
/**
* Unit test for simple App.
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/stereotype/StereotypeTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/stereotype/StereotypeTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/stereotype/StereotypeTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -24,7 +24,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.seam.xml.test.interceptor.InterceptedBean;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
/**
* this is the same as the interceptor test except the interceptor is applied
@@ -39,7 +39,7 @@
return "stereotype-beans.xml";
}
- @Test(enabled = true)
+ @Test
public void testStereotypes()
{
Modified: modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/types/TypesTest.java
===================================================================
--- modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/types/TypesTest.java 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/java/org/jboss/seam/xml/test/types/TypesTest.java 2010-06-16 05:35:05 UTC (rev 13179)
@@ -23,7 +23,7 @@
import org.jboss.seam.xml.test.AbstractXMLTest;
import org.jboss.weld.environment.se.util.WeldManagerUtils;
-import org.testng.annotations.Test;
+import org.junit.Test;
/**
* tests that <types> restricts the allowed types of an injection point
@@ -37,7 +37,7 @@
return "types-test-beans.xml";
}
- @Test(enabled = true)
+ @Test
public void testTypeRestriction()
{
Modified: modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension
===================================================================
--- modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-06-16 04:47:46 UTC (rev 13178)
+++ modules/xml/trunk/impl/src/test/resources/META-INF/services/org.jboss.seam.xml.XmlExtension 2010-06-16 05:35:05 UTC (rev 13179)
@@ -1 +1 @@
-org.jboss.seam.xml.test.TestXmlProvider
\ No newline at end of file
+org.jboss.seam.xml.test.SimpleXmlProvider
\ No newline at end of file
14 years, 3 months
Seam SVN: r13178 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-06-16 00:47:46 -0400 (Wed, 16 Jun 2010)
New Revision: 13178
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
Log:
update reference docs
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-06-16 04:21:05 UTC (rev 13177)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-general.xml 2010-06-16 04:47:46 UTC (rev 13178)
@@ -18,7 +18,7 @@
so <literal>seam-beans.xml</literal> is provided as an alternative. </para>
<para>Let's start with a simple example:</para>
- <programlisting>
+ <programlisting role="XML">
<![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
@@ -69,7 +69,7 @@
<para>The namespaces are searched in the order they are specified in the xml
document.</para>
- <programlisting>
+ <programlisting role="xml">
<![CDATA[
<test:ProducerQualifier>
<s:Qualifier/>
@@ -241,29 +241,36 @@
<programlisting role="XML">
<![CDATA[
<test:ArrayFieldValue>
+
<test:iarray>
<s:value>1</s:value>
<s:value>2</s:value>
</test:iarray>
+
<test:carray>
<s:value>java.lang.Integer</s:value>
<s:value>java.lang.Long</s:value>
</test:carray>
+
<test:sarray>
<s:value>hello</s:value>
<s:value>world</s:value>
</test:sarray>
+
</test:ArrayFieldValue>
<test:MapFieldValue>
+
<test:map1>
<s:entry><s:key>1</s:key><s:value>hello</s:value></s:entry>
<s:entry><s:key>2</s:key><s:value>world</s:value></s:entry>
</test:map1>
+
<test:map2>
<s:e><s:k>1</s:k><s:v>java.lang.Integer</s:v></s:e>
<s:e><s:k>2</s:k><s:v>java.lang.Long</s:v></s:e>
</test:map2>
+
</test:MapFieldValue>
]]>
</programlisting>
@@ -283,9 +290,11 @@
xmlns:s="urn:java:seam:core"
xmlns:test="urn:java:org.jboss.seam.xml.test.method">
<test:MethodBean>
+
<test:doStuff>
<s:Produces/>
</test:doStuff>
+
<test:doStuff>
<s:Produces/>
<test:Qualifier1/>
@@ -295,6 +304,7 @@
</test:MethodValueBean>
</s:parameters>
</test:doStuff>
+
<test:doStuff>
<s:Produces/>
<test:Qualifier1/>
@@ -305,6 +315,7 @@
</s:array>
</s:parameters>
</test:doStuff>
+
</test:MethodBean>
</beans>
]]>
@@ -382,14 +393,16 @@
<title>Overriding the type of an injection point</title>
<para>It is possible to limit which bean types are availible to inject int a given injection point:</para>
- <programlisting>
+ <programlisting role="java">
<![CDATA[
-
public class SomeBean
{
public Object someField;
}
-
+]]>
+</programlisting>
+<programlisting role="xml">
+<![CDATA[
<test:SomeBean>
<test:someField>
<s:Inject/>
@@ -408,15 +421,17 @@
<section>
<title>Annotation Members</title>
<para>It is possible to set the value of annotation members using attributes in xml. For example:</para>
- <programlisting>
+ <programlisting role="java" >
<![CDATA[
public @interface OtherQualifier {
String value1();
int value2();
QualifierEnum value();
}
-
-
+]]>
+</programlisting>
+<programlisting role="XML" >
+<![CDATA[
<test:QualifiedBean1>
<test:OtherQualifier value1="AA" value2="1">A</test:OtherQualifier>
</test:QualifiedBean1>
@@ -430,6 +445,39 @@
</section>
<section>
+ <title>Configuring Meta Annotations</title>
+ <para>It is possible to make existing annotations into qualifiers, stereotypes or interceptor bindings.</para>
+ <para>This configures a stereotype annotation <literal>SomeStereotype</literal> that has a single interceptor
+ binding and is named:</para>
+<programlisting role="XML" >
+<![CDATA[
+ <test:SomeStereotype>
+ <s:Stereotype/>
+ <test:InterceptorBinding/>
+ <s:Named/>
+ </test:SomeStereotype>
+]]>
+</programlisting>
+<para>This configures a qualifier annotation:</para>
+<programlisting role="XML" >
+<![CDATA[
+ <test:SomeQualifier>
+ <s:Qualifier/>
+ </test:SomeQualifier>
+]]>
+</programlisting>
+<para>This configures an interceptor binding:</para>
+<programlisting role="XML" >
+<![CDATA[
+ <test:SomeInterceptorBinding>
+ <s:InterceptorBinding/>
+ </test:SomeInterceptorBinding>
+]]>
+</programlisting>
+ </section>
+
+
+ <section>
<title>Generic Beans</title>
<para>Gereric beans allow for multiple beans to be created from a single bean definition. They are
designed for use by framework writers. From the users perspective there is no
@@ -438,7 +486,7 @@
<para>Generic beans are configured using the syntax described above. For every bean that the user
configures, a corresponding bean from the generic bean declaration is created. For example in the
framework xml configuration:</para>
-<programlisting>
+<programlisting role="XML" >
<![CDATA[
<s:genericBean class="org.jboss.seam.xml.test.generic.GenericMain" >
<test:GenericDependant>
14 years, 3 months
Seam SVN: r13177 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-06-16 00:21:05 -0400 (Wed, 16 Jun 2010)
New Revision: 13177
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/master.xml
Log:
oops
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/master.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/master.xml 2010-06-16 04:20:19 UTC (rev 13176)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/master.xml 2010-06-16 04:21:05 UTC (rev 13177)
@@ -7,5 +7,6 @@
<title>Seam XML Configuration</title>
<xi:include href="xml-introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="xml-general.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
\ No newline at end of file
14 years, 3 months
Seam SVN: r13176 - modules/xml/trunk/docs/src/main/docbook/en-US.
by seam-commits@lists.jboss.org
Author: swd847
Date: 2010-06-16 00:20:19 -0400 (Wed, 16 Jun 2010)
New Revision: 13176
Modified:
modules/xml/trunk/docs/src/main/docbook/en-US/master.xml
modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
Log:
fix docbook error
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/master.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/master.xml 2010-06-16 04:16:32 UTC (rev 13175)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/master.xml 2010-06-16 04:20:19 UTC (rev 13176)
@@ -7,6 +7,5 @@
<title>Seam XML Configuration</title>
<xi:include href="xml-introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- <xi:include href="xml-general.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>
\ No newline at end of file
Modified: modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml
===================================================================
--- modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-06-16 04:16:32 UTC (rev 13175)
+++ modules/xml/trunk/docs/src/main/docbook/en-US/xml-introduction.xml 2010-06-16 04:20:19 UTC (rev 13176)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="introduction">
<title>Seam XML Introduction</title>
@@ -26,8 +26,7 @@
so <literal>seam-beans.xml</literal> is provided as an alternative. </para>
<para>Let's start with a simple example. Say we have the following class that represents a report:</para>
- <programlisting role="JAVA">
- <![CDATA[
+ <programlisting role="java"><![CDATA[
public class Report
{
String filename;
@@ -37,10 +36,9 @@
//getters and setters
}
-]]>
- </programlisting>
+]]></programlisting>
<para>And the following support classes:</para>
- <programlisting role="JAVA">
+ <programlisting role="java">
<![CDATA[
public interface Datasource
{
14 years, 3 months
Seam SVN: r13175 - in modules/security/trunk/examples/idmconsole: src/main/java/org/jboss/seam/security and 4 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-06-16 00:16:32 -0400 (Wed, 16 Jun 2010)
New Revision: 13175
Added:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java
Removed:
modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
Modified:
modules/security/trunk/examples/idmconsole/pom.xml
Log:
updated dependencies
Modified: modules/security/trunk/examples/idmconsole/pom.xml
===================================================================
--- modules/security/trunk/examples/idmconsole/pom.xml 2010-06-16 03:01:38 UTC (rev 13174)
+++ modules/security/trunk/examples/idmconsole/pom.xml 2010-06-16 04:16:32 UTC (rev 13175)
@@ -7,7 +7,14 @@
<packaging>war</packaging>
<name>idmconsole</name>
<version>3.0.0-SNAPSHOT</version>
-
+
+ <parent>
+ <groupId>org.jboss.seam.security</groupId>
+ <artifactId>seam-security-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+
<properties>
<!--
Explicitly declaring the source encoding eliminates the following message:
@@ -17,8 +24,6 @@
<!-- To set the jboss.home environment variable the Maven way, set the jboss.home property in an active profile in the Maven 2 settings.xml file -->
<jboss.home>${env.JBOSS_HOME}</jboss.home>
<jboss.domain>default</jboss.domain>
- <!-- The version of Weld extensions in use -->
- <weld.extensions.version>1.0.0-CR2</weld.extensions.version>
</properties>
<repositories>
@@ -40,19 +45,6 @@
</pluginRepository>
</pluginRepositories>
- <dependencyManagement>
- <dependencies>
- <!-- Import scope will provide versions for dependencies below. -->
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions-bom</artifactId>
- <version>${weld.extensions.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<!-- Seam Security -->
@@ -80,6 +72,13 @@
<artifactId>jsr250-api</artifactId>
<scope>provided</scope>
</dependency>
+
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
<!-- Bean Validation (JSR-303) -->
<dependency>
<groupId>javax.validation</groupId>
Deleted: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java 2010-06-16 03:01:38 UTC (rev 13174)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/HelloWorld.java 2010-06-16 04:16:32 UTC (rev 13175)
@@ -1,74 +0,0 @@
-package org.jboss.seam.security;
-
-import javax.annotation.PostConstruct;
-import javax.enterprise.inject.Model;
-import javax.validation.constraints.Digits;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Pattern;
-
-import org.hibernate.validator.constraints.Email;
-import org.hibernate.validator.constraints.NotEmpty;
-
-public @Model class HelloWorld
-{
- private final String text = "Hello World!";
-
- private String letters;
-
- private String numbers;
-
- private String email;
-
- public HelloWorld() {}
-
- @PostConstruct
- public void initialize()
- {
- System.out.println(this.getClass().getSimpleName() + " was constructed");
- }
-
- public String getText()
- {
- return text;
- }
-
- @NotNull
- @NotEmpty
- @Pattern(regexp = "[A-Za-z]*", message = "must contain only letters")
- public String getLetters()
- {
- return letters;
- }
-
- public void setLetters(String letters)
- {
- this.letters = letters;
- }
-
- @NotNull
- @NotEmpty
- @Digits(fraction = 0, integer = 2)
- public String getNumbers()
- {
- return numbers;
- }
-
- public void setNumbers(String numbers)
- {
- this.numbers = numbers;
- }
-
- @NotNull
- @NotEmpty
- @Email
- public String getEmail()
- {
- return email;
- }
-
- public void setEmail(String email)
- {
- this.email = email;
- }
-
-}
Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObject.java 2010-06-16 04:16:32 UTC (rev 13175)
@@ -0,0 +1,58 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ * This entity contains identity objects, e.g. users and groups
+ *
+ * @author Shane Bryzak
+ */
+@Entity
+public class IdentityObject implements Serializable
+{
+ private static final long serialVersionUID = -4623023512038059728L;
+
+ private Long id;
+ private String name;
+ private IdentityObjectType type;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @ManyToOne @IdentityProperty(PropertyType.TYPE)
+ public IdentityObjectType getType()
+ {
+ return type;
+ }
+
+ public void setType(IdentityObjectType type)
+ {
+ this.type = type;
+ }
+
+}
Added: modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java (rev 0)
+++ modules/security/trunk/examples/idmconsole/src/main/java/org/jboss/seam/security/examples/idmconsole/model/IdentityObjectType.java 2010-06-16 04:16:32 UTC (rev 13175)
@@ -0,0 +1,46 @@
+package org.jboss.seam.security.examples.idmconsole.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+import org.jboss.seam.security.annotations.management.IdentityProperty;
+import org.jboss.seam.security.annotations.management.PropertyType;
+
+/**
+ *
+ * @author Shane Bryzak
+ *
+ */
+@Entity
+public class IdentityObjectType implements Serializable
+{
+ private static final long serialVersionUID = -8333008038699510742L;
+
+ private Long id;
+ private String name;
+
+ @Id @GeneratedValue
+ public Long getId()
+ {
+ return id;
+ }
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ @IdentityProperty(PropertyType.NAME)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+}
Deleted: modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java
===================================================================
--- modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java 2010-06-16 03:01:38 UTC (rev 13174)
+++ modules/security/trunk/examples/idmconsole/src/test/java/org/jboss/seam/security/HelloWorldTest.java 2010-06-16 04:16:32 UTC (rev 13175)
@@ -1,12 +0,0 @@
-package org.jboss.seam.security;
-
-import org.testng.annotations.Test;
-
-public class HelloWorldTest
-{
- @Test
- public void testGetText() {
- HelloWorld fixture = new HelloWorld();
- assert "Hello World!".equals(fixture.getText());
- }
-}
14 years, 3 months