Author: julien_viet
Date: 2010-07-22 09:03:34 -0400 (Thu, 22 Jul 2010)
New Revision: 3684
Added:
portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd
portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/Image.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ImageType.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0.xml
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_1.xml
Removed:
portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd
portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/Image.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ImageType.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
portal/trunk/component/resources/pom.xml
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/SkinConfigTask.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/ThemeTask.java
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
portal/trunk/component/web/pom.xml
portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
portal/trunk/packaging/jboss-as/ear/pom.xml
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
portal/trunk/pom.xml
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
Log:
GTNPORTAL-1370: Move resource related code to the component.resource module
Deleted: portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd 2010-07-22
12:06:19 UTC (rev 3683)
+++ portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,117 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Copyright (C) 2009 eXo Platform SAS.
-
- 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.
-
--->
-
-<xs:schema
-
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_0&q...
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0"
-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <!-- The root element type that contains the various resource declarations -->
- <xs:element name="gatein-resources">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="portal-skin" type="portal-skin" />
- <xs:element name="portlet-skin" type="portlet-skin" />
- <xs:element name="window-style" type="window-style" />
- <xs:element name="javascript" type="javascript" />
- <xs:element name="resource-bundle" type="resource-bundle"
/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <!-- Declares a portal skin resource -->
- <xs:complexType name="portal-skin">
- <xs:sequence>
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a portlet skin resource -->
- <xs:complexType name="portlet-skin">
- <xs:sequence>
- <!-- The portlet application name -->
- <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The portlet name -->
- <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The name of the skin to load -->
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The css path of the skin relative to the application context -->
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- Overwrite -->
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a window style -->
- <xs:complexType name="window-style" mixed="true">
- <xs:sequence>
-
- <!-- The window style name -->
- <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The window style theme -->
- <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- The window style theme -->
- <xs:complexType name="style-theme">
- <xs:sequence>
- <!-- The theme name -->
- <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a javascript resource -->
- <xs:complexType name="javascript">
- <xs:sequence>
- <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="param">
- <xs:sequence>
- <!-- The javascript module -->
- <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript path -->
- <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript priority -->
- <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a resource bundle -->
- <xs:complexType name="resource-bundle">
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Deleted: portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd 2010-07-22
12:06:19 UTC (rev 3683)
+++ portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,116 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
- ~
- ~ 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.
- -->
-
-<xs:schema
-
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_1&q...
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1"
-
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0">
-
- <!-- The root element type that contains the various resource declarations -->
- <xs:element name="gatein-resources">
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="portal-skin" type="portal-skin" />
- <xs:element name="portlet-skin" type="portlet-skin" />
- <xs:element name="window-style" type="window-style" />
- <xs:element name="javascript" type="javascript" />
- <xs:element name="resource-bundle" type="resource-bundle"
/>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <!-- Declares a portal skin resource -->
- <xs:complexType name="portal-skin">
- <xs:sequence>
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="skin-module" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a portlet skin resource -->
- <xs:complexType name="portlet-skin">
- <xs:sequence>
- <!-- The portlet application name -->
- <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The portlet name -->
- <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The name of the skin to load -->
- <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The css path of the skin relative to the application context -->
- <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- Overwrite -->
- <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a window style -->
- <xs:complexType name="window-style" mixed="true">
- <xs:sequence>
-
- <!-- The window style name -->
- <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The window style theme -->
- <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- The window style theme -->
- <xs:complexType name="style-theme">
- <xs:sequence>
- <!-- The theme name -->
- <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a javascript resource -->
- <xs:complexType name="javascript">
- <xs:sequence>
- <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="param">
- <xs:sequence>
- <!-- The javascript module -->
- <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript path -->
- <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
-
- <!-- The javascript priority -->
- <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
- </xs:sequence>
- </xs:complexType>
-
- <!-- Declares a resource bundle -->
- <xs:complexType name="resource-bundle">
- </xs:complexType>
-
-</xs:schema>
\ No newline at end of file
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -59,7 +59,5 @@
{
assertHash("d0591b0a022a0c2929e1aed8979857cd",
"gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79",
"gatein_objects_1_1.xsd");
- assertHash("c68ea6831c3d24a242f63abd2db261a6",
"gatein_resources_1_0.xsd");
- assertHash("c55b7e0dc8ae23e2d34430b38260cd96",
"gatein_resources_1_1.xsd");
}
}
Deleted:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,334 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
- ~
- ~ 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.
- -->
-<gatein-resources
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0
http://www.gatein.org/xml/ns/gatein_resources_1_0"
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
-
- <!-- Portal skins -->
- <portal-skin>
- <skin-name>Default</skin-name>
- <skin-module>MyModule</skin-module>
- <css-path>/skin/Stylesheet.css</css-path>
- </portal-skin>
-
- <!-- BannerPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>BannerPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- FooterPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>FooterPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- Simple window style -->
- <window-style>
- <style-name>Simple</style-name>
- <style-theme>
- <theme-name>SimpleBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimplePink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- RoundConer window style -->
- <window-style>
- <style-name>RoundConer</style-name>
- <style-theme>
- <theme-name>RoundConerBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- Shadow window style -->
- <window-style>
- <style-name>Shadow</style-name>
- <style-theme>
- <theme-name>ShadowBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- MacStyle window style -->
- <window-style>
- <style-name>MacStyle</style-name>
- <style-theme>
- <theme-name>MacTheme</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGray</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGreenSteel</theme-name>
- </style-theme>
- </window-style>
-
- <!-- VistaStyle window style -->
- <window-style>
- <style-name>VistaStyle</style-name>
- <style-theme>
- <theme-name>VistaTheme</theme-name>
- </style-theme>
- </window-style>
-
- <javascript>
- <param>
- <js-module>eXo</js-module>
- <js-path>/javascript/eXo.js</js-path>
- <js-priority>0</js-priority>
- </param>
- </javascript>
-
- <!-- CORE Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.core.Utils</js-module>
- <js-path>/javascript/eXo/core/Util.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.DOMUtil</js-module>
- <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.Browser</js-module>
- <js-path>/javascript/eXo/core/Browser.js</js-path>
- <js-priority>2</js-priority>
- </param>
- <param>
- <js-module>eXo.core.MouseEventManager</js-module>
- <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.UIMaskLayer</js-module>
- <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Skin</js-module>
- <js-path>/javascript/eXo/core/Skin.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop</js-module>
- <js-path>/javascript/eXo/core/DragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop2</js-module>
- <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Topic</js-module>
- <js-path>/javascript/eXo/core/Topic.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.JSON</js-module>
- <js-path>/javascript/eXo/core/JSON.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Cometd</js-module>
- <js-path>/javascript/eXo/core/Cometd.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Spliter</js-module>
- <js-path>/javascript/eXo/core/Spliter.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Notification</js-module>
- <js-path>/javascript/eXo/core/Notification.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Loader</js-module>
- <js-path>/javascript/eXo/core/Loader.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.I18n</js-module>
- <js-path>/javascript/eXo/core/I18n.js</js-path>
- </param>
- </javascript>
-
- <!-- Gadget Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.gadget.UIGadget</js-module>
- <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
- </param>
- </javascript>
-
- <!-- WebUI Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.webui.UIItemSelector</js-module>
- <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIForm</js-module>
- <js-path>/javascript/eXo/webui/UIForm.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopup</js-module>
- <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupSelectCategory</js-module>
- <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupWindow</js-module>
- <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIHorizontalTabs</js-module>
- <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDropDownControl</js-module>
- <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
- <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
- <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboard</js-module>
- <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboardUtil</js-module>
- <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UINotification</js-module>
- <js-path>/javascript/eXo/webui/UINotification.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIUserSelector</js-module>
- <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIColorPicker</js-module>
- <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
- </param>
- </javascript>
-
- <!-- Portal Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.portal.PortalHttpRequest</js-module>
- <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortal</js-module>
- <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalControl</js-module>
- <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.PortalDragDrop</js-module>
- <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalNavigation</js-module>
- <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIMaskWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIBrowseContent</js-module>
- <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
- </param>
- </javascript>
-
- <javascript>
- <param>
- <js-module>eXo.webui.UIPortlet</js-module>
- <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
- </param>
- </javascript>
-</gatein-resources>
Deleted:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,332 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
- ~
- ~ 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.
- -->
-<gatein-resources
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0
http://www.gatein.org/xml/ns/gatein_resources_1_0"
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
-
- <!-- Portal skins -->
- <portal-skin>
- <skin-name>Default</skin-name>
- <css-path>/skin/Stylesheet.css</css-path>
- </portal-skin>
-
- <!-- BannerPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>BannerPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- FooterPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>FooterPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- Simple window style -->
- <window-style>
- <style-name>Simple</style-name>
- <style-theme>
- <theme-name>SimpleBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimplePink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- RoundConer window style -->
- <window-style>
- <style-name>RoundConer</style-name>
- <style-theme>
- <theme-name>RoundConerBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- Shadow window style -->
- <window-style>
- <style-name>Shadow</style-name>
- <style-theme>
- <theme-name>ShadowBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- MacStyle window style -->
- <window-style>
- <style-name>MacStyle</style-name>
- <style-theme>
- <theme-name>MacTheme</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGray</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGreenSteel</theme-name>
- </style-theme>
- </window-style>
-
- <!-- VistaStyle window style -->
- <window-style>
- <style-name>VistaStyle</style-name>
- <style-theme>
- <theme-name>VistaTheme</theme-name>
- </style-theme>
- </window-style>
-
- <javascript>
- <param>
- <js-module>eXo</js-module>
- <js-path>/javascript/eXo.js</js-path>
- <js-priority>0</js-priority>
- </param>
- </javascript>
-
- <!-- CORE Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.core.Utils</js-module>
- <js-path>/javascript/eXo/core/Util.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.DOMUtil</js-module>
- <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.Browser</js-module>
- <js-path>/javascript/eXo/core/Browser.js</js-path>
- <js-priority>2</js-priority>
- </param>
- <param>
- <js-module>eXo.core.MouseEventManager</js-module>
- <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.UIMaskLayer</js-module>
- <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Skin</js-module>
- <js-path>/javascript/eXo/core/Skin.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop</js-module>
- <js-path>/javascript/eXo/core/DragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop2</js-module>
- <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Topic</js-module>
- <js-path>/javascript/eXo/core/Topic.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.JSON</js-module>
- <js-path>/javascript/eXo/core/JSON.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Cometd</js-module>
- <js-path>/javascript/eXo/core/Cometd.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Spliter</js-module>
- <js-path>/javascript/eXo/core/Spliter.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Notification</js-module>
- <js-path>/javascript/eXo/core/Notification.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Loader</js-module>
- <js-path>/javascript/eXo/core/Loader.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.I18n</js-module>
- <js-path>/javascript/eXo/core/I18n.js</js-path>
- </param>
- </javascript>
-
- <!-- Gadget Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.gadget.UIGadget</js-module>
- <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
- </param>
- </javascript>
-
- <!-- WebUI Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.webui.UIItemSelector</js-module>
- <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIForm</js-module>
- <js-path>/javascript/eXo/webui/UIForm.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopup</js-module>
- <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupSelectCategory</js-module>
- <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupWindow</js-module>
- <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIHorizontalTabs</js-module>
- <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDropDownControl</js-module>
- <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
- <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
- <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboard</js-module>
- <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboardUtil</js-module>
- <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UINotification</js-module>
- <js-path>/javascript/eXo/webui/UINotification.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIUserSelector</js-module>
- <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIColorPicker</js-module>
- <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
- </param>
- </javascript>
-
- <!-- Portal Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.portal.PortalHttpRequest</js-module>
- <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortal</js-module>
- <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalControl</js-module>
- <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.PortalDragDrop</js-module>
- <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalNavigation</js-module>
- <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIMaskWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIBrowseContent</js-module>
- <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
- </param>
- </javascript>
-
- <javascript>
- <param>
- <js-module>eXo.webui.UIPortlet</js-module>
- <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
- </param>
- </javascript>
-</gatein-resources>
Deleted:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,334 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
- ~
- ~ 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.
- -->
-<gatein-resources
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_1
http://www.gatein.org/xml/ns/gatein_resources_1_1"
-
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1">
-
- <!-- Portal skins -->
- <portal-skin>
- <skin-name>Default</skin-name>
- <skin-module>MyModule</skin-module>
- <css-path>/skin/Stylesheet.css</css-path>
- </portal-skin>
-
- <!-- BannerPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>BannerPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- FooterPortlet skins -->
-
- <portlet-skin>
- <application-name>web</application-name>
- <portlet-name>FooterPortlet</portlet-name>
- <skin-name>Default</skin-name>
- <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
- </portlet-skin>
-
- <!-- Simple window style -->
- <window-style>
- <style-name>Simple</style-name>
- <style-theme>
- <theme-name>SimpleBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimplePink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>SimpleGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- RoundConer window style -->
- <window-style>
- <style-name>RoundConer</style-name>
- <style-theme>
- <theme-name>RoundConerBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>RoundConerGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- Shadow window style -->
- <window-style>
- <style-name>Shadow</style-name>
- <style-theme>
- <theme-name>ShadowBlue</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowViolet</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowOrange</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowPink</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>ShadowGreen</theme-name>
- </style-theme>
- </window-style>
-
- <!-- MacStyle window style -->
- <window-style>
- <style-name>MacStyle</style-name>
- <style-theme>
- <theme-name>MacTheme</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGray</theme-name>
- </style-theme>
- <style-theme>
- <theme-name>MacGreenSteel</theme-name>
- </style-theme>
- </window-style>
-
- <!-- VistaStyle window style -->
- <window-style>
- <style-name>VistaStyle</style-name>
- <style-theme>
- <theme-name>VistaTheme</theme-name>
- </style-theme>
- </window-style>
-
- <javascript>
- <param>
- <js-module>eXo</js-module>
- <js-path>/javascript/eXo.js</js-path>
- <js-priority>0</js-priority>
- </param>
- </javascript>
-
- <!-- CORE Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.core.Utils</js-module>
- <js-path>/javascript/eXo/core/Util.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.DOMUtil</js-module>
- <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
- <js-priority>1</js-priority>
- </param>
- <param>
- <js-module>eXo.core.Browser</js-module>
- <js-path>/javascript/eXo/core/Browser.js</js-path>
- <js-priority>2</js-priority>
- </param>
- <param>
- <js-module>eXo.core.MouseEventManager</js-module>
- <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.UIMaskLayer</js-module>
- <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Skin</js-module>
- <js-path>/javascript/eXo/core/Skin.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop</js-module>
- <js-path>/javascript/eXo/core/DragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.DragDrop2</js-module>
- <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Topic</js-module>
- <js-path>/javascript/eXo/core/Topic.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.JSON</js-module>
- <js-path>/javascript/eXo/core/JSON.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Cometd</js-module>
- <js-path>/javascript/eXo/core/Cometd.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Spliter</js-module>
- <js-path>/javascript/eXo/core/Spliter.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Notification</js-module>
- <js-path>/javascript/eXo/core/Notification.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.Loader</js-module>
- <js-path>/javascript/eXo/core/Loader.js</js-path>
- </param>
- <param>
- <js-module>eXo.core.I18n</js-module>
- <js-path>/javascript/eXo/core/I18n.js</js-path>
- </param>
- </javascript>
-
- <!-- Gadget Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.gadget.UIGadget</js-module>
- <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
- </param>
- </javascript>
-
- <!-- WebUI Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.webui.UIItemSelector</js-module>
- <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIForm</js-module>
- <js-path>/javascript/eXo/webui/UIForm.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopup</js-module>
- <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupSelectCategory</js-module>
- <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupWindow</js-module>
- <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIHorizontalTabs</js-module>
- <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDropDownControl</js-module>
- <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
- <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
- <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
- <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboard</js-module>
- <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIDashboardUtil</js-module>
- <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UINotification</js-module>
- <js-path>/javascript/eXo/webui/UINotification.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIUserSelector</js-module>
- <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UICombobox</js-module>
- <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
- </param>
- <param>
- <js-module>eXo.webui.UIColorPicker</js-module>
- <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
- </param>
- </javascript>
-
- <!-- Portal Javascripts -->
- <javascript>
- <param>
- <js-module>eXo.portal.PortalHttpRequest</js-module>
- <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortal</js-module>
- <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalControl</js-module>
- <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.PortalDragDrop</js-module>
- <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIPortalNavigation</js-module>
- <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIMaskWorkspace</js-module>
- <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
- </param>
- <param>
- <js-module>eXo.portal.UIBrowseContent</js-module>
- <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
- </param>
- </javascript>
-
- <javascript>
- <param>
- <js-module>eXo.webui.UIPortlet</js-module>
- <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
- </param>
- </javascript>
-</gatein-resources>
Modified: portal/trunk/component/resources/pom.xml
===================================================================
--- portal/trunk/component/resources/pom.xml 2010-07-22 12:06:19 UTC (rev 3683)
+++ portal/trunk/component/resources/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
@@ -79,6 +79,16 @@
</dependency>
<dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
Copied: portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd (from rev
3675, portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd)
===================================================================
--- portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd
(rev 0)
+++ portal/trunk/component/resources/src/main/java/gatein_resources_1_0.xsd 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,117 @@
+<?xml version="1.0"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ 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.
+
+-->
+
+<xs:schema
+
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_0&q...
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle"
/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Copied: portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd (from rev
3675, portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd)
===================================================================
--- portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd
(rev 0)
+++ portal/trunk/component/resources/src/main/java/gatein_resources_1_1.xsd 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+
+<xs:schema
+
targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_1&q...
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle"
/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="skin-module" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Copied:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/Image.java
(from rev 3682,
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/Image.java)
===================================================================
---
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/Image.java
(rev 0)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/Image.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.application;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+class Image
+{
+
+ final ImageType type;
+
+ final byte[] bytes;
+
+ public Image(ImageType type, byte[] bytes)
+ {
+ this.type = type;
+ this.bytes = bytes;
+ }
+}
Copied:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ImageType.java
(from rev 3682,
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ImageType.java)
===================================================================
---
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ImageType.java
(rev 0)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ImageType.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,81 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.application;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+enum ImageType {
+
+ GIF("gif"), PNG("png"), JPG("jpg");
+
+ private final char x, y, z;
+
+ private final char X, Y, Z;
+
+ private final String format;
+
+ private final String mimeType;
+
+ ImageType(String id)
+ {
+ this.x = id.charAt(0);
+ this.y = id.charAt(1);
+ this.z = id.charAt(2);
+ this.X = Character.toUpperCase(x);
+ this.Y = Character.toUpperCase(y);
+ this.Z = Character.toUpperCase(z);
+ this.format = id;
+ this.mimeType = "image/" + id;
+ }
+
+ public String getFormat()
+ {
+ return format;
+ }
+
+ public boolean matches(String s)
+ {
+ int len = s.length();
+ if (len-- > 4)
+ {
+ char c = s.charAt(len--);
+ if (c == z || c == Z)
+ {
+ char b = s.charAt(len--);
+ if (b == y || b == Y)
+ {
+ char a = s.charAt(len);
+ if (a == x || a == X)
+ {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public String getMimeType()
+ {
+ return mimeType;
+ }
+}
Copied:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
(from rev 3682,
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java)
===================================================================
---
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
(rev 0)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,244 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.application;
+
+import org.exoplatform.commons.utils.*;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractFilter;
+import org.exoplatform.portal.resource.ResourceRenderer;
+import org.exoplatform.portal.resource.SkinService;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLDecoder;
+import java.nio.charset.Charset;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.FutureTask;
+
+import javax.imageio.ImageIO;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public class ResourceRequestFilter extends AbstractFilter
+{
+
+ protected static Log log = ExoLogger.getLogger(ResourceRequestFilter.class);
+
+ private static final Charset UTF_8 = Charset.forName("UTF-8");
+
+ private FilterConfig cfg;
+
+ private ImageType[] imageTypes = ImageType.values();
+
+ private ConcurrentMap<String, FutureTask<Image>> mirroredImageCache = new
ConcurrentHashMap<String, FutureTask<Image>>();
+
+ public void afterInit(FilterConfig filterConfig)
+ {
+ cfg = filterConfig;
+ log.info("Cache eXo Resource at client: " +
!PropertyManager.isDevelopping());
+ }
+
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain
chain) throws IOException,
+ ServletException
+ {
+ HttpServletRequest httpRequest = (HttpServletRequest)request;
+ final String uri = URLDecoder.decode(httpRequest.getRequestURI(),
"UTF-8");
+ final HttpServletResponse httpResponse = (HttpServletResponse)response;
+ ExoContainer portalContainer = getContainer();
+ SkinService skinService =
(SkinService)portalContainer.getComponentInstanceOfType(SkinService.class);
+
+ //
+ if (uri.endsWith(".css"))
+ {
+ final OutputStream out = response.getOutputStream();
+ final BinaryOutput output = new BinaryOutput()
+ {
+ public Charset getCharset()
+ {
+ return UTF_8;
+ }
+ public void write(byte b) throws IOException
+ {
+ out.write(b);
+ }
+ public void write(byte[] bytes) throws IOException
+ {
+ out.write(bytes);
+ }
+ public void write(byte[] bytes, int off, int len) throws IOException
+ {
+ out.write(bytes, off, len);
+ }
+ };
+ ResourceRenderer renderer = new ResourceRenderer()
+ {
+ public BinaryOutput getOutput() throws IOException
+ {
+ return output;
+ }
+ public void setExpiration(long seconds)
+ {
+ if (seconds > 0)
+ {
+ httpResponse.addHeader("Cache-Control", "max-age="
+ seconds + ",s-maxage=" + seconds);
+ }
+ else
+ {
+ httpResponse.setHeader("Cache-Control",
"no-cache");
+ }
+ }
+ };
+
+ //
+ try
+ {
+ skinService.renderCSS(renderer, uri);
+ if (log.isDebugEnabled())
+ {
+ log.debug("Use a merged CSS: " + uri);
+ }
+ }
+ catch (Exception e)
+ {
+ log.error("Could not render css " + uri, e);
+ httpResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ }
+ }
+ else
+ {
+
+ // Fast matching
+ final int len = uri.length();
+ if (len >= 7 && uri.charAt(len - 7) == '-' &&
uri.charAt(len - 6) == 'r' && uri.charAt(len - 5) == 't')
+ {
+ for (final ImageType imageType : imageTypes)
+ {
+ if (imageType.matches(uri))
+ {
+ final String resource =
+ uri.substring(httpRequest.getContextPath().length(), len - 7) +
uri.substring(len - 4);
+ FutureTask<Image> futureImg = mirroredImageCache.get(resource);
+ if (futureImg == null)
+ {
+ FutureTask<Image> tmp = new FutureTask<Image>(new
Callable<Image>()
+ {
+ public Image call() throws Exception
+ {
+ InputStream in =
cfg.getServletContext().getResourceAsStream(resource);
+ if (in == null)
+ {
+ return null;
+ }
+
+ //
+ BufferedImage img = ImageIO.read(in);
+ log.debug("Read image " + uri + " (" +
img.getWidth() + "," + img.getHeight() + ")");
+ AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
+ tx.translate(-img.getWidth(null), 0);
+ AffineTransformOp op = new AffineTransformOp(tx,
AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
+ img = op.filter(img, null);
+ log.debug("Mirrored image " + uri + " (" +
img.getWidth() + "," + img.getHeight() + ")");
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
+ ImageIO.write(img, imageType.getFormat(), baos);
+ baos.close();
+ return new Image(imageType, baos.toByteArray());
+ }
+ });
+
+ //
+ futureImg = mirroredImageCache.putIfAbsent(resource, tmp);
+ if (futureImg == null)
+ {
+ futureImg = tmp;
+ futureImg.run();
+ }
+ }
+
+ //
+ try
+ {
+ Image img = futureImg.get();
+ if (img != null)
+ {
+ httpResponse.setContentType(img.type.getMimeType());
+ httpResponse.setContentLength(img.bytes.length);
+ OutputStream out = httpResponse.getOutputStream();
+ out.write(img.bytes);
+ out.close();
+ }
+ else
+ {
+ mirroredImageCache.remove(resource);
+ httpResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
+ }
+ return;
+ }
+ catch (InterruptedException e)
+ {
+ // Find out what is relevant to do
+ e.printStackTrace();
+ }
+ catch (ExecutionException e)
+ {
+ // Cleanup
+ e.printStackTrace();
+ mirroredImageCache.remove(resource);
+ }
+ }
+ }
+ }
+
+ //
+ if (!PropertyManager.isDevelopping())
+ {
+ httpResponse.addHeader("Cache-Control",
"max-age=2592000,s-maxage=2592000");
+ }
+ else
+ {
+ if (uri.endsWith(".jstmpl") || uri.endsWith(".js"))
+ {
+ httpResponse.setHeader("Cache-Control", "no-cache");
+ }
+ if (log.isDebugEnabled())
+ log.debug(" Load Resource: " + uri);
+ }
+ chain.doFilter(request, response);
+ }
+ }
+
+ public void destroy()
+ {
+ }
+}
Copied: portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource
(from rev 3675,
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource)
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -18,7 +18,7 @@
*/
package org.exoplatform.portal.resource.config.tasks;
-import org.exoplatform.web.resource.config.xml.GateinResource;
+import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -27,8 +27,9 @@
* @version $Revision$
*/
-public abstract class AbstractSkinModule implements GateinResource
+public abstract class AbstractSkinModule
{
+
protected String skinName;
protected String cssPath;
protected boolean overwrite;
@@ -40,7 +41,7 @@
protected void bindingSkinName(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.SKIN_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.SKIN_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -50,7 +51,7 @@
protected void bindingCSSPath(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.CSS_PATH_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.CSS_PATH_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -60,7 +61,7 @@
protected void bindingOverwrite(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.OVERWRITE);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.OVERWRITE);
if (nodes == null || nodes.getLength() < 1)
{
return;
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -21,7 +21,7 @@
import org.exoplatform.portal.resource.SkinDependentManager;
import org.exoplatform.portal.resource.SkinService;
-import org.exoplatform.web.resource.config.xml.GateinResource;
+import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -53,7 +53,7 @@
private void bindingModuleName(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.SKIN_MODULE_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.SKIN_MODULE_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -61,7 +61,6 @@
moduleName = nodes.item(0).getFirstChild().getNodeValue();
}
- @Override
public void binding(Element elemt)
{
bindingCSSPath(elemt);
@@ -70,7 +69,6 @@
bindingOverwrite(elemt);
}
- @Override
public void execute(SkinService skinService, ServletContext scontext)
{
if (moduleName == null || skinName == null || cssPath == null)
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -21,7 +21,7 @@
import org.exoplatform.portal.resource.SkinDependentManager;
import org.exoplatform.portal.resource.SkinService;
-import org.exoplatform.web.resource.config.xml.GateinResource;
+import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -50,7 +50,7 @@
private void bindingApplicationName(Element element)
{
- NodeList nodes =
element.getElementsByTagName(GateinResource.APPLICATION_NAME_TAG);
+ NodeList nodes =
element.getElementsByTagName(SkinConfigParser.APPLICATION_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -61,7 +61,7 @@
private void bindingPortletName(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.PORTLET_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.PORTLET_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -80,7 +80,6 @@
this.portletName = _portletName;
}
- @Override
public void execute(SkinService skinService, ServletContext scontext)
{
if (portletName == null || skinName == null || cssPath == null)
@@ -104,7 +103,6 @@
SkinDependentManager.addSkinDeployedInApp(webApp, skinName);
}
- @Override
public void binding(Element elemt)
{
bindingApplicationName(elemt);
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/SkinConfigTask.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/tasks/SkinConfigTask.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/SkinConfigTask.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -20,6 +20,7 @@
package org.exoplatform.portal.resource.config.tasks;
import org.exoplatform.portal.resource.SkinService;
+import org.w3c.dom.Element;
import javax.servlet.ServletContext;
@@ -31,4 +32,6 @@
public interface SkinConfigTask
{
public void execute(SkinService skinService, ServletContext scontext);
+
+ public void binding(Element elemt);
}
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/ThemeTask.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/tasks/ThemeTask.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/ThemeTask.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -20,7 +20,7 @@
package org.exoplatform.portal.resource.config.tasks;
import org.exoplatform.portal.resource.SkinService;
-import org.exoplatform.web.resource.config.xml.GateinResource;
+import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -37,7 +37,7 @@
*
* Sep 16, 2009
*/
-public class ThemeTask implements GateinResource, SkinConfigTask
+public class ThemeTask implements SkinConfigTask
{
private String styleName;
@@ -51,7 +51,7 @@
private void bindingStyleName(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.STYLE_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.STYLE_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -62,7 +62,7 @@
private void bindingThemeNames(Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinResource.THEME_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.THEME_NAME_TAG);
if (nodes == null)
{
return;
@@ -84,14 +84,12 @@
this.styleName = _styleName;
}
- @Override
public void binding(Element elemt)
{
bindingStyleName(elemt);
bindingThemeNames(elemt);
}
- @Override
public void execute(SkinService skinService, ServletContext scontext)
{
if (styleName == null || themeNames.size() < 1)
Modified:
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2010-07-22
08:00:54 UTC (rev 3675)
+++
portal/trunk/component/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -26,8 +26,6 @@
import org.exoplatform.portal.resource.config.tasks.PortalSkinTask;
import org.exoplatform.portal.resource.config.tasks.PortletSkinTask;
import org.exoplatform.portal.resource.config.tasks.ThemeTask;
-import org.exoplatform.web.application.javascript.JavascriptTask;
-import org.exoplatform.web.resource.config.xml.GateinResource;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -62,6 +60,42 @@
/** . */
private static final XMLValidator VALIDATOR;
+ /** . */
+ final public static String OVERWRITE = "overwrite";
+
+ /** . */
+ final public static String SKIN_NAME_TAG = "skin-name";
+
+ /** . */
+ final public static String SKIN_MODULE_TAG = "skin-module";
+
+ /** . */
+ final public static String PORTAl_SKIN_TAG = "portal-skin";
+
+ /** . */
+ final public static String PORTLET_SKIN_TAG = "portlet-skin";
+
+ /** . */
+ final public static String PORTLET_NAME_TAG = "portlet-name";
+
+ /** . */
+ final public static String APPLICATION_NAME_TAG = "application-name";
+
+ /** . */
+ final public static String CSS_PATH_TAG = "css-path";
+
+ /** . */
+ final public static String WINDOW_STYLE_TAG = "window-style";
+
+ /** . */
+ final public static String STYLE_NAME_TAG = "style-name";
+
+ /** . */
+ final public static String STYLE_THEME_TAG = "style-theme";
+
+ /** . */
+ final public static String THEME_NAME_TAG = "theme-name";
+
static
{
Map<String, String> systemIdToResourcePath = new HashMap<String,
String>();
@@ -91,9 +125,9 @@
List<SkinConfigTask> tasks = new ArrayList<SkinConfigTask>();
Element docElement = document.getDocumentElement();
- fetchTasksByTagName(GateinResource.PORTAl_SKIN_TAG, docElement, tasks);
- fetchTasksByTagName(GateinResource.PORTLET_SKIN_TAG, docElement, tasks);
- fetchTasksByTagName(GateinResource.WINDOW_STYLE_TAG, docElement, tasks);
+ fetchTasksByTagName(PORTAl_SKIN_TAG, docElement, tasks);
+ fetchTasksByTagName(PORTLET_SKIN_TAG, docElement, tasks);
+ fetchTasksByTagName(WINDOW_STYLE_TAG, docElement, tasks);
return tasks;
}
@@ -106,15 +140,15 @@
private static void fetchTasksByTagName(String tagName, Element rootElement,
List<SkinConfigTask> tasks)
{
NodeList nodes = rootElement.getElementsByTagName(tagName);
- GateinResource task;
+ SkinConfigTask task;
for (int i = nodes.getLength() - 1; i >= 0; i--)
{
- task = elemtToTask(tagName);
+ task = (SkinConfigTask)elemtToTask(tagName);
if (task != null)
{
task.binding((Element)nodes.item(i));
- tasks.add((SkinConfigTask)task);
+ tasks.add(task);
}
}
}
@@ -122,17 +156,17 @@
/**
* Return a skin task associated to the <code>tagName</code> of an XML
element
*/
- private static GateinResource elemtToTask(String tagName)
+ private static SkinConfigTask elemtToTask(String tagName)
{
- if (tagName.equals(GateinResource.PORTAl_SKIN_TAG))
+ if (tagName.equals(PORTAl_SKIN_TAG))
{
return new PortalSkinTask();
}
- else if (tagName.equals(GateinResource.WINDOW_STYLE_TAG))
+ else if (tagName.equals(WINDOW_STYLE_TAG))
{
return new ThemeTask();
}
- else if (tagName.equals(GateinResource.PORTLET_SKIN_TAG))
+ else if (tagName.equals(PORTLET_SKIN_TAG))
{
return new PortletSkinTask();
}
Copied:
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
(from rev 3675,
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java)
===================================================================
---
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
(rev 0)
+++
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,39 @@
+package org.exoplatform.portal.resource;
+
+import junit.framework.TestCase;
+
+import org.exoplatform.commons.xml.DocumentSource;
+import org.exoplatform.portal.resource.config.tasks.SkinConfigTask;
+import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+
+public class TestGateInResourceParser extends TestCase
+{
+ public void testResources1_0() throws MalformedURLException
+ {
+
assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_0.xml");
+ }
+
+ public void testResources1_0WithSkinModule() throws MalformedURLException
+ {
+
assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml");
+ }
+
+ public void testResources1_1() throws MalformedURLException
+ {
+
assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_1.xml");
+ }
+
+ private void assertDescriptorCanBeLoaded(String descriptorPath) throws
MalformedURLException
+ {
+ URL url =
Thread.currentThread().getContextClassLoader().getResource(descriptorPath);
+ assertNotNull("The " + descriptorPath + " can not be found",
url);
+ DocumentSource source = DocumentSource.create(url);
+ List<SkinConfigTask> tasks = SkinConfigParser.fetchTasks(source);
+ assertNotNull("There are no tasks", tasks);
+ assertEquals(8, tasks.size());
+ }
+}
Added:
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java
===================================================================
---
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java
(rev 0)
+++
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal.resource;
+
+import junit.framework.TestCase;
+import org.gatein.common.io.IOTools;
+
+import java.io.InputStream;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+public class TestXSDCorruption extends TestCase
+{
+
+ private void assertHash(String expected, String resourcePath) throws Exception
+ {
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
+ assertNotNull(in);
+ byte[] bytes = IOTools.getBytes(in);
+ java.security.MessageDigest digester =
java.security.MessageDigest.getInstance("MD5");
+ digester.update(bytes);
+ StringBuilder sb = new StringBuilder();
+ for (byte b : digester.digest())
+ {
+ String hex = Integer.toHexString(b);
+ if (hex.length() == 1)
+ {
+ sb.append('0');
+ sb.append(hex.charAt(0));
+ }
+ else
+ {
+ sb.append(hex.substring(hex.length() - 2));
+ }
+ }
+ assertEquals(expected, sb.toString());
+ }
+
+ public void testGateInResources1_0() throws Exception
+ {
+ assertHash("c68ea6831c3d24a242f63abd2db261a6",
"gatein_resources_1_0.xsd");
+ assertHash("c55b7e0dc8ae23e2d34430b38260cd96",
"gatein_resources_1_1.xsd");
+ }
+}
\ No newline at end of file
Copied:
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
(from rev 3675,
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml)
===================================================================
---
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
(rev 0)
+++
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0
http://www.gatein.org/xml/ns/gatein_resources_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <skin-module>MyModule</skin-module>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
Copied:
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0.xml
(from rev 3675,
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml)
===================================================================
---
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0.xml
(rev 0)
+++
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_0.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0
http://www.gatein.org/xml/ns/gatein_resources_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
Copied:
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_1.xml
(from rev 3675,
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml)
===================================================================
---
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_1.xml
(rev 0)
+++
portal/trunk/component/resources/src/test/java/org/exoplatform/portal/resource/gatein-resources-1_1.xml 2010-07-22
13:03:34 UTC (rev 3684)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_1
http://www.gatein.org/xml/ns/gatein_resources_1_1"
+
xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <skin-module>MyModule</skin-module>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
Modified: portal/trunk/component/web/pom.xml
===================================================================
--- portal/trunk/component/web/pom.xml 2010-07-22 12:06:19 UTC (rev 3683)
+++ portal/trunk/component/web/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
@@ -74,11 +74,6 @@
<groupId>org.gatein.shindig</groupId>
<artifactId>shindig-gadgets</artifactId>
</dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <type>jar</type>
- </dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java
===================================================================
---
portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/GateinResource.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -31,28 +31,7 @@
*/
public interface GateinResource
{
- final public static String SKIN_NAME_TAG = "skin-name";
- final public static String SKIN_MODULE_TAG = "skin-module";
-
- final public static String PORTAl_SKIN_TAG = "portal-skin";
-
- final public static String PORTLET_SKIN_TAG = "portlet-skin";
-
- final public static String PORTLET_NAME_TAG = "portlet-name";
-
- final public static String APPLICATION_NAME_TAG = "application-name";
-
- final public static String CSS_PATH_TAG = "css-path";
-
- final public static String WINDOW_STYLE_TAG = "window-style";
-
- final public static String STYLE_NAME_TAG = "style-name";
-
- final public static String STYLE_THEME_TAG = "style-theme";
-
- final public static String THEME_NAME_TAG = "theme-name";
-
final public static String JAVA_SCRIPT_TAG = "javascript";
final public static String JAVA_SCRIPT_PARAM = "param";
@@ -60,9 +39,7 @@
final public static String JAVA_SCRIPT_MODULE = "js-module";
final public static String JAVA_SCRIPT_PATH = "js-path";
-
- final public static String OVERWRITE = "overwrite";
-
+
final public static String JAVA_SCRIPT_PRIORITY = "js-priority";
public void binding(Element elemt);
Modified: portal/trunk/packaging/jboss-as/ear/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-22 12:06:19 UTC (rev 3683)
+++ portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
@@ -130,6 +130,10 @@
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.framework</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.portlet</artifactId>
+ </dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.portal</artifactId>
Modified: portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
---
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-07-22
13:03:34 UTC (rev 3684)
@@ -140,9 +140,13 @@
new Project("org.exoplatform.portal",
"exo.portal.webui.framework", "jar", module.version).
addDependency(module.component.web);
+ module.webui.portlet =
+ new Project("org.exoplatform.portal", "exo.portal.webui.portlet",
"jar", module.version).
+ addDependency(module.webui.framework);
+
module.webui.core =
new Project("org.exoplatform.portal", "exo.portal.webui.core",
"jar", module.version).
- addDependency(module.webui.framework);
+ addDependency(module.webui.portlet);
module.webui.eXo =
new Project("org.exoplatform.portal", "exo.portal.webui.eXo",
"jar", module.version).
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-07-22 12:06:19 UTC (rev 3683)
+++ portal/trunk/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
@@ -427,6 +427,11 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.portlet</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.portal</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</dependency>
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,16 +1,16 @@
-/**
+/*
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
===================================================================
---
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,16 +1,16 @@
-/**
+/*
* Copyright (C) 2009 eXo Platform SAS.
- *
+ *
* 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
Deleted:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/Image.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/Image.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/Image.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,38 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * 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.exoplatform.portal.application;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-class Image
-{
-
- final ImageType type;
-
- final byte[] bytes;
-
- public Image(ImageType type, byte[] bytes)
- {
- this.type = type;
- this.bytes = bytes;
- }
-}
Deleted:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ImageType.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ImageType.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ImageType.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,81 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * 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.exoplatform.portal.application;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-enum ImageType {
-
- GIF("gif"), PNG("png"), JPG("jpg");
-
- private final char x, y, z;
-
- private final char X, Y, Z;
-
- private final String format;
-
- private final String mimeType;
-
- ImageType(String id)
- {
- this.x = id.charAt(0);
- this.y = id.charAt(1);
- this.z = id.charAt(2);
- this.X = Character.toUpperCase(x);
- this.Y = Character.toUpperCase(y);
- this.Z = Character.toUpperCase(z);
- this.format = id;
- this.mimeType = "image/" + id;
- }
-
- public String getFormat()
- {
- return format;
- }
-
- public boolean matches(String s)
- {
- int len = s.length();
- if (len-- > 4)
- {
- char c = s.charAt(len--);
- if (c == z || c == Z)
- {
- char b = s.charAt(len--);
- if (b == y || b == Y)
- {
- char a = s.charAt(len);
- if (a == x || a == X)
- {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- public String getMimeType()
- {
- return mimeType;
- }
-}
Deleted:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java 2010-07-22
12:06:19 UTC (rev 3683)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java 2010-07-22
13:03:34 UTC (rev 3684)
@@ -1,244 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * 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.exoplatform.portal.application;
-
-import org.exoplatform.commons.utils.*;
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.web.AbstractFilter;
-import org.exoplatform.portal.resource.ResourceRenderer;
-import org.exoplatform.portal.resource.SkinService;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
-import java.awt.geom.AffineTransform;
-import java.awt.image.AffineTransformOp;
-import java.awt.image.BufferedImage;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URLDecoder;
-import java.nio.charset.Charset;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.FutureTask;
-
-import javax.imageio.ImageIO;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-public class ResourceRequestFilter extends AbstractFilter
-{
-
- protected static Log log = ExoLogger.getLogger(ResourceRequestFilter.class);
-
- private static final Charset UTF_8 = Charset.forName("UTF-8");
-
- private FilterConfig cfg;
-
- private ImageType[] imageTypes = ImageType.values();
-
- private ConcurrentMap<String, FutureTask<Image>> mirroredImageCache = new
ConcurrentHashMap<String, FutureTask<Image>>();
-
- public void afterInit(FilterConfig filterConfig)
- {
- cfg = filterConfig;
- log.info("Cache eXo Resource at client: " +
!PropertyManager.isDevelopping());
- }
-
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain
chain) throws IOException,
- ServletException
- {
- HttpServletRequest httpRequest = (HttpServletRequest)request;
- final String uri = URLDecoder.decode(httpRequest.getRequestURI(),
"UTF-8");
- final HttpServletResponse httpResponse = (HttpServletResponse)response;
- ExoContainer portalContainer = getContainer();
- SkinService skinService =
(SkinService)portalContainer.getComponentInstanceOfType(SkinService.class);
-
- //
- if (uri.endsWith(".css"))
- {
- final OutputStream out = response.getOutputStream();
- final BinaryOutput output = new BinaryOutput()
- {
- public Charset getCharset()
- {
- return UTF_8;
- }
- public void write(byte b) throws IOException
- {
- out.write(b);
- }
- public void write(byte[] bytes) throws IOException
- {
- out.write(bytes);
- }
- public void write(byte[] bytes, int off, int len) throws IOException
- {
- out.write(bytes, off, len);
- }
- };
- ResourceRenderer renderer = new ResourceRenderer()
- {
- public BinaryOutput getOutput() throws IOException
- {
- return output;
- }
- public void setExpiration(long seconds)
- {
- if (seconds > 0)
- {
- httpResponse.addHeader("Cache-Control", "max-age="
+ seconds + ",s-maxage=" + seconds);
- }
- else
- {
- httpResponse.setHeader("Cache-Control",
"no-cache");
- }
- }
- };
-
- //
- try
- {
- skinService.renderCSS(renderer, uri);
- if (log.isDebugEnabled())
- {
- log.debug("Use a merged CSS: " + uri);
- }
- }
- catch (Exception e)
- {
- log.error("Could not render css " + uri, e);
- httpResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
- }
- }
- else
- {
-
- // Fast matching
- final int len = uri.length();
- if (len >= 7 && uri.charAt(len - 7) == '-' &&
uri.charAt(len - 6) == 'r' && uri.charAt(len - 5) == 't')
- {
- for (final ImageType imageType : imageTypes)
- {
- if (imageType.matches(uri))
- {
- final String resource =
- uri.substring(httpRequest.getContextPath().length(), len - 7) +
uri.substring(len - 4);
- FutureTask<Image> futureImg = mirroredImageCache.get(resource);
- if (futureImg == null)
- {
- FutureTask<Image> tmp = new FutureTask<Image>(new
Callable<Image>()
- {
- public Image call() throws Exception
- {
- InputStream in =
cfg.getServletContext().getResourceAsStream(resource);
- if (in == null)
- {
- return null;
- }
-
- //
- BufferedImage img = ImageIO.read(in);
- log.debug("Read image " + uri + " (" +
img.getWidth() + "," + img.getHeight() + ")");
- AffineTransform tx = AffineTransform.getScaleInstance(-1, 1);
- tx.translate(-img.getWidth(null), 0);
- AffineTransformOp op = new AffineTransformOp(tx,
AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
- img = op.filter(img, null);
- log.debug("Mirrored image " + uri + " (" +
img.getWidth() + "," + img.getHeight() + ")");
- ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
- ImageIO.write(img, imageType.getFormat(), baos);
- baos.close();
- return new Image(imageType, baos.toByteArray());
- }
- });
-
- //
- futureImg = mirroredImageCache.putIfAbsent(resource, tmp);
- if (futureImg == null)
- {
- futureImg = tmp;
- futureImg.run();
- }
- }
-
- //
- try
- {
- Image img = futureImg.get();
- if (img != null)
- {
- httpResponse.setContentType(img.type.getMimeType());
- httpResponse.setContentLength(img.bytes.length);
- OutputStream out = httpResponse.getOutputStream();
- out.write(img.bytes);
- out.close();
- }
- else
- {
- mirroredImageCache.remove(resource);
- httpResponse.setStatus(HttpServletResponse.SC_NOT_FOUND);
- }
- return;
- }
- catch (InterruptedException e)
- {
- // Find out what is relevant to do
- e.printStackTrace();
- }
- catch (ExecutionException e)
- {
- // Cleanup
- e.printStackTrace();
- mirroredImageCache.remove(resource);
- }
- }
- }
- }
-
- //
- if (!PropertyManager.isDevelopping())
- {
- httpResponse.addHeader("Cache-Control",
"max-age=2592000,s-maxage=2592000");
- }
- else
- {
- if (uri.endsWith(".jstmpl") || uri.endsWith(".js"))
- {
- httpResponse.setHeader("Cache-Control", "no-cache");
- }
- if (log.isDebugEnabled())
- log.debug(" Load Resource: " + uri);
- }
- chain.doFilter(request, response);
- }
- }
-
- public void destroy()
- {
- }
-}