Seam SVN: r12736 - in modules/international/trunk/impl/src/test: resources/org/jboss/seam/international/test/timezone and 1 other directory.
by seam-commits@lists.jboss.org
Author: kenfinni
Date: 2010-05-16 11:22:56 -0400 (Sun, 16 May 2010)
New Revision: 12736
Added:
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml
Removed:
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml
Modified:
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java
Log:
Improve code coverage for timezone tests
Added: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java (rev 0)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideFailTest.java 2010-05-16 15:22:56 UTC (rev 12736)
@@ -0,0 +1,58 @@
+/*
+ * 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.international.test.timezone;
+
+import javax.inject.Inject;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.seam.international.test.MockLogger;
+import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
+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.joda.time.DateTimeZone;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+(a)RunWith(Arquillian.class)
+public class DefaultTimeZoneOverrideFailTest
+{
+ @Deployment
+ public static JavaArchive createTestArchive()
+ {
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/override-fail.xml", ArchivePaths.create("seam-beans.xml"));
+ }
+
+ @Inject
+ DateTimeZone timeZone;
+
+ @Test
+ public void testDefaultTimeZoneProducerDirect()
+ {
+ Assert.assertNotNull(timeZone);
+ Assert.assertNotSame("America/Tijuana", timeZone.getID());
+ Assert.assertEquals(DateTimeZone.getDefault().getID(), timeZone.getID());
+ }
+}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-05-16 14:18:38 UTC (rev 12735)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-05-16 15:22:56 UTC (rev 12736)
@@ -42,9 +42,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- JavaArchive arc = ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/seam-beans.xml", ArchivePaths.create("seam-beans.xml"));
- System.out.println(arc.toString(true));
- return arc;
+ return ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/override.xml", ArchivePaths.create("seam-beans.xml"));
}
@Inject
Added: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml (rev 0)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override-fail.xml 2010-05-16 15:22:56 UTC (rev 12736)
@@ -0,0 +1,34 @@
+<!--
+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"
+ xmlns:s="urn:java:seam:core"
+ xmlns:tz="urn:java:org.jboss.seam.international.timezone"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+ <tz:DefaultTimeZoneProducer>
+ <s:specializes/>
+ <tz:defaultTimeZoneId>America/Tijuanas</tz:defaultTimeZoneId>
+ </tz:DefaultTimeZoneProducer>
+</beans>
\ No newline at end of file
Copied: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml (from rev 12735, modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml)
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml (rev 0)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/override.xml 2010-05-16 15:22:56 UTC (rev 12736)
@@ -0,0 +1,34 @@
+<!--
+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"
+ xmlns:s="urn:java:seam:core"
+ xmlns:tz="urn:java:org.jboss.seam.international.timezone"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+ <tz:DefaultTimeZoneProducer>
+ <s:specializes/>
+ <tz:defaultTimeZoneId>America/Tijuana</tz:defaultTimeZoneId>
+ </tz:DefaultTimeZoneProducer>
+</beans>
\ No newline at end of file
Deleted: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml 2010-05-16 14:18:38 UTC (rev 12735)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml 2010-05-16 15:22:56 UTC (rev 12736)
@@ -1,35 +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.
--->
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:s="urn:java:seam:core"
- xmlns:tz="urn:java:org.jboss.seam.international.timezone"
- xsi:schemaLocation="
- http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
-
- <tz:DefaultTimeZoneProducer>
- <s:specializes/>
- <tz:defaultTimeZoneId>America/Tijuana</tz:defaultTimeZoneId>
- </tz:DefaultTimeZoneProducer>
-</beans>
\ No newline at end of file
13 years, 11 months
Seam SVN: r12735 - in modules/international/trunk: impl/src/main/java/org/jboss/seam/international/timezone and 3 other directories.
by seam-commits@lists.jboss.org
Author: kenfinni
Date: 2010-05-16 10:18:38 -0400 (Sun, 16 May 2010)
New Revision: 12735
Modified:
modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java
modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/UserTimeZoneProducer.java
modules/international/trunk/impl/src/main/resources/META-INF/beans.xml
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/AvailableTimeZonesTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java
modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java
modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml
modules/international/trunk/pom.xml
Log:
SEAMINTL-1 Updated Arquillian version to 1.0.0-SNAPSHOT to resolve xml override issue, along with tests for overriding default timezone
Modified: modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java
===================================================================
--- modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/DefaultTimeZoneProducer.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -65,7 +65,7 @@
}
catch (IllegalArgumentException e)
{
- log.warn("Default TimeZone Id of " + defaultTimeZoneId + " was not found");
+ log.warn("DefaultTimeZoneProducer: Default TimeZone Id of " + defaultTimeZoneId + " was not found");
}
}
if (null == defaultTimeZone)
Modified: modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/UserTimeZoneProducer.java
===================================================================
--- modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/UserTimeZoneProducer.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/main/java/org/jboss/seam/international/timezone/UserTimeZoneProducer.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -34,7 +34,7 @@
/**
* TimeZone for a User Session. Defaults to the TimeZone within DefaultTimeZone
- * and is altered when it receives the TimeZoneSelectedEvent.
+ * and is altered when it receives the @Changed event.
*
* @author Ken Finnigan
*/
Modified: modules/international/trunk/impl/src/main/resources/META-INF/beans.xml
===================================================================
--- modules/international/trunk/impl/src/main/resources/META-INF/beans.xml 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/main/resources/META-INF/beans.xml 2010-05-16 14:18:38 UTC (rev 12735)
@@ -0,0 +1,27 @@
+<!--
+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">
+
+</beans>
\ No newline at end of file
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/AvailableTimeZonesTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/AvailableTimeZonesTest.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/AvailableTimeZonesTest.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -31,7 +31,7 @@
import org.jboss.seam.international.timezone.AvailableTimeZones;
import org.jboss.seam.international.timezone.ForwardingTimeZone;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.joda.time.DateTimeZone;
@@ -45,7 +45,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return Archives.create("availabletimezonetest.jar", JavaArchive.class).addClasses(AvailableTimeZones.class, AvailableTimeZoneBean.class, ForwardingTimeZone.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("availabletimezonetest.jar", JavaArchive.class).addClasses(AvailableTimeZones.class, AvailableTimeZoneBean.class, ForwardingTimeZone.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/timezone/DefaultTimeZoneOverrideTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneOverrideTest.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -28,7 +28,7 @@
import org.jboss.seam.international.test.MockLogger;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.joda.time.DateTimeZone;
@@ -42,7 +42,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- JavaArchive arc = Archives.create("test.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/seam-beans.xml", ArchivePaths.create("seam-beans.xml"));
+ JavaArchive arc = ShrinkWrap.create("test.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml")).addManifestResource("org/jboss/seam/international/test/timezone/seam-beans.xml", ArchivePaths.create("seam-beans.xml"));
System.out.println(arc.toString(true));
return arc;
}
@@ -54,6 +54,6 @@
public void testDefaultTimeZoneProducerDirect()
{
Assert.assertNotNull(timeZone);
-// Assert.assertEquals("America/Tijuana", timeZone.getID());
+ Assert.assertEquals("America/Tijuana", timeZone.getID());
}
}
Modified: modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/DefaultTimeZoneTest.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -28,7 +28,7 @@
import org.jboss.seam.international.test.MockLogger;
import org.jboss.seam.international.timezone.DefaultTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.joda.time.DateTimeZone;
@@ -42,7 +42,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return Archives.create("defaulttimezonetest.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("defaulttimezonetest.jar", JavaArchive.class).addClasses(MockLogger.class, DefaultTimeZoneProducer.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/timezone/UserTimeZoneTest.java
===================================================================
--- modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/test/java/org/jboss/seam/international/test/timezone/UserTimeZoneTest.java 2010-05-16 14:18:38 UTC (rev 12735)
@@ -33,7 +33,7 @@
import org.jboss.seam.international.timezone.UserTimeZone;
import org.jboss.seam.international.timezone.UserTimeZoneProducer;
import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.jboss.shrinkwrap.impl.base.asset.ByteArrayAsset;
import org.joda.time.DateTimeZone;
@@ -47,7 +47,7 @@
@Deployment
public static JavaArchive createTestArchive()
{
- return Archives.create("usertimezonetest.jar", JavaArchive.class).addClasses(MockLogger.class, UserTimeZoneProducer.class, UserTimeZone.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
+ return ShrinkWrap.create("usertimezonetest.jar", JavaArchive.class).addClasses(MockLogger.class, UserTimeZoneProducer.class, UserTimeZone.class, DefaultTimeZoneProducer.class).addManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
@Inject
Modified: modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml
===================================================================
--- modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/impl/src/test/resources/org/jboss/seam/international/test/timezone/seam-beans.xml 2010-05-16 14:18:38 UTC (rev 12735)
@@ -1,3 +1,24 @@
+<!--
+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.
+-->
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Modified: modules/international/trunk/pom.xml
===================================================================
--- modules/international/trunk/pom.xml 2010-05-16 08:19:18 UTC (rev 12734)
+++ modules/international/trunk/pom.xml 2010-05-16 14:18:38 UTC (rev 12735)
@@ -1,216 +1,235 @@
<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>
+ 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>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-parent</artifactId>
- <version>9</version>
- </parent>
+ <parent>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-parent</artifactId>
+ <version>9</version>
+ </parent>
- <artifactId>seam-international-parent</artifactId>
- <groupId>org.jboss.seam.international</groupId>
- <version>3.0.0-SNAPSHOT</version>
+ <artifactId>seam-international-parent</artifactId>
+ <groupId>org.jboss.seam.international</groupId>
+ <version>3.0.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Seam International Module Parent POM</name>
+ <packaging>pom</packaging>
+ <name>Seam International Module Parent POM</name>
- <description>The Parent for Seam International Module</description>
- <url>http://www.seamframework.org</url>
+ <description>The Parent for Seam International Module</description>
+ <url>http://www.seamframework.org</url>
- <modules>
- <module>api</module>
- <module>impl</module>
- <!--module>docs</module-->
- <!--module>examples/??</module-->
- </modules>
+ <modules>
+ <module>api</module>
+ <module>impl</module>
+ <!--module>docs</module-->
+ <!--module>examples/??</module-->
+ </modules>
- <properties>
- <arquillian.version>1.0.0.Alpha1</arquillian.version>
- <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
- <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
- <weld.api.version>1.0-SP1</weld.api.version>
- <joda-time.version>1.6</joda-time.version>
- <pretty-time.version>1.0.6</pretty-time.version>
- <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
- <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
- </properties>
+ <properties>
+ <arquillian.version>1.0.0-SNAPSHOT</arquillian.version>
+ <seam.xml.version>3.0.0-SNAPSHOT</seam.xml.version>
+ <weld.extensions.version>1.0.0.Alpha1</weld.extensions.version>
+ <weld.api.version>1.0-SP1</weld.api.version>
+ <junit.version>4.8.1</junit.version>
+ <slf4j.version>1.5.9.RC1</slf4j.version>
+ <joda-time.version>1.6</joda-time.version>
+ <pretty-time.version>1.0.6</pretty-time.version>
+ <emma.maven.plugin.version>1.0-alpha-2</emma.maven.plugin.version>
+ <emma4it.maven.plugin.version>1.3</emma4it.maven.plugin.version>
+ </properties>
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-api-bom</artifactId>
- <version>${weld.api.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-api-bom</artifactId>
+ <version>${weld.api.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
- <dependencies>
+ <dependencies>
+ <!--
+ The reason slf4j-jdk14 is included at runtime scope is because
+ slf4j-api is compile scope and, without the JDK 1.4 bridge, JBoss AS
+ will barf. This should be included by weld-extensions to make it easy
+ to exclude if necessary.
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
- <!-- Environment Dependencies -->
- <dependency>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- <version>2.2</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.weld</groupId>
- <artifactId>weld-extensions</artifactId>
- <version>${weld.extensions.version}</version>
- </dependency>
- <dependency>
- <groupId>joda-time</groupId>
- <artifactId>joda-time</artifactId>
- <version>${joda-time.version}</version>
- </dependency>
- <dependency>
- <groupId>com.ocpsoft</groupId>
- <artifactId>ocpsoft-pretty-time</artifactId>
- <version>${pretty-time.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
- <!-- Test Dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian</groupId>
- <artifactId>arquillian-junit</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.arquillian.container</groupId>
- <artifactId>arquillian-weld-embedded</artifactId>
- <version>${arquillian.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.xml</groupId>
- <artifactId>seam-xml-bean-config</artifactId>
- <version>${seam.xml.version}</version>
- </dependency>
- </dependencies>
+ <!-- Environment Dependencies -->
+ <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>org.jboss.weld</groupId>
+ <artifactId>weld-extensions</artifactId>
+ <version>${weld.extensions.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>${joda-time.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ocpsoft</groupId>
+ <artifactId>ocpsoft-pretty-time</artifactId>
+ <version>${pretty-time.version}</version>
+ </dependency>
- <developers>
- <developer>
- <name>Lincoln Baxter, III</name>
- <email>lincolnbaxter(a)gmail.com</email>
- <url>http://ocpsoft.com</url>
- <organization>JBoss, by Red Hat</organization>
- <organizationUrl>http://jboss.org</organizationUrl>
- <timezone>EST</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- <developer>
- <name>Ken Finnigan</name>
- <timezone>GMT</timezone>
- <roles>
- <role>Project Lead</role>
- </roles>
- </developer>
- </developers>
+ <!-- Test Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian</groupId>
+ <artifactId>arquillian-junit</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.arquillian.container</groupId>
+ <artifactId>arquillian-weld-embedded</artifactId>
+ <version>${arquillian.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam.xml</groupId>
+ <artifactId>seam-xml-bean-config</artifactId>
+ <version>${seam.xml.version}</version>
+ </dependency>
+ </dependencies>
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
- </scm>
+ <developers>
+ <developer>
+ <name>Lincoln Baxter, III</name>
+ <email>lincolnbaxter(a)gmail.com</email>
+ <url>http://ocpsoft.com</url>
+ <organization>JBoss, by Red Hat</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>EST</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ <developer>
+ <name>Ken Finnigan</name>
+ <timezone>GMT</timezone>
+ <roles>
+ <role>Project Lead</role>
+ </roles>
+ </developer>
+ </developers>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.0.2</version>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/seam/modules/international/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/seam/modules/international/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/Seam/modules/international/trunk</url>
+ </scm>
- <profiles>
- <profile>
- <id>code-coverage</id>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>emma-maven-plugin</artifactId>
- <version>${emma.maven.plugin.version}</version>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>instrumentation</id>
- <phase>process-classes</phase>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <verbose>true</verbose>
- </configuration>
- </execution>
- <execution>
- <id>cleaning</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <forkMode>once</forkMode>
- <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
- </configuration>
- </plugin>
+ <profiles>
+ <profile>
+ <id>code-coverage</id>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>emma-maven-plugin</artifactId>
+ <version>${emma.maven.plugin.version}</version>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>instrumentation</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <verbose>true</verbose>
+ </configuration>
+ </execution>
+ <execution>
+ <id>cleaning</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
- <plugin>
- <groupId>org.sonatype.maven.plugin</groupId>
- <artifactId>emma4it-maven-plugin</artifactId>
- <version>${emma4it.maven.plugin.version}</version>
- <executions>
- <execution>
- <id>report</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <sourceSets>
- <sourceSet>
- <directory>${project.build.sourceDirectory}</directory>
- </sourceSet>
- </sourceSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <forkMode>once</forkMode>
+ <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.sonatype.maven.plugin</groupId>
+ <artifactId>emma4it-maven-plugin</artifactId>
+ <version>${emma4it.maven.plugin.version}</version>
+ <executions>
+ <execution>
+ <id>report</id>
+ <phase>test</phase>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <sourceSets>
+ <sourceSet>
+ <directory>${project.build.sourceDirectory}</directory>
+ </sourceSet>
+ </sourceSets>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
</project>
13 years, 11 months
Seam SVN: r12734 - in modules/security/trunk: api/src/main/java/org/jboss/seam/security and 2 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2010-05-16 04:19:18 -0400 (Sun, 16 May 2010)
New Revision: 12734
Added:
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Attribute.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialType.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Group.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/PasswordCredential.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/PicketLinkIdentityStore.java
Removed:
modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/
Modified:
modules/security/trunk/api/pom.xml
modules/security/trunk/api/src/main/java/org/jboss/seam/security/Credentials.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialsImpl.java
modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Role.java
Log:
refactored
Modified: modules/security/trunk/api/pom.xml
===================================================================
--- modules/security/trunk/api/pom.xml 2010-05-15 18:38:06 UTC (rev 12733)
+++ modules/security/trunk/api/pom.xml 2010-05-16 08:19:18 UTC (rev 12734)
@@ -21,6 +21,12 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-api</artifactId>
+ <version>1.1.2.CR01</version>
+ </dependency>
+
</dependencies>
<build>
Modified: modules/security/trunk/api/src/main/java/org/jboss/seam/security/Credentials.java
===================================================================
--- modules/security/trunk/api/src/main/java/org/jboss/seam/security/Credentials.java 2010-05-15 18:38:06 UTC (rev 12733)
+++ modules/security/trunk/api/src/main/java/org/jboss/seam/security/Credentials.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -1,5 +1,7 @@
package org.jboss.seam.security;
+import org.picketlink.idm.api.Credential;
+
/**
* Represents the credentials the current user will use to authenticate
*
@@ -12,9 +14,9 @@
void setUsername(String username);
- String getPassword();
+ Credential getCredential();
- void setPassword(String password);
+ void setCredential(Credential credential);
boolean isSet();
Copied: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Attribute.java (from rev 12710, modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/Attribute.java)
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Attribute.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Attribute.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,43 @@
+package org.jboss.seam.security;
+
+import java.util.Collection;
+
+/**
+ * Seam implementation of the PicketLink Attribute interface
+ *
+ * @author Shane Bryzak
+ */
+public class Attribute implements org.picketlink.idm.api.Attribute
+{
+
+ public void addValue(Object arg0)
+ {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String getName()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public int getSize()
+ {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public Object getValue()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Collection<?> getValues()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Copied: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialType.java (from rev 12710, modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/CredentialType.java)
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialType.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialType.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,23 @@
+package org.jboss.seam.security;
+
+/**
+ * Seam implementation of the PicketLink CredentialType interface. A
+ * CredentialType represents a type of credential, e.g. password, certificate, etc.
+ *
+ * @author Shane Bryzak
+ */
+public class CredentialType implements org.picketlink.idm.api.CredentialType
+{
+ private String name;
+
+ public CredentialType(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialsImpl.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialsImpl.java 2010-05-15 18:38:06 UTC (rev 12733)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/CredentialsImpl.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -9,8 +9,16 @@
import org.jboss.seam.security.events.CredentialsInitializedEvent;
import org.jboss.seam.security.events.CredentialsUpdatedEvent;
+import org.picketlink.idm.api.Credential;
-@Named//("org.jboss.seam.security.credentials")
+/**
+ * The default Credentials implementation. This implementation allows for a
+ * username and plain text password to be set, and uses the PasswordCredential
+ * implementation of the Credential interface for authentication.
+ *
+ * @author Shane Bryzak
+ */
+@Named
@SessionScoped
public class CredentialsImpl implements Credentials, Serializable
{
@@ -19,7 +27,7 @@
@Inject BeanManager manager;
private String username;
- private String password;
+ private Credential credential;
private boolean invalid;
@@ -48,6 +56,16 @@
return username;
}
+ public Credential getCredential()
+ {
+ return credential;
+ }
+
+ public void setCredential(Credential credential)
+ {
+ this.credential = credential;
+ }
+
public void setUsername(String username)
{
if (this.username != username && (this.username == null || !this.username.equals(username)))
@@ -60,14 +78,23 @@
public String getPassword()
{
- return password;
+ return credential != null && credential instanceof PasswordCredential ?
+ ((PasswordCredential) credential).getPassword() : null;
}
public void setPassword(String password)
{
- if (this.password != password && (this.password == null || !this.password.equals(password)))
+ if (this.credential == null)
{
- this.password = password;
+ this.credential = new PasswordCredential();
+ ((PasswordCredential) this.credential).setPassword(password);
+ }
+ else if (this.credential != null && this.credential instanceof PasswordCredential &&
+ ((PasswordCredential) this.credential).getPassword() != password &&
+ ((PasswordCredential) this.credential).getPassword() == null ||
+ !((PasswordCredential) this.credential).getPassword().equals(password))
+ {
+ ((PasswordCredential) this.credential).setPassword(password);
invalid = false;
manager.fireEvent(new CredentialsUpdatedEvent());
}
@@ -75,7 +102,8 @@
public boolean isSet()
{
- return getUsername() != null && password != null;
+ return getUsername() != null && this.credential != null &&
+ ((PasswordCredential) this.credential).getPassword() != null;
}
public boolean isInvalid()
@@ -91,7 +119,7 @@
public void clear()
{
username = null;
- password = null;
+ this.credential = null;
initialized = false;
}
Copied: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Group.java (from rev 12710, modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/Group.java)
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Group.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Group.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,33 @@
+package org.jboss.seam.security;
+
+/**
+ * Seam implementation of the PicketLink Group interface.
+ *
+ * @author Shane Bryzak
+ */
+public class Group implements org.picketlink.idm.api.Group
+{
+ private String groupType;
+ private String name;
+
+ public Group(String groupType, String name)
+ {
+ this.groupType = groupType;
+ this.name = name;
+ }
+
+ public String getGroupType()
+ {
+ return groupType;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getKey()
+ {
+ return String.format("jbpid_group_id_._._%s_._._%s", groupType, name);
+ }
+}
Copied: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/PasswordCredential.java (from rev 12710, modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/PasswordCredential.java)
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/PasswordCredential.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/PasswordCredential.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,32 @@
+package org.jboss.seam.security;
+
+import javax.enterprise.context.RequestScoped;
+
+
+/**
+ * Seam implementation of the PicketLink Credential interface
+ *
+ * @author Shane Bryzak
+ */
+@RequestScoped
+public class PasswordCredential implements org.picketlink.idm.api.Credential
+{
+ private static final CredentialType CREDENTIAL_TYPE = new CredentialType("password");
+
+ private String password;
+
+ public org.picketlink.idm.api.CredentialType getType()
+ {
+ return CREDENTIAL_TYPE;
+ }
+
+ public String getPassword()
+ {
+ return password;
+ }
+
+ public void setPassword(String password)
+ {
+ this.password = password;
+ }
+}
Modified: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Role.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Role.java 2010-05-15 18:38:06 UTC (rev 12733)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/Role.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -1,30 +1,49 @@
package org.jboss.seam.security;
+import org.picketlink.idm.api.Group;
+import org.picketlink.idm.api.RoleType;
+import org.picketlink.idm.api.User;
+
/**
- * Represents a user role. A conditional role is a special type of role that is assigned to a user
- * based on the contextual state of a permission check.
+ * Seam implementation of the PicketLink Role interface. Each role is a direct
+ * one-to-one mapping between User and Group.
*
* @author Shane Bryzak
*/
-public class Role extends SimplePrincipal
+public class Role implements org.picketlink.idm.api.Role
{
private static final long serialVersionUID = 1187276024036531700L;
private boolean conditional;
- public Role(String name)
- {
- super(name);
- }
+ private Group group;
+ private RoleType roleType;
+ private User user;
- public Role(String name, boolean conditional)
+ public Role(Group group, RoleType roleType, User user)
{
- this(name);
- this.conditional = conditional;
+ this.group = group;
+ this.roleType = roleType;
+ this.user = user;
}
-
+
public boolean isConditional()
{
return conditional;
}
+
+ public Group getGroup()
+ {
+ return group;
+ }
+
+ public RoleType getRoleType()
+ {
+ return roleType;
+ }
+
+ public User getUser()
+ {
+ return user;
+ }
}
Copied: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java (from rev 12710, modules/security/trunk/api/src/main/java/org/jboss/seam/security/api/RoleType.java)
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/RoleType.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,23 @@
+package org.jboss.seam.security;
+
+/**
+ * Seam implementation of the PicketLink RoleType interface. A RoleType is
+ * essentially the name of a particular role. E.g. manager, user, superuser, etc.
+ *
+ * @author Shane Bryzak
+ */
+public class RoleType implements org.picketlink.idm.api.RoleType
+{
+ private String name;
+
+ public RoleType(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+}
Added: modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/PicketLinkIdentityStore.java
===================================================================
--- modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/PicketLinkIdentityStore.java (rev 0)
+++ modules/security/trunk/impl/src/main/java/org/jboss/seam/security/management/PicketLinkIdentityStore.java 2010-05-16 08:19:18 UTC (rev 12734)
@@ -0,0 +1,160 @@
+package org.jboss.seam.security.management;
+
+import java.security.Principal;
+import java.util.List;
+
+public class PicketLinkIdentityStore implements IdentityStore
+{
+
+ public boolean addRoleToGroup(String role, String group)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean authenticate(String username, String password)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean changePassword(String name, String password)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean createRole(String role)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean createUser(String username, String password)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean createUser(String username, String password,
+ String firstname, String lastname)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean deleteRole(String role)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean deleteUser(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean disableUser(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean enableUser(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public List<String> getGrantedRoles(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> getImpliedRoles(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> getRoleGroups(String name)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean grantRole(String name, String role)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean isUserEnabled(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public List<String> listGrantableRoles()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<Principal> listMembers(String role)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> listRoles()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> listUsers()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List<String> listUsers(String filter)
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean removeRoleFromGroup(String role, String group)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean revokeRole(String name, String role)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean roleExists(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean supportsFeature(Feature feature)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean userExists(String name)
+ {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
13 years, 11 months
Seam SVN: r12733 - in modules/jms/trunk: impl/src/main/java/org/jboss/seam/jms and 1 other directories.
by seam-commits@lists.jboss.org
Author: jganoff
Date: 2010-05-15 14:38:06 -0400 (Sat, 15 May 2010)
New Revision: 12733
Added:
modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/annotations/
modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/annotations/Module.java
Removed:
modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/Module.java
Log:
Moved @Module to implementation package - it is designed for internal use.
Deleted: modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/Module.java
===================================================================
--- modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/Module.java 2010-05-15 18:37:34 UTC (rev 12732)
+++ modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/Module.java 2010-05-15 18:38:06 UTC (rev 12733)
@@ -1,47 +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.jms.annotations;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import javax.inject.Qualifier;
-
-/**
- * General Module Qualifier to prevent contamination of environment with
- * {@code @Producer}s of common types.
- * (e.g. {@code ConnectionFactory}, {@code InitialContext}, ...)
- *
- * @author Jordan Ganoff
- */
-@Qualifier
-@Target( { FIELD, METHOD, TYPE, PARAMETER })
-@Retention(RUNTIME)
-public @interface Module
-{
-}
Copied: modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/annotations/Module.java (from rev 12730, modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/Module.java)
===================================================================
--- modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/annotations/Module.java (rev 0)
+++ modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/annotations/Module.java 2010-05-15 18:38:06 UTC (rev 12733)
@@ -0,0 +1,47 @@
+/*
+ * 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.jms.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+/**
+ * General Module Qualifier to prevent contamination of environment with
+ * {@code @Producer}s of common types.
+ * (e.g. {@code ConnectionFactory}, {@code InitialContext}, ...)
+ *
+ * @author Jordan Ganoff
+ */
+@Qualifier
+@Target( { FIELD, METHOD, TYPE, PARAMETER })
+@Retention(RUNTIME)
+public @interface Module
+{
+}
13 years, 11 months
Seam SVN: r12732 - in modules/jms/trunk: impl/src/test/java/org/jboss/seam/jms/test and 1 other directory.
by seam-commits@lists.jboss.org
Author: jganoff
Date: 2010-05-15 14:37:34 -0400 (Sat, 15 May 2010)
New Revision: 12732
Modified:
modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsDestination.java
modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsSession.java
modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyQueue.java
modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyTopic.java
Log:
Removed @Inherited from qualifiers as per CDI Spec recommendations.
Modified: modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsDestination.java
===================================================================
--- modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsDestination.java 2010-05-15 18:34:04 UTC (rev 12731)
+++ modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsDestination.java 2010-05-15 18:37:34 UTC (rev 12732)
@@ -23,11 +23,11 @@
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@@ -41,8 +41,7 @@
*/
@Qualifier
@Documented
-@Inherited
-@Target( { FIELD, METHOD, TYPE })
+@Target( { FIELD, METHOD, TYPE, PARAMETER })
@Retention(RUNTIME)
public @interface JmsDestination
{
Modified: modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsSession.java
===================================================================
--- modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsSession.java 2010-05-15 18:34:04 UTC (rev 12731)
+++ modules/jms/trunk/api/src/main/java/org/jboss/seam/jms/annotations/JmsSession.java 2010-05-15 18:37:34 UTC (rev 12732)
@@ -24,10 +24,10 @@
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
@@ -41,8 +41,7 @@
*/
@Qualifier
@Documented
-@Inherited
-@Target( { FIELD, METHOD, TYPE })
+@Target( { FIELD, METHOD, TYPE, PARAMETER })
@Retention(RUNTIME)
public @interface JmsSession
{
Modified: modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyQueue.java
===================================================================
--- modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyQueue.java 2010-05-15 18:34:04 UTC (rev 12731)
+++ modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyQueue.java 2010-05-15 18:37:34 UTC (rev 12732)
@@ -36,7 +36,6 @@
@Qualifier
@Retention(RUNTIME)
-@Target( { FIELD, METHOD, TYPE, PARAMETER })
@JmsDestination(jndiName = "jms/Q")
public @interface MyQueue
{
Modified: modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyTopic.java
===================================================================
--- modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyTopic.java 2010-05-15 18:34:04 UTC (rev 12731)
+++ modules/jms/trunk/impl/src/test/java/org/jboss/seam/jms/test/MyTopic.java 2010-05-15 18:37:34 UTC (rev 12732)
@@ -36,7 +36,6 @@
@Qualifier
@Retention(RUNTIME)
-@Target( { FIELD, METHOD, TYPE, PARAMETER })
@JmsDestination(jndiName = "jms/T")
public @interface MyTopic
{
13 years, 11 months
Seam SVN: r12731 - modules/jms/trunk.
by seam-commits@lists.jboss.org
Author: jganoff
Date: 2010-05-15 14:34:04 -0400 (Sat, 15 May 2010)
New Revision: 12731
Modified:
modules/jms/trunk/pom.xml
Log:
Added Dan Allen as a developer to POM. Updated URL for Jordan.
Modified: modules/jms/trunk/pom.xml
===================================================================
--- modules/jms/trunk/pom.xml 2010-05-14 21:51:01 UTC (rev 12730)
+++ modules/jms/trunk/pom.xml 2010-05-15 18:34:04 UTC (rev 12731)
@@ -197,7 +197,18 @@
<roles>
<role>Project Lead</role>
</roles>
+ <url>http://community.jboss.org/people/jganoff</url>
</developer>
+ <developer>
+ <name>Dan Allen</name>
+ <organization>JBoss, by Red Hat</organization>
+ <organizationUrl>http://jboss.org</organizationUrl>
+ <timezone>EST</timezone>
+ <roles>
+ <role>Advisor</role>
+ <role>Contributor</role>
+ </roles>
+ </developer>
</developers>
<dependencyManagement>
13 years, 11 months
Seam SVN: r12730 - modules/jms/trunk/dist.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-05-14 17:51:01 -0400 (Fri, 14 May 2010)
New Revision: 12730
Modified:
modules/jms/trunk/dist/assembly.xml
modules/jms/trunk/dist/pom.xml
Log:
rename distribution
Modified: modules/jms/trunk/dist/assembly.xml
===================================================================
--- modules/jms/trunk/dist/assembly.xml 2010-05-14 21:50:41 UTC (rev 12729)
+++ modules/jms/trunk/dist/assembly.xml 2010-05-14 21:51:01 UTC (rev 12730)
@@ -2,7 +2,7 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
- <id>distribution</id>
+ <!--<id>distribution</id>-->
<formats>
<format>zip</format>
@@ -62,4 +62,4 @@
</includes>
</dependencySet>
</dependencySets>
-</assembly>
\ No newline at end of file
+</assembly>
Modified: modules/jms/trunk/dist/pom.xml
===================================================================
--- modules/jms/trunk/dist/pom.xml 2010-05-14 21:50:41 UTC (rev 12729)
+++ modules/jms/trunk/dist/pom.xml 2010-05-14 21:51:01 UTC (rev 12730)
@@ -9,7 +9,7 @@
<relativePath>../pom.xml</relativePath>
</parent>
- <artifactId>seam-jms-dist</artifactId>
+ <artifactId>seam-jms-distribution</artifactId>
<name>Seam JMS Distribution</name>
<description>Builds a proper Seam JMS release distribution</description>
<packaging>pom</packaging>
13 years, 12 months
Seam SVN: r12729 - modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/impl/inject.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2010-05-14 17:50:41 -0400 (Fri, 14 May 2010)
New Revision: 12729
Modified:
modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/impl/inject/ConnectionProducer.java
Log:
add docs
Modified: modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/impl/inject/ConnectionProducer.java
===================================================================
--- modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/impl/inject/ConnectionProducer.java 2010-05-14 20:29:22 UTC (rev 12728)
+++ modules/jms/trunk/impl/src/main/java/org/jboss/seam/jms/impl/inject/ConnectionProducer.java 2010-05-14 21:50:41 UTC (rev 12729)
@@ -31,6 +31,16 @@
import org.jboss.seam.jms.annotations.Module;
+/**
+ * <p>Provides a producer of an unqualified (i.e., @Default) application-scoped JMS {@link Connection} object.</p>
+ *
+ * <p>According to the documentation, a {@link Connection} is a relatively heavyweight object because its creation
+ * involves setting up authentication and communication. Most clients will do all their messaging with a single
+ * connection. Only more advanced applications may use several connections, though it's considered atypical.
+ * Therefore, use of the application-scope is justified.</p>
+ *
+ * @author Jordan Ganoff
+ */
public class ConnectionProducer
{
@Produces
13 years, 12 months
Seam SVN: r12728 - in sandbox/encore: src and 10 other directories.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-14 16:29:22 -0400 (Fri, 14 May 2010)
New Revision: 12728
Added:
sandbox/encore/pom.xml
sandbox/encore/src/
sandbox/encore/src/main/
sandbox/encore/src/main/java/
sandbox/encore/src/main/java/org/
sandbox/encore/src/main/java/org/jboss/
sandbox/encore/src/main/java/org/jboss/encore/
sandbox/encore/src/main/java/org/jboss/encore/model/
sandbox/encore/src/main/java/org/jboss/encore/model/Mutable.java
sandbox/encore/src/main/java/org/jboss/encore/model/Project.java
sandbox/encore/src/main/java/org/jboss/encore/model/Stateful.java
sandbox/encore/src/main/java/org/jboss/seam/
sandbox/encore/src/main/java/org/jboss/seam/encore/
sandbox/encore/src/main/java/org/jboss/seam/encore/mojo/
sandbox/encore/src/main/java/org/jboss/seam/encore/mojo/Execute.java
sandbox/encore/src/main/resources/
sandbox/encore/src/test/
sandbox/encore/src/test/java/
sandbox/encore/src/test/resources/
Modified:
sandbox/encore/
Log:
Initial import.
Property changes on: sandbox/encore
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.classpath
.project
Added: sandbox/encore/pom.xml
===================================================================
--- sandbox/encore/pom.xml (rev 0)
+++ sandbox/encore/pom.xml 2010-05-14 20:29:22 UTC (rev 12728)
@@ -0,0 +1,36 @@
+<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>
+ <groupId>org.jboss.seam.encore</groupId>
+ <artifactId>encore</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>maven-plugin</packaging>
+ <name>Seam Encore</name>
+ <description>Simplified project bootstrapping and incremental enhancement framework </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ <version>1.0.0-alpha-9</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>3.0-beta-1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: sandbox/encore/src/main/java/org/jboss/encore/model/Mutable.java
===================================================================
--- sandbox/encore/src/main/java/org/jboss/encore/model/Mutable.java (rev 0)
+++ sandbox/encore/src/main/java/org/jboss/encore/model/Mutable.java 2010-05-14 20:29:22 UTC (rev 12728)
@@ -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.
+ */
+package org.jboss.encore.model;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Mutable
+{
+
+}
Added: sandbox/encore/src/main/java/org/jboss/encore/model/Project.java
===================================================================
--- sandbox/encore/src/main/java/org/jboss/encore/model/Project.java (rev 0)
+++ sandbox/encore/src/main/java/org/jboss/encore/model/Project.java 2010-05-14 20:29:22 UTC (rev 12728)
@@ -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.encore.model;
+
+/**
+ * The root node of the Project Object Graph (POG)
+ *
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Project extends Mutable, Stateful
+{
+
+}
Added: sandbox/encore/src/main/java/org/jboss/encore/model/Stateful.java
===================================================================
--- sandbox/encore/src/main/java/org/jboss/encore/model/Stateful.java (rev 0)
+++ sandbox/encore/src/main/java/org/jboss/encore/model/Stateful.java 2010-05-14 20:29:22 UTC (rev 12728)
@@ -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.
+ */
+package org.jboss.encore.model;
+
+/**
+ * @author <a href="mailto:lincolnbaxter@gmail.com">Lincoln Baxter, III</a>
+ *
+ */
+public interface Stateful
+{
+
+}
Added: sandbox/encore/src/main/java/org/jboss/seam/encore/mojo/Execute.java
===================================================================
--- sandbox/encore/src/main/java/org/jboss/seam/encore/mojo/Execute.java (rev 0)
+++ sandbox/encore/src/main/java/org/jboss/seam/encore/mojo/Execute.java 2010-05-14 20:29:22 UTC (rev 12728)
@@ -0,0 +1,75 @@
+package org.jboss.seam.encore.mojo;
+
+import java.io.File;
+
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.jboss.encore.model.Project;
+
+/**
+ * @goal execute
+ *
+ * @requiresProject false
+ *
+ * We can get the Mojo to run outside of a directory with a POM
+ */
+public class Execute extends AbstractMojo
+{
+
+ /**
+ * This is where build results go.
+ *
+ * @parameter expression="${project.build.directory}"
+ * @required
+ * @readonly
+ */
+ private File directory;
+
+ /**
+ * This is where compiled classes go.
+ *
+ * @parameter expression="${project.build.outputDirectory}"
+ * @required
+ * @readonly
+ */
+ private File outputDirectory;
+
+ /**
+ * This is where compiled test classes go.
+ *
+ * @parameter expression="${project.build.testOutputDirectory}"
+ * @required
+ * @readonly
+ */
+ private File testOutputDirectory;
+
+ /**
+ * This is where the site plugin generates its pages.
+ *
+ * @parameter expression="${project.reporting.outputDirectory}"
+ * @required
+ * @readonly
+ */
+ private File reportDirectory;
+
+ /**
+ * Do the work
+ */
+ public void execute() throws MojoExecutionException
+ {
+ /*
+ * Get parameters
+ */
+
+ /*
+ * Get Project Object Graph
+ */
+ Project project;
+
+ /*
+ * Invoke specified plugin, providing graph
+ */
+ getLog().info("Hello, world.");
+ }
+}
\ No newline at end of file
13 years, 12 months
Seam SVN: r12727 - sandbox.
by seam-commits@lists.jboss.org
Author: lincolnthree
Date: 2010-05-14 16:27:48 -0400 (Fri, 14 May 2010)
New Revision: 12727
Added:
sandbox/encore/
Log:
Initial import. Sandboxing.
13 years, 12 months