Author: hoang_to
Date: 2009-10-29 23:49:30 -0400 (Thu, 29 Oct 2009)
New Revision: 448
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinResource.java
Removed:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinSkinning.java
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/AbstractTaskXMLBinding.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/SkinConfigParser.java
Log:
PORTAL-131: Javascript deployment
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/AbstractTaskXMLBinding.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/AbstractTaskXMLBinding.java 2009-10-30
01:43:55 UTC (rev 447)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/AbstractTaskXMLBinding.java 2009-10-30
03:49:30 UTC (rev 448)
@@ -46,7 +46,7 @@
@Override
public AbstractSkinTask xmlToTask(Element element)
{
- if (!element.getTagName().equals(GateinSkinning.PORTAl_SKIN_TAG))
+ if (!element.getTagName().equals(GateinResource.PORTAl_SKIN_TAG))
{
return null;
}
@@ -59,7 +59,7 @@
private void bindingCSSPath(PortalSkinTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.CSS_PATH_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.CSS_PATH_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -70,7 +70,7 @@
private void bindingSkinName(PortalSkinTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.SKIN_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.SKIN_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -86,7 +86,7 @@
@Override
public AbstractSkinTask xmlToTask(Element element)
{
- if (!element.getTagName().equals(GateinSkinning.WINDOW_STYLE_TAG))
+ if (!element.getTagName().equals(GateinResource.WINDOW_STYLE_TAG))
{
return null;
}
@@ -100,7 +100,7 @@
private void bindingStyleName(ThemeTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.STYLE_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.STYLE_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -111,7 +111,7 @@
private void bindingThemeNames(ThemeTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.THEME_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.THEME_NAME_TAG);
if (nodes == null)
{
return;
@@ -128,7 +128,7 @@
@Override
public AbstractSkinTask xmlToTask(Element element)
{
- if (!element.getTagName().equals(GateinSkinning.PORTLET_SKIN_TAG))
+ if (!element.getTagName().equals(GateinResource.PORTLET_SKIN_TAG))
{
return null;
}
@@ -142,7 +142,7 @@
private void bindingApplicationName(PortletSkinTask task, Element element)
{
- NodeList nodes =
element.getElementsByTagName(GateinSkinning.APPLICATION_NAME_TAG);
+ NodeList nodes =
element.getElementsByTagName(GateinResource.APPLICATION_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -153,7 +153,7 @@
private void bindingPortletName(PortletSkinTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.PORTLET_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.PORTLET_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -164,7 +164,7 @@
private void bindingCSSPath(PortletSkinTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.CSS_PATH_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.CSS_PATH_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
@@ -175,7 +175,7 @@
private void bindingSkinName(PortletSkinTask task, Element element)
{
- NodeList nodes = element.getElementsByTagName(GateinSkinning.SKIN_NAME_TAG);
+ NodeList nodes = element.getElementsByTagName(GateinResource.SKIN_NAME_TAG);
if (nodes == null || nodes.getLength() < 1)
{
return;
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinResource.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinResource.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinResource.java 2009-10-30
03:49:30 UTC (rev 448)
@@ -0,0 +1,54 @@
+/**
+ * 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.skin.config.xml;
+
+/**
+ *
+ * Created by eXoPlatform SAS
+ *
+ * Author: Minh Hoang TO - hoang281283(a)gmail.com
+ *
+ * Sep 17, 2009
+ */
+public interface GateinResource
+{
+
+ final public static String SKIN_DEF_TAG = "skin-def";
+
+ final public static String SKIN_NAME_TAG = "skin-name";
+
+ 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";
+}
Deleted:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinSkinning.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinSkinning.java 2009-10-30
01:43:55 UTC (rev 447)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/GateinSkinning.java 2009-10-30
03:49:30 UTC (rev 448)
@@ -1,54 +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.skin.config.xml;
-
-/**
- *
- * Created by eXoPlatform SAS
- *
- * Author: Minh Hoang TO - hoang281283(a)gmail.com
- *
- * Sep 17, 2009
- */
-public interface GateinSkinning
-{
-
- final public static String SKIN_DEF_TAG = "skin-def";
-
- final public static String SKIN_NAME_TAG = "skin-name";
-
- 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";
-}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/SkinConfigParser.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/SkinConfigParser.java 2009-10-30
01:43:55 UTC (rev 447)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/skin/config/xml/SkinConfigParser.java 2009-10-30
03:49:30 UTC (rev 448)
@@ -50,9 +50,9 @@
static
{
- allBindings.put(GateinSkinning.PORTAl_SKIN_TAG, new
AbstractTaskXMLBinding.PortalSkinTaskXMLBinding());
- allBindings.put(GateinSkinning.PORTLET_SKIN_TAG, new
AbstractTaskXMLBinding.PortletSkinTaskXMLBinding());
- allBindings.put(GateinSkinning.WINDOW_STYLE_TAG, new
AbstractTaskXMLBinding.ThemeTaskXMLBinding());
+ allBindings.put(GateinResource.PORTAl_SKIN_TAG, new
AbstractTaskXMLBinding.PortalSkinTaskXMLBinding());
+ allBindings.put(GateinResource.PORTLET_SKIN_TAG, new
AbstractTaskXMLBinding.PortletSkinTaskXMLBinding());
+ allBindings.put(GateinResource.WINDOW_STYLE_TAG, new
AbstractTaskXMLBinding.ThemeTaskXMLBinding());
}
public static void processConfigResource(InputStream is, SkinService skinService,
ServletContext scontext)
@@ -86,9 +86,9 @@
List<AbstractSkinTask> tasks = new ArrayList<AbstractSkinTask>();
Element docElement = document.getDocumentElement();
- fetchTasksByTagName(GateinSkinning.PORTAl_SKIN_TAG, docElement, tasks);
- fetchTasksByTagName(GateinSkinning.PORTLET_SKIN_TAG, docElement, tasks);
- fetchTasksByTagName(GateinSkinning.WINDOW_STYLE_TAG, docElement, tasks);
+ fetchTasksByTagName(GateinResource.PORTAl_SKIN_TAG, docElement, tasks);
+ fetchTasksByTagName(GateinResource.PORTLET_SKIN_TAG, docElement, tasks);
+ fetchTasksByTagName(GateinResource.WINDOW_STYLE_TAG, docElement, tasks);
return tasks;
}