JBoss Portal SVN: r13099 - in modules/deployer/trunk: deployer/src/main and 2 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 17:38:00 -0400 (Fri, 27 Mar 2009)
New Revision: 13099
Removed:
modules/deployer/trunk/deployer/src/main/resources/
Modified:
modules/deployer/trunk/.classpath
modules/deployer/trunk/pom.xml
modules/deployer/trunk/portal/
modules/deployer/trunk/portlet/
Log:
Minor cleanup.
Modified: modules/deployer/trunk/.classpath
===================================================================
--- modules/deployer/trunk/.classpath 2009-03-27 21:28:24 UTC (rev 13098)
+++ modules/deployer/trunk/.classpath 2009-03-27 21:38:00 UTC (rev 13099)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" output="target-eclipse/classes" path="deployer/src/main/java"/>
- <classpathentry excluding="**" kind="src" output="deployer/src/main/resources" path="deployer/src/main/resources"/>
+ <classpathentry kind="src" path="theme/src/main/java"/>
+ <classpathentry kind="src" path="portal/src/main/java"/>
+ <classpathentry kind="src" path="portlet/src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target-eclipse/classes"/>
Modified: modules/deployer/trunk/pom.xml
===================================================================
--- modules/deployer/trunk/pom.xml 2009-03-27 21:28:24 UTC (rev 13098)
+++ modules/deployer/trunk/pom.xml 2009-03-27 21:38:00 UTC (rev 13099)
@@ -24,6 +24,9 @@
<modules>
<module>build</module>
+ <module>portal</module>
+ <module>portlet</module>
+ <module>theme</module>
<module>deployer</module>
</modules>
Property changes on: modules/deployer/trunk/portal
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: modules/deployer/trunk/portlet
___________________________________________________________________
Name: svn:ignore
+ target
15 years, 2 months
JBoss Portal SVN: r13098 - modules/deployer/trunk/deployer/src/main/resources.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 17:28:24 -0400 (Fri, 27 Mar 2009)
New Revision: 13098
Removed:
modules/deployer/trunk/deployer/src/main/resources/base-aop.xml
modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml
Log:
Remove old references to aop usage in the deployer.
Deleted: modules/deployer/trunk/deployer/src/main/resources/base-aop.xml
===================================================================
--- modules/deployer/trunk/deployer/src/main/resources/base-aop.xml 2009-03-27 21:12:45 UTC (rev 13097)
+++ modules/deployer/trunk/deployer/src/main/resources/base-aop.xml 2009-03-27 21:28:24 UTC (rev 13098)
@@ -1,161 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
- ~ contributors as indicated 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<!DOCTYPE aop PUBLIC
- "-//JBoss//DTD JBOSS AOP 1.0//EN"
- "http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd">
-
-<aop xmlns="urn:jboss:aop-beans:1.0">
- <!-- custom configuration for AOP Security -->
- <metadata-loader tag="security" class="org.jboss.aspects.security.SecurityClassMetaDataLoader"/>
-
- <stack name="J2EESecurityStack">
- <interceptor factory="org.jboss.aspects.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/>
- <interceptor factory="org.jboss.aspects.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
- <interceptor factory="org.jboss.aspects.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
- </stack>
-
- <bind pointcut="all(@security)">
- <stack-ref name="J2EESecurityStack"/>
- </bind>
-
- <bind pointcut="all((a)org.jboss.aspects.security.Permissions)">
- <stack-ref name="J2EESecurityStack"/>
- </bind>
-
- <bind pointcut="all((a)org.jboss.aspects.security.Unchecked)">
- <stack-ref name="J2EESecurityStack"/>
- </bind>
-
- <bind pointcut="all((a)org.jboss.aspects.security.Exclude)">
- <stack-ref name="J2EESecurityStack"/>
- </bind>
-
- <introduction expr="class((a)org.jboss.aspects.jmx.MBean)">
- <mixin>
- <interfaces>javax.management.DynamicMBean</interfaces>
- <class>org.jboss.aspects.jmx.JmxIntrospectingMixin</class>
- <construction>new org.jboss.aspects.jmx.JmxIntrospectingMixin(this)</construction>
- </mixin>
- </introduction>
-
- <!-- asynchronous aspect -->
- <aspect class="org.jboss.aspects.asynch.AsynchAspect" scope="PER_INSTANCE">
- <advisor-attribute name="Advisor"/>
- </aspect>
-
- <bind pointcut="execution(!static * *->@org.jboss.aspects.asynch.Asynchronous(..))">
- <advice name="execute" aspect="org.jboss.aspects.asynch.AsynchAspect"/>
- </bind>
-
- <introduction expr="has(!static * *->@org.jboss.aspects.asynch.Asynchronous(..))">
- <mixin>
- <interfaces>org.jboss.aspects.asynch.AsynchProvider,org.jboss.aspects.asynch.FutureHolder</interfaces>
- <class>org.jboss.aspects.asynch.AsynchMixin</class>
- </mixin>
- </introduction>
-
- <!-- old asynch aspect from Claude -->
-
- <aspect class="org.jboss.aspects.asynchronous.aspects.jboss.AsynchronousAspect" scope="PER_VM"/>
-
- <bind pointcut="execution(* *->@org.jboss.aspects.asynchronous.aspects.jboss.Asynchronous(..))">
- <advice name="execute" aspect="org.jboss.aspects.asynchronous.aspects.jboss.AsynchronousAspect"/>
- </bind>
-
- <introduction
- expr="has(* *->@org.jboss.aspects.asynchronous.aspects.jboss.Asynchronous(..)) OR class((a)org.jboss.aspects.asynchronous.aspects.jboss.Asynchronous)">
-
- <mixin>
- <interfaces>
- org.jboss.aspects.asynchronous.aspects.AsynchronousFacade
- </interfaces>
- <class>org.jboss.aspects.asynchronous.aspects.AsynchronousFacadeImpl</class>
- <construction>new org.jboss.aspects.asynchronous.aspects.AsynchronousFacadeImpl()</construction>
- </mixin>
- </introduction>
-
- <!-- TRANSACTIONS -->
- <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/>
- <interceptor factory="org.jboss.aspects.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
-
- <bind pointcut="all(@transaction)">
- <interceptor-ref name="org.jboss.aspects.tx.TxInterceptorFactory"/>
- </bind>
-
- <interceptor name="class-txsynchronized" factory="org.jboss.aspects.txlock.TxLockInterceptorFactory"
- scope="PER_CLASS"/>
- <interceptor name="instance-txsynchronized" factory="org.jboss.aspects.txlock.TxLockInterceptorFactory"
- scope="PER_INSTANCE"/>
-
- <bind pointcut="execution(static * *->@TxSynchronized(..)) OR execution(*->@TxSynchronized(..))">
- <interceptor-ref name="class-txsynchronized"/>
- </bind>
-
- <bind pointcut="execution(!static * *->@TxSynchronized(..))">
- <interceptor-ref name="instance-txsynchronized"/>
- </bind>
-
- <bind pointcut="all((a)org.jboss.aspects.tx.Tx)">
- <interceptor-ref name="org.jboss.aspects.tx.TxInterceptorFactory"/>
- </bind>
-
- <bind
- pointcut="execution(static * *->@org.jboss.aspects.txlock.TxSynchronized(..)) OR execution(*->@org.jboss.aspects.txlock.TxSynchronized(..))">
- <interceptor-ref name="class-txsynchronized"/>
- </bind>
-
- <bind pointcut="execution(!static * *->@org.jboss.aspects.txlock.TxSynchronized(..))">
- <interceptor-ref name="instance-txsynchronized"/>
- </bind>
-
- <!-- injection -->
- <aspect class="org.jboss.aspects.tx.TransactionInjector"/>
- <aspect class="org.jboss.aspects.tx.TransactionManagerInjector"/>
-
- <bind pointcut="field(javax.transaction.Transaction *->@org.jboss.aspects.Current)">
- <advice name="access" aspect="org.jboss.aspects.tx.TransactionInjector"/>
- </bind>
-
- <bind pointcut="field(javax.transaction.TransactionManager *->@org.jboss.aspects.Injected)">
- <advice name="access" aspect="org.jboss.aspects.tx.TransactionManagerInjector"/>
- </bind>
-
- <bind
- pointcut="execution(*->new(..)) AND hasfield(javax.transaction.TransactionManager *->@org.jboss.aspects.Injected)">
- <advice name="allocation" aspect="org.jboss.aspects.tx.TransactionManagerInjector"/>
- </bind>
-
- <!-- special types -->
- <aspect class="org.jboss.aspects.ThreadbasedAspect" scope="PER_JOINPOINT"/>
- <bind pointcut="field(* *->@org.jboss.aspects.Threadbased)">
- <advice name="access" aspect="org.jboss.aspects.ThreadbasedAspect"/>
- </bind>
-
- <aspect class="org.jboss.aspects.tx.TransactionLocalAspect" scope="PER_JOINPOINT"/>
- <bind pointcut="field(* *->@org.jboss.aspects.tx.TxLocal)">
- <advice name="access" aspect="org.jboss.aspects.tx.TransactionLocalAspect"/>
- </bind>
-
-</aop>
Deleted: modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml
===================================================================
--- modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml 2009-03-27 21:12:45 UTC (rev 13097)
+++ modules/deployer/trunk/deployer/src/main/resources/deployment-aop.xml 2009-03-27 21:28:24 UTC (rev 13098)
@@ -1,12 +0,0 @@
-<aop xmlns="urn:jboss:aop-beans:1.0">
- <metadata tag="transaction" class="org.jboss.portal.deployer.portlet.InstanceDeployerImpl">
- <method name="deployInstances">
- <trans-attribute>RequiresNew</trans-attribute>
- </method>
- </metadata>
- <metadata tag="transaction" class="org.jboss.portal.deployer.container.ObjectDeployer">
- <method name="deployObjects">
- <trans-attribute>RequiresNew</trans-attribute>
- </method>
- </metadata>
-</aop>
15 years, 2 months
JBoss Portal SVN: r13097 - in modules/deployer/trunk: portal and 9 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 17:12:45 -0400 (Fri, 27 Mar 2009)
New Revision: 13097
Added:
modules/deployer/trunk/portal/
modules/deployer/trunk/portal/pom.xml
modules/deployer/trunk/portal/src/
modules/deployer/trunk/portal/src/main/
modules/deployer/trunk/portal/src/main/java/
modules/deployer/trunk/portal/src/main/java/org/
modules/deployer/trunk/portal/src/main/java/org/jboss/
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalEntityResolver.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalResolverFactory.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalUnmarshallerFactory.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/RuntimeContext.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppContextDeployer.java
modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppDeployer.java
Log:
Add portlet module separated from main deployer module.
Added: modules/deployer/trunk/portal/pom.xml
===================================================================
--- modules/deployer/trunk/portal/pom.xml (rev 0)
+++ modules/deployer/trunk/portal/pom.xml 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,62 @@
+<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">
+ <parent>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>deployer-portal</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Modules Portal Deployer</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-metadata</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+
+<pluginManagement>
+<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+</plugin>
+</plugins>
+</pluginManagement>
+
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/LibDirectoryStructure.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.deployers.vfs.spi.structure.VFSStructuralDeployers;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * may no longer be needed with jboss as5 ga, research this further
+ *
+ */
+public class LibDirectoryStructure extends AbstractVFSStructureDeployer
+{
+
+ public LibDirectoryStructure()
+ {
+ setRelativeOrder(Integer.MAX_VALUE);
+ }
+
+ /**
+ * Add jars from with a lib subdirectory.
+ *
+ * @param context The StrucutureContext to use
+ * @return Always returns false
+ */
+ public boolean determineStructure(StructureContext context) throws DeploymentException
+ {
+ try
+ {
+ VirtualFile file = context.getFile();
+ if (context.isTopLevel() == false && isLeaf(file) == false && context.getName().equals("lib"))
+ {
+ try
+ {
+ List<VirtualFile> children = context.getFile().getChildren();
+ if (children != null && children.isEmpty() == false)
+ {
+ for (int i = 0; i < children.size(); i++)
+ {
+ VFSStructuralDeployers structuralDeployers = context.getDeployers();
+
+ structuralDeployers.determineStructure(children.get(i), context.getParentContext());
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ }
+ }
+ catch (Exception e)
+ {
+ throw DeploymentException.rethrowAsDeploymentException("Error determining Structure", e);
+ }
+ // always return false
+ return false;
+ }
+
+}
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalEntityResolver.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalEntityResolver.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalEntityResolver.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import org.jboss.logging.Logger;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class PortalEntityResolver implements org.xml.sax.EntityResolver
+{
+ Logger log = Logger.getLogger(PortalEntityResolver.class);
+
+ /** . */
+ private Properties dtdMapping;
+
+ public Properties getDTDMapping()
+ {
+ return dtdMapping;
+ }
+
+ public void setDTDMapping(Properties dtdMapping)
+ {
+ this.dtdMapping = dtdMapping;
+ }
+
+ public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
+ {
+ // Let the parser open a regular URI connection to systemId
+ if (publicId == null)
+ {
+ //return null;
+ }
+
+ //
+ String dtdResourceName = (String) dtdMapping.get(publicId);
+ if (dtdResourceName != null)
+ {
+
+ log.debug("Looking up resource " + dtdResourceName + " for dtd publicId=" + publicId + ", systemId=" + systemId);
+ InputStream dtdStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(dtdResourceName);
+ if (dtdStream != null)
+ {
+ return new InputSource(dtdStream);
+ }
+ else
+ {
+ log.debug("No resource found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ }
+ }
+ else
+ {
+ log.debug("No resource name found for dtd publicId=" + publicId + ", systemId=" + systemId);
+ }
+
+ //
+ return null;
+ }
+
+}
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalPostWebDeployer.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,117 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.web.WebApplication;
+import org.jboss.web.deployers.AbstractWarDeployer;
+
+/*
+ * Initial testing deployer used to get JBoss 2.7 working on JBoss AS 5
+ * This should be replaced with a full deployer.
+ *
+ * TODO: remove this file once full deployment has been done.
+ */
+public class PortalPostWebDeployer extends AbstractComponentDeployer
+{
+
+ //the relative order of the war deployer in the main deployer.
+ private int warDeployerOrder;
+
+ private AbstractWarDeployer warDeployer;
+
+ private ArrayList listeners = new ArrayList();
+
+ public PortalPostWebDeployer()
+ {
+ //addInput(PortalMetaData.class);
+ this.setStage(DeploymentStages.INSTALLED);
+ }
+
+ public void setWarDeployer(AbstractWarDeployer warDeployer)
+ {
+ this.warDeployer = warDeployer;
+ }
+
+ public void setWarDeployerOrder(int order)
+ {
+ this.warDeployerOrder = order;
+ }
+
+ public int getRelativeOrder()
+ {
+ //return the order just after the war deployer
+ //note: should really be +1 but other portal deployer is getting in the way right now
+ return warDeployerOrder + 2;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ WebApplication webapp = warDeployer.getDeployedApp(unit.getName());
+
+ if (webapp != null)
+ {
+ Iterator<WebDeploymentListener> iter = listeners.listIterator();
+ while (iter.hasNext())
+ {
+ iter.next().portalDeployed(webapp);
+ }
+ }
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ if (warDeployer != null)
+ {
+ WebApplication webapp = warDeployer.getDeployedApp(unit.getName());
+
+ if (webapp != null)
+ {
+ Iterator<WebDeploymentListener> iter = listeners.listIterator();
+ while (iter.hasNext())
+ {
+ iter.next().portalUndeployed(webapp);
+ }
+ }
+ }
+ }
+
+ public void addDeploymentListener(WebDeploymentListener deploymentListener)
+ {
+ listeners.add(deploymentListener);
+ }
+
+ public void removeDeploymentListener(WebDeploymentListener deploymentListener)
+ {
+ listeners.remove(deploymentListener);
+ }
+
+}
\ No newline at end of file
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalResolverFactory.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalResolverFactory.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalResolverFactory.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,112 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalResolverFactory implements SchemaResolverFactory
+{
+
+ private static final Logger log = Logger.getLogger(PortalResolverFactory.class);
+
+ protected static SchemaResolverFactory factory = new PortalResolverFactory();
+
+ private final DefaultSchemaResolver resolver = new DefaultSchemaResolver();
+
+ public static SchemaResolverFactory getInstance()
+ {
+ return factory;
+ }
+
+ public SchemaBindingResolver getSchemaBindingResolver()
+ {
+ return (SchemaBindingResolver) resolver;
+ }
+
+ private PortalResolverFactory()
+ {
+ }
+
+ /**
+ * Get the DTD mappings and set the resolver to use them.
+ * @param mapping The mapping to use
+ */
+ public void setDTDMapping(Properties mapping)
+ {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ if (mapping != null && mapping.size() > 0)
+ {
+ Enumeration enumer = mapping.keys();
+ while (enumer.hasMoreElements())
+ {
+ String location = (String) enumer.nextElement();
+ String classname = (String) mapping.get(location);
+ try
+ {
+ Class clazz = classloader.loadClass(classname);
+ resolver.addClassBindingForLocation(location, clazz);
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Could not find class " + classname);
+ }
+ }
+ }
+ }
+
+ public void setXSDMapping(Properties mapping)
+ {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ if (mapping != null && mapping.size() > 0)
+ {
+ Enumeration enumer = mapping.keys();
+ while (enumer.hasMoreElements())
+ {
+ String location = (String) enumer.nextElement();
+ String classname = (String) mapping.get(location);
+ try
+ {
+ Class clazz = classloader.loadClass(classname);
+ resolver.addClassBinding(location, clazz);
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.warn("Could not find class " + classname);
+ }
+ }
+ }
+ }
+
+}
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalUnmarshallerFactory.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalUnmarshallerFactory.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/PortalUnmarshallerFactory.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,102 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.xml.sax.EntityResolver;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalUnmarshallerFactory
+{
+
+ protected static PortalUnmarshallerFactory factory = new PortalUnmarshallerFactory();
+
+ protected Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+
+ protected EntityResolver entityResolver;
+
+ protected boolean schemaValidation;
+
+ protected boolean validation;
+
+ public static PortalUnmarshallerFactory getInstance()
+ {
+ return factory;
+ }
+
+ private PortalUnmarshallerFactory()
+ {
+ //set the default validation values.
+ this.schemaValidation = false;
+ this.validation = false;
+ }
+
+ public Unmarshaller getUnmarshaller()
+ {
+ // add the entityresolver if it exists
+ if (entityResolver != null)
+ {
+ try
+ {
+ unmarshaller.setEntityResolver(entityResolver);
+ }
+ catch (JBossXBException exception)
+ {
+ exception.printStackTrace();
+ }
+ }
+
+ // try and set the validations for the unmarshaller
+ try
+ {
+ unmarshaller.setSchemaValidation(schemaValidation);
+ unmarshaller.setValidation(validation);
+ }
+ catch (JBossXBException exception)
+ {
+ exception.printStackTrace();
+ }
+ return unmarshaller;
+ }
+
+ public void setEntityResolver(EntityResolver entityResolver)
+ {
+ this.entityResolver = entityResolver;
+ }
+
+ public void setSchemaValidation(boolean validate)
+ {
+ this.schemaValidation = validate;
+ }
+
+ public void setValidation(boolean validate)
+ {
+ this.validation = validate;
+ }
+
+}
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/RuntimeContext.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/RuntimeContext.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/RuntimeContext.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import javax.servlet.ServletContext;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class RuntimeContext
+{
+ private final String appId;
+ private final ServletContext servletContext;
+ private final String contextPath;
+ private final ClassLoader classLoader;
+
+ public RuntimeContext(String appId, ServletContext context, String contextPath, ClassLoader loader)
+ {
+ if (appId == null)
+ {
+ throw new IllegalArgumentException("appId is null");
+ }
+ if (context == null)
+ {
+ throw new IllegalArgumentException("servletContext is null");
+ }
+ if (contextPath == null)
+ {
+ throw new IllegalArgumentException("contextPath is null");
+ }
+ if (loader == null)
+ {
+ throw new IllegalArgumentException("class loader is null");
+ }
+
+ this.appId = appId;
+ this.servletContext = context;
+ this.classLoader = loader;
+ this.contextPath = contextPath;
+ }
+
+ public String getAppId()
+ {
+ return appId;
+ }
+
+ public ServletContext getServletContext()
+ {
+ return servletContext;
+ }
+
+ public String getContextPath()
+ {
+ return contextPath;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+}
+
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/WebDeploymentListener.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal;
+
+import org.jboss.web.WebApplication;
+
+/*
+ * This is only to get portal 2.7 working with JBoss AS 5 initially, should be replaced with a
+ * full deployment implementation.
+ *
+ * TODO: remove this file once full deployment has been done.
+ */
+public interface WebDeploymentListener
+{
+ public void portalDeployed(WebApplication webapp);
+
+ public void portalUndeployed(WebApplication webapp);
+}
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppContextDeployer.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppContextDeployer.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppContextDeployer.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal.webapp;
+
+import java.lang.reflect.Method;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.servlet.ServletContext;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.web.WebApplication;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class WebAppContextDeployer extends AbstractDeployer
+{
+ protected MBeanServer server;
+ public static String PORTLET_APP_CONTEXT_PATH_ATTACHMENT = "portletAppContextPath." + String.class.getName();
+ public static String PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT = "portletAppServletContext." + ServletContext.class.getName();
+
+ public WebAppContextDeployer()
+ {
+ setAllInputs(false);
+ setInput(WebApplication.class);
+ setStage(DeploymentStages.INSTALLED);
+ addOutput(PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ addOutput(PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ }
+
+ public void setMBeanServer(MBeanServer server)
+ {
+ this.server = server;
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ WebApplication webApp = unit.getAttachment(WebApplication.class);
+
+ ObjectName objectName = (ObjectName)webApp.getAppData();
+
+ try
+ {
+ Object standardContextObject = server.getAttribute(objectName, "managedResource");
+ String contextPath = getContextPath(standardContextObject);
+ ServletContext servletContext = getServletContext(standardContextObject);
+
+ unit.addAttachment(PORTLET_APP_CONTEXT_PATH_ATTACHMENT, contextPath, String.class);
+ unit.addAttachment(PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT, servletContext, ServletContext.class);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException ("Could not get the Standard Context for " + unit.getName());
+ }
+ }
+
+ //TODO: determine a better way to get the contextpath string
+ protected String getContextPath(Object standardContextObject) throws DeploymentException
+ {
+ try
+ {
+ Class standardContextClass = standardContextObject.getClass();
+ Method getPathMethod = standardContextClass.getMethod("getPath", new Class[0]);
+
+ return (String) getPathMethod.invoke(standardContextObject, new Object[0]);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error trying to get the ContextPath from the web server.", e);
+ }
+ }
+
+ // TODO: determine a better way to get the servlet context
+ protected ServletContext getServletContext(Object standardContextObject) throws DeploymentException
+ {
+ try
+ {
+ Class standardContextClass = standardContextObject.getClass();
+ Method getServletContextMethod = standardContextClass.getMethod("getServletContext", new Class[0]);
+
+ return (ServletContext) getServletContextMethod.invoke(standardContextObject, new Object[0]);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Error trying to get Reference to the ServletContext from the web server.", e);
+ }
+ }
+
+}
+
Added: modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppDeployer.java
===================================================================
--- modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppDeployer.java (rev 0)
+++ modules/deployer/trunk/portal/src/main/java/org/jboss/portal/deployer/portal/webapp/WebAppDeployer.java 2009-03-27 21:12:45 UTC (rev 13097)
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.portal.webapp;
+
+import javax.management.MBeanServer;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
+import org.jboss.web.WebApplication;
+import org.jboss.web.deployers.AbstractWarDeployer;
+
+/**
+ * This class is used to get a WebApplication object for the deployed
+ * webapp.
+ * NOTE: that this class does not perform like a normal deployer, it is not
+ * metadata driven as the information required is not determined by the webapp's
+ * metadata but how it is deployed into the server.
+ * TODO: More research should be done to determine if this information can be more
+ * sanely extracted from the server.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class WebAppDeployer extends AbstractDeployer
+{
+
+ protected AbstractWarDeployer warDeployer;
+
+ public WebAppDeployer()
+ {
+ setAllInputs(false);
+ setInput(PortletApplication10MetaData.class);
+ setOutput(WebApplication.class);
+ setStage(DeploymentStages.INSTALLED);
+ }
+
+ @Override
+ public int getRelativeOrder()
+ {
+ // must be set relative to the warDeployer as the data we
+ // need is only set after the webapp has been deployed.
+ return warDeployer.getRelativeOrder() + 1;
+ }
+
+ public void setWarDeployer(AbstractWarDeployer warDeployer)
+ {
+ this.warDeployer = warDeployer;
+ }
+
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ // the unit name of the deployed application is the string
+ // used to store the apps in the warDeployer
+ String name = unit.getName();
+ WebApplication webApp = warDeployer.getDeployedApp(name);
+ if (webApp == null)
+ {
+ throw new DeploymentException ("Could not find a deployed webapp with name " + name);
+ }
+ unit.addAttachment(WebApplication.class, webApp);
+ }
+
+}
+
15 years, 2 months
JBoss Portal SVN: r13096 - in modules/deployer/trunk: deployer and 4 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 16:58:26 -0400 (Fri, 27 Mar 2009)
New Revision: 13096
Added:
modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-layouts_2_7.dtd
modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-renderset_2_7.dtd
modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-theme_2_7.dtd
Removed:
modules/deployer/trunk/deployer/src/main/java/
Modified:
modules/deployer/trunk/build/pom.xml
modules/deployer/trunk/deployer/pom.xml
modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml
modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml
modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml
Log:
Remove code from main deployer module into submodules.
Add theme dtd files to the deployer.
Modified: modules/deployer/trunk/build/pom.xml
===================================================================
--- modules/deployer/trunk/build/pom.xml 2009-03-27 20:54:55 UTC (rev 13095)
+++ modules/deployer/trunk/build/pom.xml 2009-03-27 20:58:26 UTC (rev 13096)
@@ -52,15 +52,7 @@
</releases>
</repository>
</repositories>
-<!-- <pluginRepositories>
- <pluginRepository>
- <id>maven.jboss.org</id>
- <name>JBoss Maven Repository</name>
- <url>http://repository.jboss.com/maven2</url>
- </pluginRepository>
- </pluginRepositories> -->
-
<build>
<plugins>
<plugin>
@@ -101,41 +93,11 @@
<artifactId>metadata-metadata</artifactId>
<version>${version.jboss.portal.metadata}</version>
</dependency>
-<!-- <dependency>
- <groupId>org.jboss.portal.web</groupId>
- <artifactId>web-web</artifactId>
- <version>${version.jboss.portal.web}</version>
- </dependency>
<dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
- <version>${version.jboss.portal.portlet}</version>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-theme</artifactId>
+ <version>${version.jboss.portal.metadata}</version>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-mc</artifactId>
- <version>${version.jboss.portal.portlet}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>server</artifactId>
- <version>${version.jboss.portal.server}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.server</groupId>
- <artifactId>portlet-server</artifactId>
- <version>${version.jboss.portlet.server}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- <version>${version.jboss.portal.server}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>security</artifactId>
- <version>${version.jboss.portal.server}</version>
- </dependency> -->
<dependency>
<groupId>org.jboss.maven.plugins</groupId>
Modified: modules/deployer/trunk/deployer/pom.xml
===================================================================
--- modules/deployer/trunk/deployer/pom.xml 2009-03-27 20:54:55 UTC (rev 13095)
+++ modules/deployer/trunk/deployer/pom.xml 2009-03-27 20:58:26 UTC (rev 13096)
@@ -8,88 +8,33 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>deployer-deployer</artifactId>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
<name>JBoss Portal Modules Deployer</name>
<dependencies>
-
<dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-spi</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-portal</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-portlet</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-theme</artifactId>
+ <version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.jbossas</groupId>
- <artifactId>jboss-as-server</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>saxon</groupId>
- <artifactId>saxon</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.jboss.portal.metadata</groupId>
<artifactId>metadata-metadata</artifactId>
</dependency>
-<!-- <dependency>
- <groupId>org.jboss.portal.web</groupId>
- <artifactId>web-web</artifactId>
- </dependency>
<dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-portlet</artifactId>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-theme</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.portal.portlet</groupId>
- <artifactId>portlet-mc</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>server</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.server</groupId>
- <artifactId>portlet-server</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.portal.core</groupId>
- <artifactId>security</artifactId>
- </dependency>
-
-
- <dependency>
- <groupId>org.jboss.portal</groupId>
- <artifactId>test</artifactId>
- <version>0.0</version>
- <scope>provided</scope>
- </dependency> -->
-
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-security-aspects</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.aspects</groupId>
- <artifactId>jboss-transaction-aspects</artifactId>
- <scope>provided</scope>
- </dependency>
-
</dependencies>
<build>
@@ -118,7 +63,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <!-- <version>${version.assembly}</version> -->
<configuration>
<finalName>jboss-portal.deployer</finalName>
<descriptors>
@@ -135,45 +79,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.2</version>
- <configuration>
- <excludes>
- <exclude>**/base-aop.xml</exclude>
- <exclude>**/deployment-aop.xml</exclude>
- </excludes>
- </configuration>
- </plugin>
-<!--
- <plugin>
- <groupId>org.jboss.maven.plugins</groupId>
- <artifactId>maven-jbossaop-plugin</artifactId>
- <version>${version.jboss.aop}</version>
- <executions>
- <execution>
- <id>compile</id>
- <configuration>
- <includeProjectDependency>true</includeProjectDependency>
- <aoppaths>
- <aoppath>src/main/resources/base-aop.xml</aoppath>
- <aoppath>src/main/resources/deployment-aop.xml</aoppath>
- </aoppaths>
- <includes>
- <include>org/jboss/portal/deployer/portlet/InstanceDeployerImpl.class</include>
- </includes>
- </configuration>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
--->
- </plugins>
-
-
+ </plugins>
</build>
</project>
Modified: modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml
===================================================================
--- modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml 2009-03-27 20:54:55 UTC (rev 13095)
+++ modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer-components.xml 2009-03-27 20:58:26 UTC (rev 13096)
@@ -7,12 +7,5 @@
</fileSet>
</fileSets>
- <files>
- <file>
- <source>src/main/resources/deployment-aop.xml</source>
- <outputDirectory>/</outputDirectory>
- </file>
- </files>
-
</component>
Modified: modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml
===================================================================
--- modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml 2009-03-27 20:54:55 UTC (rev 13095)
+++ modules/deployer/trunk/deployer/src/assemble/jboss-portal-deployer.xml 2009-03-27 20:58:26 UTC (rev 13096)
@@ -14,18 +14,11 @@
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<includes>
- <include>org.jboss.portal.deployer:deployer-deployer</include>
+ <include>org.jboss.portal.deployer:deployer-portal</include>
+ <include>org.jboss.portal.deployer:deployer-portlet</include>
+ <include>org.jboss.portal.deployer:deployer-theme</include>
<include>org.jboss.portal.metadata:metadata-metadata</include>
- <include>org.jboss.portal.common:common-common</include>
- <include>org.jboss.portal.common:common-portal</include>
- <include>org.jboss.portal.web:web-web</include>
- <include>org.jboss.portal.portlet:portlet-portlet</include>
- <include>org.jboss.portal.portlet:portlet-mc</include>
- <include>org.jboss.portal.server:server-server</include>
- <include>org.jboss.portal.server:portlet-server</include>
- <include>javax.ccpp:ccpp</include>
- <include>javax.portlet:portlet-api</include>
-
+ <include>org.jboss.portal.metadata:metadata-theme</include>
</includes>
</dependencySet>
<dependencySet>
Modified: modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml 2009-03-27 20:54:55 UTC (rev 13095)
+++ modules/deployer/trunk/deployer/src/main/deployer/META-INF/deployer-jboss-beans.xml 2009-03-27 20:58:26 UTC (rev 13096)
@@ -11,7 +11,7 @@
********************************************************************************************************************* -->
<!-- portal custom dtd's -->
- <bean name="PortalEntityResolver" class="org.jboss.portal.deployer.PortalEntityResolver">
+ <bean name="PortalEntityResolver" class="org.jboss.portal.deployer.portal.PortalEntityResolver">
<property name="DTDMapping">
<map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
@@ -34,12 +34,24 @@
<key>-//JBoss Portal//DTD Portal Object 2.6//EN</key>
<value>dtd/portal-object_2_6.dtd</value>
</entry>
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portal Theme 2.8//EN</key>
+ <value>dtd/portal-theme_2_7.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portal Layout 2.8//EN</key>
+ <value>dtd/portal-layouts_2_7.dtd</value>
+ </entry>
+ <entry>
+ <key>-//JBoss Portal//DTD JBoss Portal RenderSet 2.8//EN</key>
+ <value>dtd/portal-rendersets_2_7.dtd</value>
+ </entry>
</map>
</property>
</bean>
- <bean name="PortalResolverFactory" class="org.jboss.portal.deployer.PortalResolverFactory">
- <constructor factoryClass="org.jboss.portal.deployer.PortalResolverFactory" factoryMethod="getInstance"/>
+ <bean name="PortalResolverFactory" class="org.jboss.portal.deployer.portal.PortalResolverFactory">
+ <constructor factoryClass="org.jboss.portal.deployer.portal.PortalResolverFactory" factoryMethod="getInstance"/>
<property name="DTDMapping">
<map class="java.util.Properties" keyClass="java.lang.String" valueClass="java.lang.String">
<entry>
@@ -58,6 +70,30 @@
<key>jboss-portlet_2_6.dtd</key>
<value>org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData</value>
</entry>
+ <entry>
+ <key>themes</key>
+ <value>org.jboss.portal.metadata.theme.PortalThemesMetaData</value>
+ </entry>
+ <entry>
+ <key>portal-theme_2_7.dtd</key>
+ <value>org.jboss.portal.metadata.theme.PortalThemesMetaData</value>
+ </entry>
+ <entry>
+ <key>layouts</key>
+ <value>org.jboss.portal.metadata.layout.PortalLayoutsMetaData</value>
+ </entry>
+ <entry>
+ <key>portal-layout_2_7.dtd</key>
+ <value>org.jboss.portal.metadata.layout.PortalLayoutsMetaData</value>
+ </entry>
+ <entry>
+ <key>portal-renderSet</key>
+ <value>org.jboss.portal.metadata.renderset.PortalRenderSetsMetaData</value>
+ </entry>
+ <entry>
+ <key>portal-renderset_2_7.dtd</key>
+ <value>org.jboss.portal.metadata.renderset.PortalRenderSetsMetaData</value>
+ </entry>
</map>
</property>
<property name="XSDMapping">
@@ -74,8 +110,8 @@
</property>
</bean>
- <bean name="PortalUnmarshallerFactory" class="org.jboss.portal.deployer.PortalUnmarshallerFactory">
- <constructor factoryClass="org.jboss.portal.deployer.PortalUnmarshallerFactory" factoryMethod="getInstance"/>
+ <bean name="PortalUnmarshallerFactory" class="org.jboss.portal.deployer.portal.PortalUnmarshallerFactory">
+ <constructor factoryClass="org.jboss.portal.deployer.portal.PortalUnmarshallerFactory" factoryMethod="getInstance"/>
<property name="entityResolver"><inject bean="PortalEntityResolver"/></property>
</bean>
@@ -104,6 +140,15 @@
<!-- portlet.xml parsing -->
<bean name="PortletParsingDeployer" class="org.jboss.portal.deployer.parsing.PortletParsingDeployer"/>
+ <!-- *-themes.xml parsing -->
+ <bean name="PortletThemeParsingDeployer" class="org.jboss.portal.deployer.theme.parsing.PortalThemeParsingDeployer"/>
+
+ <!-- *-layouts.xml parsing -->
+ <bean name="PortalLayoutParsingDeployer" class="org.jboss.portal.deployer.theme.parsing.PortalLayoutParsingDeployer"/>
+
+ <!-- *-renderSet.xml parsing -->
+ <bean name="PortalRenderSetParsingDeployer" class="org.jboss.portal.deployer.theme.parsing.PortalRenderSetParsingDeployer"/>
+
<bean name="MergedPortletParsingDeployer" class="org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer">
<property name="standardPortletFileLocation">conf/standardjboss-portlet.xml</property>
</bean>
@@ -125,10 +170,10 @@
</bean>
<!-- Used to get information from the WarDeployer-->
- <bean name="PortalWebAppDeployer" class="org.jboss.portal.deployer.webapp.WebAppDeployer">
+ <bean name="PortalWebAppDeployer" class="org.jboss.portal.deployer.portal.webapp.WebAppDeployer">
<property name="warDeployer"><inject bean="WarDeployer"/></property>
</bean>
- <bean name="PortalWebAppContextDeployer" class="org.jboss.portal.deployer.webapp.WebAppContextDeployer">
+ <bean name="PortalWebAppContextDeployer" class="org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer">
<property name="MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
<bean name="PortletTLDDeployer" class="org.jboss.portal.deployer.portlet.PortletTLDDeployer">
@@ -150,4 +195,10 @@
<bean name="PortalObjectDeployer" class="org.jboss.portal.deployer.portlet.ObjectDeployer"/>
+ <bean name="ThemeDeployer" class="org.jboss.portal.deployer.theme.ThemeDeployer"/>
+
+ <bean name="LayoutDeployer" class="org.jboss.portal.deployer.theme.LayoutDeployer"/>
+
+ <bean name="RenderSetDeployer" class="org.jboss.portal.deployer.theme.RenderSetDeployer"/>
+
</deployment>
Added: modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-layouts_2_7.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-layouts_2_7.dtd (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-layouts_2_7.dtd 2009-03-27 20:58:26 UTC (rev 13096)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE identity-configuration PUBLIC
+ "-//JBoss Portal//DTD JBoss Portal 2.8//EN"
+ "http://www.jboss.org/portal/dtd/portal-theme-layouts_2_7.dtd">
+-->
+
+<!ELEMENT layouts (layout*) >
+
+<!ELEMENT layout (name, layout-implementation?, uri*, regions) >
+
+<!ELEMENT name (#PCDATA) >
+
+<!ELEMENT layout-implementation (#PCDATA) >
+
+<!ELEMENT uri (#PCDATA) >
+<!ATTLIST uri state CDATA #IMPLIED >
+
+<!ELEMENT regions (region*) >
+
+<!ELEMENT region EMPTY >
+<!ATTLIST region name CDATA #REQUIRED >
Added: modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-renderset_2_7.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-renderset_2_7.dtd (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-renderset_2_7.dtd 2009-03-27 20:58:26 UTC (rev 13096)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE portal-renderSet PUBLIC
+ "-//JBoss Portal//DTD JBoss Portal RenderSet 2.8//EN"
+ "http://www.jboss.org/portal/dtd/portal-theme-renderset_2_7.dtd">
+-->
+
+<!ELEMENT portal-renderSet (renderSet*) >
+
+<!ELEMENT renderSet (set*) >
+<!ATTLIST renderSet name CDATA #REQUIRED >
+
+<!ELEMENT set (ajax-enabled, region-renderer, window-renderer, portlet-renderer, decoration-renderer) >
+<!ATTLIST set content-type CDATA
+
+<!ELEMENT ajax-enabled (#PCDATA) >
+<!ELEMENT region-renderer (#PCDATA) >
+<!ELEMENT window-renderer (#PCDATA) >
+<!ELEMENT portlet-renderer (#PCDATA) >
+<!ELEMENT decoration-renderer (#PCDATA) >
Added: modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-theme_2_7.dtd
===================================================================
--- modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-theme_2_7.dtd (rev 0)
+++ modules/deployer/trunk/deployer/src/main/deployer/dtd/portal-theme_2_7.dtd 2009-03-27 20:58:26 UTC (rev 13096)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!--
+<!DOCTYPE themes PUBLIC
+ "-//JBoss Portal//DTD JBoss Portal Theme 2.8//EN"
+ "http://www.jboss.org/portal/dtd/portal-theme_2_7.dtd">
+-->
+
+<!--
+-->
+<!ELEMENT themes (theme*) >
+
+<!--
+-->
+<!ELEMENT theme (name?, link*, script*, theme-implementation?)>
+
+<!--
+-->
+<!ELEMENT name (#PCDATA) >
+
+<!--
+-->
+<!ELEMENT theme-implementation (#PCDATA) >
+
+<!--
+-->
+<!ATTLIST script
+ id CDATA #IMPLIED
+ src CDATA #IMPLIED
+ type CDATA #IMPLIED
+ charset CDATA #IMPLIED >
+
+<!--
+-->
+<!ELEMENT script (#CDATA) >
+
+<!--
+-->
+<!ATTLIST link
+ id CDATA #IMPLIED
+ title CDATA #IMPLIED
+ type CDATA #IMPLIED
+ href CDATA #IMPLIED
+ media CDATA #IMPLIED
+ rel CDATA #IMPLIED >
+
+<!--
+-->
+<!ELEMENT link EMPTY >
15 years, 2 months
JBoss Portal SVN: r13095 - in modules/deployer/trunk: portlet and 6 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 16:54:55 -0400 (Fri, 27 Mar 2009)
New Revision: 13095
Added:
modules/deployer/trunk/portlet/
modules/deployer/trunk/portlet/.classpath
modules/deployer/trunk/portlet/.cvsignore
modules/deployer/trunk/portlet/.project
modules/deployer/trunk/portlet/pom.xml
modules/deployer/trunk/portlet/src/
modules/deployer/trunk/portlet/src/main/
modules/deployer/trunk/portlet/src/main/java/
modules/deployer/trunk/portlet/src/main/resources/
modules/deployer/trunk/portlet/src/test/
Removed:
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalUnmarshallerFactory.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portal/
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/webapp/
Modified:
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java
modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java
Log:
Create portlet submodule from main deployer module.
Added: modules/deployer/trunk/portlet/.classpath
===================================================================
--- modules/deployer/trunk/portlet/.classpath (rev 0)
+++ modules/deployer/trunk/portlet/.classpath 2009-03-27 20:54:55 UTC (rev 13095)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-ant/lib/ant.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/xalan.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-jaf/lib/activation.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-j2ee.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-jmx.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-system.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/cargo-core-uberjar-0.8.jar"/>
+ <classpathentry kind="lib" path="/tools/lib/ant-junit.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/apache-httpclient/lib/commons-httpclient.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/backport-concurrent/lib/jboss-backport-concurrent.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: modules/deployer/trunk/portlet/.classpath
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/deployer/trunk/portlet/.cvsignore
===================================================================
--- modules/deployer/trunk/portlet/.cvsignore (rev 0)
+++ modules/deployer/trunk/portlet/.cvsignore 2009-03-27 20:54:55 UTC (rev 13095)
@@ -0,0 +1,2 @@
+output
+bin
Property changes on: modules/deployer/trunk/portlet/.cvsignore
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/deployer/trunk/portlet/.project
===================================================================
--- modules/deployer/trunk/portlet/.project (rev 0)
+++ modules/deployer/trunk/portlet/.project 2009-03-27 20:54:55 UTC (rev 13095)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: modules/deployer/trunk/portlet/.project
___________________________________________________________________
Name: svn:executable
+ *
Added: modules/deployer/trunk/portlet/pom.xml
===================================================================
--- modules/deployer/trunk/portlet/pom.xml (rev 0)
+++ modules/deployer/trunk/portlet/pom.xml 2009-03-27 20:54:55 UTC (rev 13095)
@@ -0,0 +1,81 @@
+<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">
+ <parent>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>deployer-portlet</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Modules Deployer</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-portal</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-metadata</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-theme</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+
+<pluginManagement>
+<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+</plugin>
+</plugins>
+</pluginManagement>
+
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
Copied: modules/deployer/trunk/portlet/src/main/java (from rev 13058, modules/deployer/trunk/deployer/src/main/java)
Property changes on: modules/deployer/trunk/portlet/src/main/java
___________________________________________________________________
Name: svn:mergeinfo
+
Deleted: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalEntityResolver.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -1,84 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated 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.portal.deployer;
-
-import org.jboss.logging.Logger;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-public class PortalEntityResolver implements org.xml.sax.EntityResolver
-{
- Logger log = Logger.getLogger(PortalEntityResolver.class);
-
- /** . */
- private Properties dtdMapping;
-
- public Properties getDTDMapping()
- {
- return dtdMapping;
- }
-
- public void setDTDMapping(Properties dtdMapping)
- {
- this.dtdMapping = dtdMapping;
- }
-
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- {
- // Let the parser open a regular URI connection to systemId
- if (publicId == null)
- {
- //return null;
- }
-
- //
- String dtdResourceName = (String) dtdMapping.get(publicId);
- if (dtdResourceName != null)
- {
-
- log.debug("Looking up resource " + dtdResourceName + " for dtd publicId=" + publicId + ", systemId=" + systemId);
- InputStream dtdStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(dtdResourceName);
- if (dtdStream != null)
- {
- return new InputSource(dtdStream);
- }
- else
- {
- log.debug("No resource found for dtd publicId=" + publicId + ", systemId=" + systemId);
- }
- }
- else
- {
- log.debug("No resource name found for dtd publicId=" + publicId + ", systemId=" + systemId);
- }
-
- //
- return null;
- }
-
-}
Deleted: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalResolverFactory.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -1,112 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated 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.portal.deployer;
-
-import java.util.Enumeration;
-import java.util.Properties;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortalResolverFactory implements SchemaResolverFactory
-{
-
- private static final Logger log = Logger.getLogger(PortalResolverFactory.class);
-
- protected static SchemaResolverFactory factory = new PortalResolverFactory();
-
- private final DefaultSchemaResolver resolver = new DefaultSchemaResolver();
-
- public static SchemaResolverFactory getInstance()
- {
- return factory;
- }
-
- public SchemaBindingResolver getSchemaBindingResolver()
- {
- return (SchemaBindingResolver) resolver;
- }
-
- private PortalResolverFactory()
- {
- }
-
- /**
- * Get the DTD mappings and set the resolver to use them.
- * @param mapping The mapping to use
- */
- public void setDTDMapping(Properties mapping)
- {
- ClassLoader classloader = Thread.currentThread().getContextClassLoader();
- if (mapping != null && mapping.size() > 0)
- {
- Enumeration enumer = mapping.keys();
- while (enumer.hasMoreElements())
- {
- String location = (String) enumer.nextElement();
- String classname = (String) mapping.get(location);
- try
- {
- Class clazz = classloader.loadClass(classname);
- resolver.addClassBindingForLocation(location, clazz);
- }
- catch (ClassNotFoundException e)
- {
- log.warn("Could not find class " + classname);
- }
- }
- }
- }
-
- public void setXSDMapping(Properties mapping)
- {
- ClassLoader classloader = Thread.currentThread().getContextClassLoader();
- if (mapping != null && mapping.size() > 0)
- {
- Enumeration enumer = mapping.keys();
- while (enumer.hasMoreElements())
- {
- String location = (String) enumer.nextElement();
- String classname = (String) mapping.get(location);
- try
- {
- Class clazz = classloader.loadClass(classname);
- resolver.addClassBinding(location, clazz);
- }
- catch (ClassNotFoundException e)
- {
- log.warn("Could not find class " + classname);
- }
- }
- }
- }
-
-}
Deleted: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalUnmarshallerFactory.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/PortalUnmarshallerFactory.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/PortalUnmarshallerFactory.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -1,102 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated 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.portal.deployer;
-
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.xml.sax.EntityResolver;
-
-/**
- * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
- * @version $Revision$
- */
-public class PortalUnmarshallerFactory
-{
-
- protected static PortalUnmarshallerFactory factory = new PortalUnmarshallerFactory();
-
- protected Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
-
- protected EntityResolver entityResolver;
-
- protected boolean schemaValidation;
-
- protected boolean validation;
-
- public static PortalUnmarshallerFactory getInstance()
- {
- return factory;
- }
-
- private PortalUnmarshallerFactory()
- {
- //set the default validation values.
- this.schemaValidation = false;
- this.validation = false;
- }
-
- public Unmarshaller getUnmarshaller()
- {
- // add the entityresolver if it exists
- if (entityResolver != null)
- {
- try
- {
- unmarshaller.setEntityResolver(entityResolver);
- }
- catch (JBossXBException exception)
- {
- exception.printStackTrace();
- }
- }
-
- // try and set the validations for the unmarshaller
- try
- {
- unmarshaller.setSchemaValidation(schemaValidation);
- unmarshaller.setValidation(validation);
- }
- catch (JBossXBException exception)
- {
- exception.printStackTrace();
- }
- return unmarshaller;
- }
-
- public void setEntityResolver(EntityResolver entityResolver)
- {
- this.entityResolver = entityResolver;
- }
-
- public void setSchemaValidation(boolean validate)
- {
- this.schemaValidation = validate;
- }
-
- public void setValidation(boolean validate)
- {
- this.validation = validate;
- }
-
-}
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/MergedPortletParsingDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -30,10 +30,10 @@
import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
-import org.jboss.portal.deployer.PortalEntityResolver;
-import org.jboss.portal.deployer.PortalResolverFactory;
-import org.jboss.portal.deployer.PortalUnmarshallerFactory;
-import org.jboss.portal.deployer.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portal.PortalEntityResolver;
+import org.jboss.portal.deployer.portal.PortalResolverFactory;
+import org.jboss.portal.deployer.portal.PortalUnmarshallerFactory;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/parsing/PortalResolverDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -27,9 +27,9 @@
import org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.portal.deployer.PortalEntityResolver;
-import org.jboss.portal.deployer.PortalResolverFactory;
-import org.jboss.portal.deployer.PortalUnmarshallerFactory;
+import org.jboss.portal.deployer.portal.PortalEntityResolver;
+import org.jboss.portal.deployer.portal.PortalResolverFactory;
+import org.jboss.portal.deployer.portal.PortalUnmarshallerFactory;
import org.jboss.portal.metadata.jboss.app.PortalAppMetaData;
import org.jboss.virtual.VirtualFile;
import org.jboss.xb.binding.Unmarshaller;
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/InstanceDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -29,7 +29,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.portal.deployer.container.InstanceDeployment;
import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
-import org.jboss.portal.deployer.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
import org.jboss.portal.metadata.portlet.instances.PortletDeploymentInstancesMetaData;
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDependencyDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -73,25 +73,25 @@
public void deploy(DeploymentUnit unit) throws DeploymentException
{
ControllerContext context = unit.getAttachment(ControllerContext.class);
-
+
if (context != null)
{
-
- if (dependencies != null)
- {
- for (int i = 0; i < dependencies.size(); i++)
+
+ if (dependencies != null)
{
- String dependency = dependencies.get(i);
+ for (int i = 0; i < dependencies.size(); i++)
+ {
+ String dependency = dependencies.get(i);
- // the controller state must be set to Real to make sure that the deployable is not initalized before the dependencies.
- // TODO: use ControllerState.REAL if it gets added as an option to the ControllerState class.
- DependencyItem dependItem = new AbstractDependencyItem(context.getName(), dependency, new ControllerState(
- "Real"), ControllerState.CREATE);
+ // the controller state must be set to Real to make sure that the deployable is not initalized before the dependencies.
+ // TODO: use ControllerState.REAL if it gets added as an option to the ControllerState class.
+ DependencyItem dependItem = new AbstractDependencyItem(context.getName(), dependency,
+ new ControllerState("Real"), ControllerState.CREATE);
- unit.addIDependOn(dependItem);
+ unit.addIDependOn(dependItem);
+ }
}
}
- }
}
}
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/PortletDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -35,7 +35,7 @@
import org.jboss.logging.Logger;
import org.jboss.portal.deployer.container.PortletDeployment;
import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
-import org.jboss.portal.deployer.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletMetaData;
import org.jboss.portal.metadata.portlet.PortletApplication10MetaData;
Modified: modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java
===================================================================
--- modules/deployer/trunk/deployer/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java 2009-03-20 16:16:17 UTC (rev 13058)
+++ modules/deployer/trunk/portlet/src/main/java/org/jboss/portal/deployer/portlet/ServiceInjectorDeployer.java 2009-03-27 20:54:55 UTC (rev 13095)
@@ -32,7 +32,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.mx.util.MBeanProxyExt;
import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
-import org.jboss.portal.deployer.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
import org.jboss.portal.metadata.jboss.portlet.ServiceMetaData;
15 years, 2 months
JBoss Portal SVN: r13094 - in modules/deployer/trunk: theme and 10 other directories.
by portal-commits@lists.jboss.org
Author: mwringe
Date: 2009-03-27 16:49:41 -0400 (Fri, 27 Mar 2009)
New Revision: 13094
Added:
modules/deployer/trunk/theme/
modules/deployer/trunk/theme/pom.xml
modules/deployer/trunk/theme/src/
modules/deployer/trunk/theme/src/main/
modules/deployer/trunk/theme/src/main/java/
modules/deployer/trunk/theme/src/main/java/org/
modules/deployer/trunk/theme/src/main/java/org/jboss/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/LayoutDeployer.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/RenderSetDeployer.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/ThemeDeployer.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/LayoutDeployment.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/RenderSetDeployment.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/ThemeDeployment.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalLayoutParsingDeployer.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalRenderSetParsingDeployer.java
modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalThemeParsingDeployer.java
Log:
Add theme deployers.
Property changes on: modules/deployer/trunk/theme
___________________________________________________________________
Name: svn:ignore
+ target
Added: modules/deployer/trunk/theme/pom.xml
===================================================================
--- modules/deployer/trunk/theme/pom.xml (rev 0)
+++ modules/deployer/trunk/theme/pom.xml 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,98 @@
+<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">
+ <parent>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>deployer-theme</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Portal Modules Theme Deployer</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-spi</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-portal</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.deployer</groupId>
+ <artifactId>deployer-portlet</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-metadata</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.metadata</groupId>
+ <artifactId>metadata-theme</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-security-aspects</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.aspects</groupId>
+ <artifactId>jboss-transaction-aspects</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+
+<pluginManagement>
+<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.2</version>
+</plugin>
+</plugins>
+</pluginManagement>
+
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <encoding>iso-8859-1</encoding>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/LayoutDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/LayoutDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/LayoutDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.beans.metadata.api.annotations.Install;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portlet.PortletDeployer;
+import org.jboss.portal.deployer.theme.container.LayoutDeployment;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.layout.PortalLayoutsMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class LayoutDeployer extends AbstractComponentDeployer
+{
+ LayoutDeployment deployment;
+
+ public LayoutDeployer()
+ {
+ this.setAllInputs(false);
+ this.setInput(PortalLayoutsMetaData.class);
+ this.addInput(PortletDeployer.PORLET_DEPLOYED);
+ this.addInput(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ this.setStage(DeploymentStages.INSTALLED);
+ }
+
+ @Install
+ public void addDeployment(LayoutDeployment deployment)
+ {
+ this.deployment = deployment;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ PortalLayoutsMetaData layoutsMetaData = unit.getAttachment(PortalLayoutsMetaData.class);
+
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+
+ String appId = jbossPortletMetaData.getAppId();
+ ServletContext servletContext = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT,
+ ServletContext.class);
+ String contextPath = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT, String.class);
+
+ RuntimeContext runtimeContext = new RuntimeContext(appId, servletContext, contextPath, unit.getClassLoader());
+
+ deployment.deployLayouts(runtimeContext, layoutsMetaData);
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+ String appId = jbossPortletMetaData.getAppId();
+ deployment.undeployLayouts(appId);
+ }
+
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/RenderSetDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/RenderSetDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/RenderSetDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.beans.metadata.api.annotations.Install;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portlet.PortletDeployer;
+import org.jboss.portal.deployer.theme.container.RenderSetDeployment;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.renderset.PortalRenderSetsMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class RenderSetDeployer extends AbstractComponentDeployer
+{
+
+ RenderSetDeployment deployment;
+
+ public RenderSetDeployer()
+ {
+ this.setAllInputs(false);
+ this.setInput(PortalRenderSetsMetaData.class);
+ this.addInput(PortletDeployer.PORLET_DEPLOYED);
+ this.addInput(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ this.setStage(DeploymentStages.INSTALLED);
+ }
+
+ @Install
+ public void addDeployment(RenderSetDeployment deployment)
+ {
+ this.deployment = deployment;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ PortalRenderSetsMetaData renderSetsMetaData = unit.getAttachment(PortalRenderSetsMetaData.class);
+
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+
+ String appId = jbossPortletMetaData.getAppId();
+ ServletContext servletContext = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT,
+ ServletContext.class);
+ String contextPath = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT, String.class);
+
+ RuntimeContext runtimeContext = new RuntimeContext(appId, servletContext, contextPath, unit.getClassLoader());
+
+ deployment.deployRenderSets(runtimeContext, renderSetsMetaData);
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+ String appId = jbossPortletMetaData.getAppId();
+ deployment.undeployRenderSets(appId);
+ }
+
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/ThemeDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/ThemeDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/ThemeDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme;
+
+import javax.servlet.ServletContext;
+
+import org.jboss.beans.metadata.api.annotations.Install;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.portal.deployer.parsing.MergedPortletParsingDeployer;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.deployer.portal.webapp.WebAppContextDeployer;
+import org.jboss.portal.deployer.portlet.PortletDeployer;
+import org.jboss.portal.deployer.theme.container.ThemeDeployment;
+import org.jboss.portal.metadata.jboss.portlet.JBossPortletAppMetaData;
+import org.jboss.portal.metadata.theme.PortalThemesMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ThemeDeployer extends AbstractComponentDeployer
+{
+
+ ThemeDeployment deployment;
+
+ public ThemeDeployer()
+ {
+ this.setAllInputs(false);
+ this.setInput(PortalThemesMetaData.class);
+ this.addInput(PortletDeployer.PORLET_DEPLOYED);
+ this.addInput(MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT);
+ this.addInput(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT);
+ this.setStage(DeploymentStages.INSTALLED);
+ }
+
+ @Install
+ public void addDeployment(ThemeDeployment deployment)
+ {
+ this.deployment = deployment;
+ }
+
+ @Override
+ public void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ PortalThemesMetaData themesMetaData = unit.getAttachment(PortalThemesMetaData.class);
+
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+
+ String appId = jbossPortletMetaData.getAppId();
+ ServletContext servletContext = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_SERVLET_CONTEXT_ATTACHMENT,
+ ServletContext.class);
+ String contextPath = unit.getAttachment(WebAppContextDeployer.PORTLET_APP_CONTEXT_PATH_ATTACHMENT, String.class);
+
+ RuntimeContext runtimeContext = new RuntimeContext(appId, servletContext, contextPath, unit.getClassLoader());
+
+ deployment.deployThemes(runtimeContext, themesMetaData);
+ }
+
+ @Override
+ public void internalUndeploy(DeploymentUnit unit)
+ {
+ JBossPortletAppMetaData jbossPortletMetaData = unit.getAttachment(
+ MergedPortletParsingDeployer.PORTLET_MERGED_ATTACHMENT_NAME, JBossPortletAppMetaData.class);
+ String appId = jbossPortletMetaData.getAppId();
+ deployment.undeployThemes(appId);
+ }
+
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/LayoutDeployment.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/LayoutDeployment.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/LayoutDeployment.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.container;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.metadata.layout.PortalLayoutsMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface LayoutDeployment
+{
+
+ public void deployLayouts(RuntimeContext runtimeContext, PortalLayoutsMetaData portalLayouts)
+ throws DeploymentException;
+
+ public void undeployLayouts(String appId);
+
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/RenderSetDeployment.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/RenderSetDeployment.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/RenderSetDeployment.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.container;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.metadata.renderset.PortalRenderSetsMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface RenderSetDeployment
+{
+
+ public void deployRenderSets(RuntimeContext runtimeContext, PortalRenderSetsMetaData portalLayouts)
+ throws DeploymentException;
+
+ public void undeployRenderSets(String appId);
+
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/ThemeDeployment.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/ThemeDeployment.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/container/ThemeDeployment.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.container;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.portal.deployer.portal.RuntimeContext;
+import org.jboss.portal.metadata.theme.PortalThemesMetaData;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public interface ThemeDeployment
+{
+ public void deployThemes(RuntimeContext runtimeContext, PortalThemesMetaData portalThemes)
+ throws DeploymentException;
+
+ public void undeployThemes(String appId);
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalLayoutParsingDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalLayoutParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalLayoutParsingDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.parsing;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.parsing.PortalResolverDeployer;
+import org.jboss.portal.metadata.layout.PortalLayoutsMetaData;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalLayoutParsingDeployer extends PortalResolverDeployer<PortalLayoutsMetaData>
+{
+
+ public PortalLayoutParsingDeployer()
+ {
+ super(PortalLayoutsMetaData.class);
+ setSuffix("-layouts.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected PortalLayoutsMetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortalLayoutsMetaData root)
+ throws Exception
+ {
+ PortalLayoutsMetaData layouts = (PortalLayoutsMetaData) super.parse(unit, file, root);
+ return layouts;
+ }
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalRenderSetParsingDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalRenderSetParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalRenderSetParsingDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,59 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.parsing;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.parsing.PortalResolverDeployer;
+import org.jboss.portal.metadata.renderset.PortalRenderSetsMetaData;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalRenderSetParsingDeployer extends PortalResolverDeployer<PortalRenderSetsMetaData>
+{
+
+ public PortalRenderSetParsingDeployer()
+ {
+ super(PortalRenderSetsMetaData.class);
+ setSuffix("-renderSet.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected PortalRenderSetsMetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortalRenderSetsMetaData root)
+ throws Exception
+ {
+ PortalRenderSetsMetaData rendersets = (PortalRenderSetsMetaData) super.parse(unit, file, root);
+ return rendersets;
+ }
+}
Added: modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalThemeParsingDeployer.java
===================================================================
--- modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalThemeParsingDeployer.java (rev 0)
+++ modules/deployer/trunk/theme/src/main/java/org/jboss/portal/deployer/theme/parsing/PortalThemeParsingDeployer.java 2009-03-27 20:49:41 UTC (rev 13094)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated 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.portal.deployer.theme.parsing;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.portal.deployer.parsing.PortalResolverDeployer;
+import org.jboss.portal.metadata.theme.PortalThemesMetaData;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortalThemeParsingDeployer extends PortalResolverDeployer<PortalThemesMetaData>
+{
+
+ public PortalThemeParsingDeployer()
+ {
+ super(PortalThemesMetaData.class);
+ setSuffix("-themes.xml");
+ }
+
+ public void setXmlPath(String xmlPath)
+ {
+ this.setName(xmlPath);
+ }
+
+ public String getXmlPath()
+ {
+ return getName();
+ }
+
+ protected PortalThemesMetaData parse(VFSDeploymentUnit unit, VirtualFile file, PortalThemesMetaData root)
+ throws Exception
+ {
+ PortalThemesMetaData themes = (PortalThemesMetaData) super.parse(unit, file, root);
+ return themes;
+ }
+
+}
15 years, 2 months