Author: chris.laprun(a)jboss.com
Date: 2011-07-12 16:45:32 -0400 (Tue, 12 Jul 2011)
New Revision: 6864
Modified:
portal/branches/api/component/api-impl/pom.xml
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/PortalImpl.java
portal/branches/api/packaging/jboss-as5/pkg/pom.xml
portal/branches/api/pom.xml
Log:
- Changed API implementation artifact id.
- Adapted for API changes: now properly implement GateIn.portalId.
- Updated POM files to use the new API artifact ids and versions.
Modified: portal/branches/api/component/api-impl/pom.xml
===================================================================
--- portal/branches/api/component/api-impl/pom.xml 2011-07-12 15:18:10 UTC (rev 6863)
+++ portal/branches/api/component/api-impl/pom.xml 2011-07-12 20:45:32 UTC (rev 6864)
@@ -9,19 +9,14 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api-impl</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>java-api-impl</artifactId>
<dependencies>
<dependency>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
</dependency>
- <!--<dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>1.1</version>
- </dependency>-->
<dependency>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>exo.kernel.container</artifactId>
@@ -37,4 +32,8 @@
</dependency>
</dependencies>
+ <build>
+ <finalName>gatein-java-api-impl-${project.version}</finalName>
+ </build>
+
</project>
\ No newline at end of file
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-07-12
15:18:10 UTC (rev 6863)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/GateInImpl.java 2011-07-12
20:45:32 UTC (rev 6864)
@@ -41,6 +41,7 @@
import org.gatein.api.content.Content;
import org.gatein.api.content.Gadget;
import org.gatein.api.content.ManagedContent;
+import org.gatein.api.id.Context;
import org.gatein.api.id.Id;
import org.gatein.api.id.Identifiable;
import org.gatein.api.portal.Portal;
@@ -51,11 +52,14 @@
import java.net.URI;
import java.util.Iterator;
import java.util.List;
+import java.util.regex.Pattern;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a> */
public class GateInImpl implements GateIn, Startable
{
private static final Query<PortalData> PORTALS = new
Query<PortalData>(SiteType.PORTAL.getName(), null, PortalData.class);
+ public static final Context CONTEXT =
Context.builder().requiredComponent("owner", Site.class,
Pattern.compile("\\w+"))
+ .requiredComponent("name", Portal.class,
Pattern.compile("\\w+")).withDefaultSeparator("::").build();
private ExoContainer container;
private ModelDataStorage dataStorage;
private NavigationService navigationService;
@@ -100,7 +104,7 @@
public Portal getDefaultPortal()
{
- return getPortal(portalId("classic")); // todo: check
+ return getPortal(portalId(Site.Type.PORTAL, "classic")); // todo: check
}
public IterableResult<Site> getSites()
@@ -178,9 +182,9 @@
return null; //To change body of implemented methods use File | Settings | File
Templates.
}
- public Id<Portal> portalId(String portalName)
+ public Id<Portal> portalId(Site.Type siteType, String portalName)
{
- return null; //To change body of implemented methods use File | Settings | File
Templates.
+ return Id.create(CONTEXT, Portal.class, siteType.getName(), portalName);
}
public void start()
Modified:
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/PortalImpl.java
===================================================================
---
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/PortalImpl.java 2011-07-12
15:18:10 UTC (rev 6863)
+++
portal/branches/api/component/api-impl/src/main/java/org/gatein/portal/api/impl/PortalImpl.java 2011-07-12
20:45:32 UTC (rev 6864)
@@ -31,24 +31,18 @@
import org.exoplatform.portal.pom.data.PortalData;
import org.gatein.api.Container;
import org.gatein.api.content.ContentRegistry;
-import org.gatein.api.id.Context;
-import org.gatein.api.id.Id;
import org.gatein.api.portal.Navigation;
import org.gatein.api.portal.Page;
import org.gatein.api.portal.Portal;
import org.gatein.api.portal.Site;
-import java.util.regex.Pattern;
-
/** @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a> */
public class PortalImpl extends IdentifiableImpl implements Portal
{
- public static final Context CONTEXT =
Context.builder().requiredComponent("owner", Site.class,
Pattern.compile("\\w+"))
- .requiredComponent("name", Portal.class,
Pattern.compile("\\w+")).withDefaultSeparator("::").build();
public PortalImpl(PortalData portal, GateInImpl gateIn)
{
- super(Id.create(CONTEXT, Portal.class, portal.getKey().getType(),
portal.getKey().getId()), portal.getName(), gateIn);
+ super(gateIn.portalId(Site.Type.forName(portal.getKey().getType()),
portal.getKey().getId()), portal.getName(), gateIn);
}
public ContentRegistry getContentRegistry()
Modified: portal/branches/api/packaging/jboss-as5/pkg/pom.xml
===================================================================
--- portal/branches/api/packaging/jboss-as5/pkg/pom.xml 2011-07-12 15:18:10 UTC (rev
6863)
+++ portal/branches/api/packaging/jboss-as5/pkg/pom.xml 2011-07-12 20:45:32 UTC (rev
6864)
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
-<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">
+<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>
@@ -18,7 +19,7 @@
<!-- The following two properties should not be changed! -->
<jbossas.version>5.1.0.GA</jbossas.version>
<jbossas.dist.version>5.1.0.GA-jdk6</jbossas.dist.version>
-
+
<servers.dir>${project.basedir}/../../servers</servers.dir>
<jbossas.path>${servers.dir}</jbossas.path>
<jbossas.name>jboss-${jbossas.version}</jbossas.name>
@@ -296,12 +297,12 @@
<!-- GateIn API -->
<dependency>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>java-api-impl</artifactId>
</dependency>
<dependency>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api-impl</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
</dependency>
<!-- Gatein common -->
@@ -500,9 +501,9 @@
<!-- Provided -->
<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
@@ -630,8 +631,8 @@
<version>2.0.235</version>
</dependency>
<dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
@@ -798,19 +799,19 @@
<version>1.2.3</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-core</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-core</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>org.apache.tika</groupId>
- <artifactId>tika-parsers</artifactId>
- <version>0.7</version>
+ <groupId>org.apache.tika</groupId>
+ <artifactId>tika-parsers</artifactId>
+ <version>0.7</version>
</dependency>
<dependency>
- <groupId>com.google.javascript</groupId>
- <artifactId>closure-compiler</artifactId>
- <version>r706</version>
+ <groupId>com.google.javascript</groupId>
+ <artifactId>closure-compiler</artifactId>
+ <version>r706</version>
</dependency>
<dependency>
@@ -927,17 +928,17 @@
<requireProperty>
<property>jbossas.path</property>
<message>"
-You must define the property 'jbossas.path'
-to give the path to the directory where you store your applications servers.
-"
+ You must define the property 'jbossas.path'
+ to give the path to the directory where you store your
applications servers.
+ "
</message>
</requireProperty>
<requireProperty>
<property>jbossas.name</property>
<message>"
-You must define the property 'jbossas.name'
-to give the name of the directory where JBoss AS is stored.
-"
+ You must define the property 'jbossas.name'
+ to give the name of the directory where JBoss AS is
stored.
+ "
</message>
</requireProperty>
<requireFilesExist>
@@ -945,13 +946,14 @@
<file>${jbossas.path}/${jbossas.name}/</file>
</files>
<message>"
-The following JBoss AS directory doesn't exist :
+ The following JBoss AS directory doesn't exist :
${jbossas.path}/${jbossas.name}
-Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to
the correct location of servers directory
-and/or -Djbossas.name=NAME to point to the correct directory under the servers
directory.
-You can also use -Pdownload to automatically provide JBoss AS instance.
-"
+ Make JBoss AS instance available at that location, or use
-Dservers.dir=PATH to point to
+ the correct location of servers directory
+ and/or -Djbossas.name=NAME to point to the correct
directory under the servers directory.
+ You can also use -Pdownload to automatically provide JBoss
AS instance.
+ "
</message>
</requireFilesExist>
</rules>
@@ -987,9 +989,9 @@
<configuration>
<target>
<ant antfile="${project.basedir}/package.xml"
inheritRefs="true">
- <target name="package" />
- <property name="maven.project.basedir"
value="${project.basedir}" />
- <property name="maven.project.build.directory"
value="${project.build.directory}" />
+ <target name="package"/>
+ <property name="maven.project.basedir"
value="${project.basedir}"/>
+ <property name="maven.project.build.directory"
value="${project.build.directory}"/>
</ant>
</target>
</configuration>
@@ -998,8 +1000,8 @@
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>pkg-jbossas5</id>
@@ -1026,9 +1028,9 @@
<requireProperty>
<property>exo.projects.directory.dependencies</property>
<message>"
-You must define the property 'exo.projects.directory.dependencies'
-to specify the path to the directory where you store your application servers.
-"
+ You must define the property
'exo.projects.directory.dependencies'
+ to specify the path to the directory where you store
your application servers.
+ "
</message>
</requireProperty>
</rules>
@@ -1045,9 +1047,9 @@
<requireProperty>
<property>exo.projects.app.jboss5.version</property>
<message>"
-You must define the property 'exo.projects.app.jboss5.version'
-to specify the name of the directory where JBoss AS is stored.
-"
+ You must define the property
'exo.projects.app.jboss5.version'
+ to specify the name of the directory where JBoss AS
is stored.
+ "
</message>
</requireProperty>
</rules>
@@ -1068,13 +1070,15 @@
</file>
</files>
<message>"
-The following JBoss AS directory doesn't exist :
+ The following JBoss AS directory doesn't exist :
${exo.projects.directory.dependencies}/${exo.projects.app.jboss5.version}
-Make JBoss AS instance available at that location, or use
-Dexo.projects.directory.dependencies=PATH to point to the correct location
-of servers directory and/or -Dexo.projects.app.jboss5.version=NAME to point to the
correct directory under the servers directory.
-You can also use -Pdownload to automatically provide JBoss AS instance.
-"
+ Make JBoss AS instance available at that location, or
use
+ -Dexo.projects.directory.dependencies=PATH to point
to the correct location
+ of servers directory and/or
-Dexo.projects.app.jboss5.version=NAME to point to the
+ correct directory under the servers directory.
+ You can also use -Pdownload to automatically provide
JBoss AS instance.
+ "
</message>
</requireFilesExist>
</rules>
@@ -1084,10 +1088,10 @@
<execution>
<id>check-jboss-environment-ready</id>
<phase>none</phase>
- </execution>
+ </execution>
</executions>
</plugin>
-
+
</plugins>
</build>
</profile>
@@ -1127,35 +1131,36 @@
</goals>
<configuration>
<target>
- <available property="jbossas.dir.exists"
type="dir" file="${jbossas.dir}" />
+ <available property="jbossas.dir.exists"
type="dir" file="${jbossas.dir}"/>
<fail if="jbossas.dir.exists">"
-Destination JBossAS directory exists already:
+ Destination JBossAS directory exists already:
${jbossas.dir}
-Either rename it, delete it, or deactivate -Pdownload profile.
-"
+ Either rename it, delete it, or deactivate -Pdownload
profile.
+ "
</fail>
- <property name="jbossas.zip"
value="${jbossas.path}/jboss-${jbossas.dist.version}.zip" />
+ <property name="jbossas.zip"
value="${jbossas.path}/jboss-${jbossas.dist.version}.zip"/>
<!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}" />
+ <mkdir dir="${jbossas.path}"/>
<!-- Download JBossAS unless already downloaded -->
<ant
antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss" />
- <property name="url"
value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbo...
/>
- <property name="dest"
value="${jbossas.zip}" />
+ <target name="download-jboss"/>
+ <property name="url"
+
value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbo...
+ <property name="dest"
value="${jbossas.zip}"/>
</ant>
<!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}"
dest="${jbossas.path}" overwrite="false" />
+ <unzip src="${jbossas.zip}"
dest="${jbossas.path}" overwrite="false"/>
<ant antfile="${project.basedir}/package.xml"
inheritRefs="true">
- <target name="package" />
- <property name="maven.project.basedir"
value="${project.basedir}" />
- <property
name="maven.project.build.directory"
value="${project.build.directory}" />
+ <target name="package"/>
+ <property name="maven.project.basedir"
value="${project.basedir}"/>
+ <property
name="maven.project.build.directory"
value="${project.build.directory}"/>
</ant>
</target>
</configuration>
@@ -1165,7 +1170,7 @@
</plugins>
</build>
</profile>
-
+
<profile>
<id>bundle</id>
<build>
@@ -1183,8 +1188,10 @@
</goals>
<configuration>
<target>
- <zip
destfile="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
basedir="${jbossas.target.dir}" />
- <attachartifact
file="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
classifier="bundle" type="zip" />
+ <zip
destfile="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
+ basedir="${jbossas.target.dir}"/>
+ <attachartifact
file="${project.build.directory}/GateIn-${project.version}-jbossas.zip"
+ classifier="bundle"
type="zip"/>
</target>
</configuration>
</execution>
@@ -1193,5 +1200,5 @@
</plugins>
</build>
</profile>
- </profiles>
+ </profiles>
</project>
Modified: portal/branches/api/pom.xml
===================================================================
--- portal/branches/api/pom.xml 2011-07-12 15:18:10 UTC (rev 6863)
+++ portal/branches/api/pom.xml 2011-07-12 20:45:32 UTC (rev 6864)
@@ -50,7 +50,7 @@
<org.picketlink.idm>1.3.0.Alpha03</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-Beta04</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
- <org.gatein.api.version>1.0.0-GA-SNAPSHOT</org.gatein.api.version>
+ <org.gatein.api.version>1.0.0-Beta01-SNAPSHOT</org.gatein.api.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
<commons-pool.version>1.5.5</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
@@ -381,13 +381,13 @@
<!-- API -->
<dependency>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>gatein-java-api</artifactId>
<version>${org.gatein.api.version}</version>
</dependency>
<dependency>
- <groupId>org.gatein.portal</groupId>
- <artifactId>gatein-api-impl</artifactId>
+ <groupId>org.gatein.api</groupId>
+ <artifactId>java-api-impl</artifactId>
<version>${project.version}</version>
</dependency>