[portal-commits] JBoss Portal SVN: r13094 - in modules/deployer/trunk: theme and 10 other directories.
portal-commits at lists.jboss.org
portal-commits at lists.jboss.org
Fri Mar 27 16:49:41 EDT 2009
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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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;
+ }
+
+}
More information about the portal-commits
mailing list