gatein SVN: r3692 - in portal/trunk: component/web/src/main/java/org/exoplatform/web/command/handler and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-23 04:38:04 -0400 (Fri, 23 Jul 2010)
New Revision: 3692
Added:
portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/
portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java
portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java
Removed:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java
Log:
moving UploadHandler and DownloadHandler to the component.web module
Copied: portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java (from rev 3689, portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java)
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java (rev 0)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java 2010-07-23 08:38:04 UTC (rev 3692)
@@ -0,0 +1,109 @@
+/**
+ * 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.web.command.handler;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.download.DownloadResource;
+import org.exoplatform.download.DownloadService;
+import org.exoplatform.web.WebAppController;
+import org.exoplatform.web.command.Command;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by The eXo Platform SARL
+ * Author : LeBienThuy
+ * thuy.le(a)exoplatform.com
+ * Dec 9, 2006
+ */
+public class DownloadHandler extends Command
+{
+
+ private String resourceId;
+
+ @SuppressWarnings("unused")
+ public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
+ {
+ res.setHeader("Cache-Control", "private max-age=600, s-maxage=120");
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ DownloadService dservice = (DownloadService)container.getComponentInstanceOfType(DownloadService.class);
+ DownloadResource dresource = dservice.getDownloadResource(resourceId);
+ if (dresource == null)
+ {
+ res.setContentType("text/plain");
+ res.getWriter().write("NO DOWNDLOAD RESOURCE CONTENT OR YOU DO NOT HAVE THE RIGHT TO ACCESS THE CONTENT");
+ return;
+ }
+ String userAgent = req.getHeader("User-Agent");
+ if (dresource.getDownloadName() != null)
+ {
+ if (userAgent != null && userAgent.contains("MSIE"))
+ {
+ res.setHeader("Content-Disposition", "attachment;filename=\""
+ + URLEncoder.encode(dresource.getDownloadName(), "UTF-8") + "\"");
+ }
+ else
+ {
+ res.setHeader("Content-Disposition", "attachment; filename*=utf-8''"
+ + URLEncoder.encode(dresource.getDownloadName(), "UTF-8") + "");
+ }
+ }
+ res.setContentType(dresource.getResourceMimeType());
+ InputStream is = dresource.getInputStream();
+ try
+ {
+ optimalRead(is, res.getOutputStream());
+ }
+ catch (Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+
+ public String getResourceId()
+ {
+ return resourceId;
+ }
+
+ private static void optimalRead(InputStream is, OutputStream os) throws Exception
+ {
+ int bufferLength = 1024; //TODO: Better to compute bufferLength in term of -Xms, -Xmx properties
+ int readLength = 0;
+ while (readLength > -1)
+ {
+ byte[] chunk = new byte[bufferLength];
+ readLength = is.read(chunk);
+ if (readLength > 0)
+ {
+ os.write(chunk, 0, readLength);
+ }
+ }
+ }
+}
\ No newline at end of file
Copied: portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java (from rev 3689, portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java)
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java (rev 0)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java 2010-07-23 08:38:04 UTC (rev 3692)
@@ -0,0 +1,138 @@
+/**
+ * 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.web.command.handler;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.upload.UploadResource;
+import org.exoplatform.upload.UploadService;
+import org.exoplatform.web.WebAppController;
+import org.exoplatform.web.command.Command;
+
+import java.io.Writer;
+import java.net.URLEncoder;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Created by The eXo Platform SARL
+ * Author : Nhu Dinh Thuan
+ * nhudinhthuan(a)exoplatform.com
+ * Dec 9, 2006
+ */
+public class UploadHandler extends Command
+{
+
+ static enum UploadServiceAction {
+ PROGRESS, UPLOAD, DELETE, ABORT
+ }
+
+ private String action;
+
+ private String[] uploadId;
+
+ public void setAction(String action)
+ {
+ this.action = action;
+ }
+
+ public void setUploadId(String[] uploadId)
+ {
+ this.uploadId = uploadId;
+ }
+
+ @SuppressWarnings("unused")
+ public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
+ {
+ res.setHeader("Cache-Control", "no-cache");
+
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ UploadService service = (UploadService)container.getComponentInstanceOfType(UploadService.class);
+ if (action == null || action.length() < 1)
+ return;
+
+ UploadServiceAction uploadActionService = UploadServiceAction.valueOf(action.toUpperCase());
+ if (uploadActionService == UploadServiceAction.PROGRESS)
+ {
+ Writer writer = res.getWriter();
+ if (uploadId == null)
+ return;
+ StringBuilder value = new StringBuilder();
+ value.append("{\n upload : {");
+ for (int i = 0; i < uploadId.length; i++)
+ {
+ UploadResource upResource = service.getUploadResource(uploadId[i]);
+ if (upResource == null)
+ continue;
+ if (upResource.getStatus() == UploadResource.FAILED_STATUS)
+ {
+ int limitMB = service.getUploadLimitsMB().get(uploadId[i]).intValue();
+ value.append("\n \"").append(uploadId[i]).append("\": {");
+ value.append("\n \"status\":").append('\"').append("failed").append("\",");
+ value.append("\n \"size\":").append('\"').append(limitMB).append("\"");
+ value.append("\n }");
+ continue;
+ }
+ double percent = 100;
+ if (upResource.getStatus() == UploadResource.UPLOADING_STATUS)
+ {
+ percent = (upResource.getUploadedSize() * 100) / upResource.getEstimatedSize();
+ }
+ value.append("\n \"").append(uploadId[i]).append("\": {");
+ value.append("\n \"percent\":").append('\"').append((int)percent).append("\",");
+ value.append("\n \"fileName\":").append('\"').append(encodeName(upResource.getFileName()))
+ .append("\"");
+ value.append("\n }");
+ if (i < uploadId.length - 1)
+ value.append(',');
+ }
+ value.append("\n }\n}");
+ writer.append(value);
+ }
+ else if (uploadActionService == UploadServiceAction.UPLOAD)
+ {
+ service.createUploadResource(req);
+ }
+ else if (uploadActionService == UploadServiceAction.DELETE)
+ {
+ service.removeUpload(uploadId[0]);
+ }
+ else if (uploadActionService == UploadServiceAction.ABORT)
+ {
+ //TODO: dang.tung - we don't need 2 statements because it'll show error when we reload browser
+ //UploadResource upResource = service.getUploadResource(uploadId[0]);
+ //if(upResource != null) upResource.setStatus(UploadResource.UPLOADED_STATUS) ;
+ service.removeUpload(uploadId[0]);
+ }
+ }
+
+ public String encodeName(String name) throws Exception
+ {
+ String[] arr = name.split(" ");
+ String str = "";
+ for (int i = 0; i < arr.length; i++)
+ {
+ str += " " + URLEncoder.encode(arr[i], "UTF-8");
+ }
+ return str;
+ }
+
+}
\ No newline at end of file
Deleted: portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java 2010-07-23 08:16:26 UTC (rev 3691)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/DownloadHandler.java 2010-07-23 08:38:04 UTC (rev 3692)
@@ -1,109 +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.web.command.handler;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.download.DownloadResource;
-import org.exoplatform.download.DownloadService;
-import org.exoplatform.web.WebAppController;
-import org.exoplatform.web.command.Command;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.URLEncoder;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Created by The eXo Platform SARL
- * Author : LeBienThuy
- * thuy.le(a)exoplatform.com
- * Dec 9, 2006
- */
-public class DownloadHandler extends Command
-{
-
- private String resourceId;
-
- @SuppressWarnings("unused")
- public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
- {
- res.setHeader("Cache-Control", "private max-age=600, s-maxage=120");
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- DownloadService dservice = (DownloadService)container.getComponentInstanceOfType(DownloadService.class);
- DownloadResource dresource = dservice.getDownloadResource(resourceId);
- if (dresource == null)
- {
- res.setContentType("text/plain");
- res.getWriter().write("NO DOWNDLOAD RESOURCE CONTENT OR YOU DO NOT HAVE THE RIGHT TO ACCESS THE CONTENT");
- return;
- }
- String userAgent = req.getHeader("User-Agent");
- if (dresource.getDownloadName() != null)
- {
- if (userAgent != null && userAgent.contains("MSIE"))
- {
- res.setHeader("Content-Disposition", "attachment;filename=\""
- + URLEncoder.encode(dresource.getDownloadName(), "UTF-8") + "\"");
- }
- else
- {
- res.setHeader("Content-Disposition", "attachment; filename*=utf-8''"
- + URLEncoder.encode(dresource.getDownloadName(), "UTF-8") + "");
- }
- }
- res.setContentType(dresource.getResourceMimeType());
- InputStream is = dresource.getInputStream();
- try
- {
- optimalRead(is, res.getOutputStream());
- }
- catch (Exception ex)
- {
- ex.printStackTrace();
- }
- finally
- {
- is.close();
- }
- }
-
- public String getResourceId()
- {
- return resourceId;
- }
-
- private static void optimalRead(InputStream is, OutputStream os) throws Exception
- {
- int bufferLength = 1024; //TODO: Better to compute bufferLength in term of -Xms, -Xmx properties
- int readLength = 0;
- while (readLength > -1)
- {
- byte[] chunk = new byte[bufferLength];
- readLength = is.read(chunk);
- if (readLength > 0)
- {
- os.write(chunk, 0, readLength);
- }
- }
- }
-}
\ No newline at end of file
Deleted: portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java 2010-07-23 08:16:26 UTC (rev 3691)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/UploadHandler.java 2010-07-23 08:38:04 UTC (rev 3692)
@@ -1,138 +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.web.command.handler;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.upload.UploadResource;
-import org.exoplatform.upload.UploadService;
-import org.exoplatform.web.WebAppController;
-import org.exoplatform.web.command.Command;
-
-import java.io.Writer;
-import java.net.URLEncoder;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)exoplatform.com
- * Dec 9, 2006
- */
-public class UploadHandler extends Command
-{
-
- static enum UploadServiceAction {
- PROGRESS, UPLOAD, DELETE, ABORT
- }
-
- private String action;
-
- private String[] uploadId;
-
- public void setAction(String action)
- {
- this.action = action;
- }
-
- public void setUploadId(String[] uploadId)
- {
- this.uploadId = uploadId;
- }
-
- @SuppressWarnings("unused")
- public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
- {
- res.setHeader("Cache-Control", "no-cache");
-
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- UploadService service = (UploadService)container.getComponentInstanceOfType(UploadService.class);
- if (action == null || action.length() < 1)
- return;
-
- UploadServiceAction uploadActionService = UploadServiceAction.valueOf(action.toUpperCase());
- if (uploadActionService == UploadServiceAction.PROGRESS)
- {
- Writer writer = res.getWriter();
- if (uploadId == null)
- return;
- StringBuilder value = new StringBuilder();
- value.append("{\n upload : {");
- for (int i = 0; i < uploadId.length; i++)
- {
- UploadResource upResource = service.getUploadResource(uploadId[i]);
- if (upResource == null)
- continue;
- if (upResource.getStatus() == UploadResource.FAILED_STATUS)
- {
- int limitMB = service.getUploadLimitsMB().get(uploadId[i]).intValue();
- value.append("\n \"").append(uploadId[i]).append("\": {");
- value.append("\n \"status\":").append('\"').append("failed").append("\",");
- value.append("\n \"size\":").append('\"').append(limitMB).append("\"");
- value.append("\n }");
- continue;
- }
- double percent = 100;
- if (upResource.getStatus() == UploadResource.UPLOADING_STATUS)
- {
- percent = (upResource.getUploadedSize() * 100) / upResource.getEstimatedSize();
- }
- value.append("\n \"").append(uploadId[i]).append("\": {");
- value.append("\n \"percent\":").append('\"').append((int)percent).append("\",");
- value.append("\n \"fileName\":").append('\"').append(encodeName(upResource.getFileName()))
- .append("\"");
- value.append("\n }");
- if (i < uploadId.length - 1)
- value.append(',');
- }
- value.append("\n }\n}");
- writer.append(value);
- }
- else if (uploadActionService == UploadServiceAction.UPLOAD)
- {
- service.createUploadResource(req);
- }
- else if (uploadActionService == UploadServiceAction.DELETE)
- {
- service.removeUpload(uploadId[0]);
- }
- else if (uploadActionService == UploadServiceAction.ABORT)
- {
- //TODO: dang.tung - we don't need 2 statements because it'll show error when we reload browser
- //UploadResource upResource = service.getUploadResource(uploadId[0]);
- //if(upResource != null) upResource.setStatus(UploadResource.UPLOADED_STATUS) ;
- service.removeUpload(uploadId[0]);
- }
- }
-
- public String encodeName(String name) throws Exception
- {
- String[] arr = name.split(" ");
- String str = "";
- for (int i = 0; i < arr.length; i++)
- {
- str += " " + URLEncoder.encode(arr[i], "UTF-8");
- }
- return str;
- }
-
-}
\ No newline at end of file
14 years, 5 months
gatein SVN: r3691 - in portal/trunk: component/web/src/main/java/org/exoplatform and 2 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-23 04:16:26 -0400 (Fri, 23 Jul 2010)
New Revision: 3691
Removed:
portal/trunk/component/web/src/main/java/org/exoplatform/json/
portal/trunk/component/web/src/test/java/org/exoplatform/json/
portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/GetApplicationHandler.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/HelloJCRHandler.java
Modified:
portal/trunk/component/web/src/main/java/conf/portal/configuration.xml
Log:
remove legacy JSON to bean mapper
Modified: portal/trunk/component/web/src/main/java/conf/portal/configuration.xml
===================================================================
--- portal/trunk/component/web/src/main/java/conf/portal/configuration.xml 2010-07-23 07:43:11 UTC (rev 3690)
+++ portal/trunk/component/web/src/main/java/conf/portal/configuration.xml 2010-07-23 08:16:26 UTC (rev 3691)
@@ -25,10 +25,6 @@
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
- <type>org.exoplatform.json.JSONService</type>
- </component>
-
- <component>
<type>org.exoplatform.upload.UploadService</type>
<init-params>
<value-param>
Deleted: portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/GetApplicationHandler.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/GetApplicationHandler.java 2010-07-23 07:43:11 UTC (rev 3690)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/GetApplicationHandler.java 2010-07-23 08:16:26 UTC (rev 3691)
@@ -1,169 +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.web.command.handler;
-
-import org.exoplatform.application.registry.Application;
-import org.exoplatform.application.registry.ApplicationCategory;
-import org.exoplatform.application.registry.ApplicationRegistryService;
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.json.BeanToJSONPlugin;
-import org.exoplatform.json.JSONService;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.web.WebAppController;
-import org.exoplatform.web.command.Command;
-
-import java.io.IOException;
-import java.io.Writer;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)exoplatform.com
- * May 31, 2007
- */
-public class GetApplicationHandler extends Command
-{
-
- private ApplicationType<?>[] applicationType;
-
- public void setApplicationTypes(ApplicationType<?>[] type)
- {
- applicationType = type;
- }
-
- @SuppressWarnings("unused")
- public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
- {
- res.setHeader("Cache-Control", "no-cache");
- Writer writer = res.getWriter();
- try
- {
- writer.append(getApplications(req.getRemoteUser()));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- throw new IOException(e.getMessage());
- }
- }
-
- @SuppressWarnings("unchecked")
- private StringBuilder getApplications(String remoteUser) throws Exception
- {
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- ApplicationRegistryService prService =
- (ApplicationRegistryService)container.getComponentInstanceOfType(ApplicationRegistryService.class);
-
- if (applicationType == null)
- applicationType = new ApplicationType<?>[0];
- List<ApplicationCategory> appCategories = prService.getApplicationCategories(remoteUser, applicationType);
- ApplicationCategoryToJSONPlugin toJSON = new ApplicationCategoryToJSONPlugin();
-
- StringBuilder value = new StringBuilder();
- JSONService jsonService = new JSONService();
- jsonService.register(ApplicationCategory.class, toJSON);
-
- if (appCategories.size() < 1)
- return value;
-
- value.append("{\n").append(" applicationRegistry : {\n");
- for (int i = 0; i < appCategories.size(); i++)
- {
- ApplicationCategory category = appCategories.get(i);
- jsonService.toJSONScript(category, value, 1);
- if (i < appCategories.size() - 1)
- value.append(" ,\n");
- }
- value.append(" }\n").append("}\n");
-
- return value;
- }
-
- private class ApplicationCategoryToJSONPlugin extends BeanToJSONPlugin<ApplicationCategory>
- {
-
- @SuppressWarnings("unchecked")
- public void toJSONScript(ApplicationCategory category, StringBuilder builder, int indentLevel) throws Exception
- {
- StringBuilder builderPortlet = toJSONScript(category, indentLevel + 2);
- if (builderPortlet.length() < 1)
- return;
-
- appendIndentation(builder, indentLevel);
- builder.append('\'').append(category.getName()).append("' : {\n");
- appendIndentation(builder, indentLevel + 1);
- builder.append("'name' : '").append(category.getDisplayName()).append("',\n");
- appendIndentation(builder, indentLevel + 1);
- builder.append("'applications' : {\n");
- builder.append(builderPortlet);
- appendIndentation(builder, indentLevel + 1);
- builder.append("}\n");
- appendIndentation(builder, indentLevel);
- builder.append("}\n");
- }
-
- @SuppressWarnings("unchecked")
- private StringBuilder toJSONScript(ApplicationCategory category, int indentLevel) throws Exception
- {
- StringBuilder builder = new StringBuilder();
- List<Application> applications = category.getApplications();
-
- for (int j = 0; j < applications.size(); j++)
- {
- toJSONScript(applications.get(j), builder, indentLevel);
- if (j < applications.size() - 1)
- {
- appendIndentation(builder, indentLevel);
- builder.append(",\n");
- }
- }
-
- return builder;
- }
-
- private void toJSONScript(Application application, StringBuilder builder, int indentLevel)
- {
- appendIndentation(builder, indentLevel);
- builder.append('\'').append(application.getId()).append("' : {\n");
- appendIndentation(builder, indentLevel + 1);
- //TODO: Tung.Pham modified
- //----------------------------
- //builder.append("'title' : ").append("'").append(application.getApplicationName()).append("',\n");
- builder.append("'name' : ").append("'").append(application.getApplicationName()).append("',\n");
- appendIndentation(builder, indentLevel + 1);
- builder.append("'title' : ").append("'").append(application.getDisplayName()).append("',\n");
- //------------------------------
- appendIndentation(builder, indentLevel + 1);
- builder.append("'des' : ").append("'").append(application.getDescription()).append("',\n");
- appendIndentation(builder, indentLevel + 1);
- builder.append("'id' : ").append("'").append(application.getId()).append("',\n");
- appendIndentation(builder, indentLevel + 1);
- builder.append("'type' : ").append("'").append(application.getType()).append("'\n");
- appendIndentation(builder, indentLevel);
- builder.append("}\n");
- }
- }
-
-}
Deleted: portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/HelloJCRHandler.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/HelloJCRHandler.java 2010-07-23 07:43:11 UTC (rev 3690)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/web/command/handler/HelloJCRHandler.java 2010-07-23 08:16:26 UTC (rev 3691)
@@ -1,46 +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.web.command.handler;
-
-import org.exoplatform.web.WebAppController;
-import org.exoplatform.web.command.Command;
-
-import java.io.PrintWriter;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Nguyen Ba Uoc
- * thuy.le(a)exoplatform.com
- * July 24, 2007
- */
-public class HelloJCRHandler extends Command
-{
-
- public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
- {
- res.setContentType("text/xml");
- PrintWriter out = res.getWriter();
- out.println("Hello from server");
- System.out.println("Client request");
- }
-}
\ No newline at end of file
14 years, 5 months
gatein SVN: r3689 - in portal/trunk/component: common/src/main/java/org/exoplatform/util and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-23 03:40:40 -0400 (Fri, 23 Jul 2010)
New Revision: 3689
Added:
portal/trunk/component/common/src/main/java/org/exoplatform/util/
portal/trunk/component/common/src/main/java/org/exoplatform/util/ReflectionUtil.java
Removed:
portal/trunk/component/web/src/main/java/org/exoplatform/util/ReflectionUtil.java
Log:
move ReflectionUtil to common package
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/util/ReflectionUtil.java (from rev 3684, portal/trunk/component/web/src/main/java/org/exoplatform/util/ReflectionUtil.java)
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/util/ReflectionUtil.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/util/ReflectionUtil.java 2010-07-23 07:40:40 UTC (rev 3689)
@@ -0,0 +1,101 @@
+/**
+ * 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.util;
+
+import java.lang.ref.SoftReference;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+
+/**
+ * Created by The eXo Platform SARL
+ * Author : Tuan Nguyen
+ * tuan08(a)users.sourceforge.net
+ * Jun 16, 2006
+ */
+public class ReflectionUtil
+{
+
+ static public Object[] EMPTY_ARGS = {};
+
+ static private HashMap<String, SoftReference<Method>> getMethodCache_ = new HashMap<String, SoftReference<Method>>();
+
+ static private HashMap<String, SoftReference<Method>> setMethodCache_ = new HashMap<String, SoftReference<Method>>();
+
+ static public Method getGetBindingMethod(Object bean, String bindingField) throws Exception
+ {
+ String key = bindingField + "@" + bean.getClass();
+ Method method = null;
+ SoftReference<Method> sref = getMethodCache_.get(key);
+ if (sref != null)
+ method = sref.get();
+ if (method == null)
+ {
+ Exception exp = null;
+ try
+ {
+ method = getBindingMethod(bean, bindingField, new Class[]{}, "get");
+ }
+ catch (Exception e)
+ {
+ exp = e;
+ }
+ if (method == null)
+ {
+ try
+ {
+ method = getBindingMethod(bean, bindingField, new Class[]{}, "is");
+ }
+ catch (Exception exp2)
+ {
+ }
+ }
+ if (method == null && exp != null)
+ throw exp;
+ getMethodCache_.put(key, new SoftReference<Method>(method));
+ }
+ return method;
+ }
+
+ static public Method getSetBindingMethod(Object bean, String bindingField, Class[] args) throws Exception
+ {
+ String key = bindingField + "@" + bean.getClass();
+ Method method = null;
+ SoftReference<Method> sref = setMethodCache_.get(key);
+ if (sref != null)
+ method = sref.get();
+ if (method == null)
+ {
+ method = getBindingMethod(bean, bindingField, args, "set");
+ setMethodCache_.put(key, new SoftReference<Method>(method));
+ }
+ return method;
+ }
+
+ static private Method getBindingMethod(Object bean, String bindingField, Class[] classes, String prefix)
+ throws Exception
+ {
+ StringBuilder b = new StringBuilder();
+ b.append(prefix);
+ b.append(Character.toUpperCase(bindingField.charAt(0)));
+ b.append(bindingField.substring(1));
+ return bean.getClass().getMethod(b.toString(), classes);
+ }
+
+}
Deleted: portal/trunk/component/web/src/main/java/org/exoplatform/util/ReflectionUtil.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/util/ReflectionUtil.java 2010-07-22 22:43:39 UTC (rev 3688)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/util/ReflectionUtil.java 2010-07-23 07:40:40 UTC (rev 3689)
@@ -1,101 +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.util;
-
-import java.lang.ref.SoftReference;
-import java.lang.reflect.Method;
-import java.util.HashMap;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Tuan Nguyen
- * tuan08(a)users.sourceforge.net
- * Jun 16, 2006
- */
-public class ReflectionUtil
-{
-
- static public Object[] EMPTY_ARGS = {};
-
- static private HashMap<String, SoftReference<Method>> getMethodCache_ = new HashMap<String, SoftReference<Method>>();
-
- static private HashMap<String, SoftReference<Method>> setMethodCache_ = new HashMap<String, SoftReference<Method>>();
-
- static public Method getGetBindingMethod(Object bean, String bindingField) throws Exception
- {
- String key = bindingField + "@" + bean.getClass();
- Method method = null;
- SoftReference<Method> sref = getMethodCache_.get(key);
- if (sref != null)
- method = sref.get();
- if (method == null)
- {
- Exception exp = null;
- try
- {
- method = getBindingMethod(bean, bindingField, new Class[]{}, "get");
- }
- catch (Exception e)
- {
- exp = e;
- }
- if (method == null)
- {
- try
- {
- method = getBindingMethod(bean, bindingField, new Class[]{}, "is");
- }
- catch (Exception exp2)
- {
- }
- }
- if (method == null && exp != null)
- throw exp;
- getMethodCache_.put(key, new SoftReference<Method>(method));
- }
- return method;
- }
-
- static public Method getSetBindingMethod(Object bean, String bindingField, Class[] args) throws Exception
- {
- String key = bindingField + "@" + bean.getClass();
- Method method = null;
- SoftReference<Method> sref = setMethodCache_.get(key);
- if (sref != null)
- method = sref.get();
- if (method == null)
- {
- method = getBindingMethod(bean, bindingField, args, "set");
- setMethodCache_.put(key, new SoftReference<Method>(method));
- }
- return method;
- }
-
- static private Method getBindingMethod(Object bean, String bindingField, Class[] classes, String prefix)
- throws Exception
- {
- StringBuilder b = new StringBuilder();
- b.append(prefix);
- b.append(Character.toUpperCase(bindingField.charAt(0)));
- b.append(bindingField.substring(1));
- return bean.getClass().getMethod(b.toString(), classes);
- }
-
-}
14 years, 5 months
gatein SVN: r3688 - in portal/trunk/webui: portlet/src/main/java/org/exoplatform/webui/core and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-22 18:43:39 -0400 (Thu, 22 Jul 2010)
New Revision: 3688
Added:
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/
portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
Removed:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java
Log:
move UIApplicationLifecycle to the webui portlet module as it is actually only targetted to portlets and changed its generic parameterization to UIPortletApplication instead of UIComponent
Deleted: 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 17:01:42 UTC (rev 3687)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22 22:43:39 UTC (rev 3688)
@@ -1,76 +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.webui.core.lifecycle;
-
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.core.UIComponent;
-import org.exoplatform.webui.core.UIPortletApplication;
-
-/**
- * Author : Nhu Dinh Thuan
- * nhudinhthuan(a)yahoo.com
- * Jun 1, 2006
- */
-public class UIApplicationLifecycle extends Lifecycle<UIComponent>
-{
-
- public void processDecode(UIComponent uicomponent, WebuiRequestContext context) throws Exception
- {
- String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
- if (componentId == null || componentId.length() == 0)
- return;
- UIComponent uiTarget = uicomponent.findComponentById(componentId);
- //TODO to avoid exception
- if (uiTarget == null)
- return;
- else if (uiTarget == uicomponent)
- super.processDecode(uicomponent, context);
- else
- uiTarget.processDecode(context);
- }
-
- public void processAction(UIComponent uicomponent, WebuiRequestContext context) throws Exception
- {
- String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
- if (componentId != null)
- {
- UIComponent uiTarget = uicomponent.findComponentById(componentId);
- if (uiTarget == uicomponent)
- super.processAction(uicomponent, context);
- else if (uiTarget != null)
- uiTarget.processAction(context);
- }
- }
-
- public void processRender(UIComponent uicomponent, WebuiRequestContext context) throws Exception
- {
- if (uicomponent.getTemplate() != null)
- {
- super.processRender(uicomponent, context);
- return;
- }
- UIPortletApplication uiApp = (UIPortletApplication)uicomponent;
-
- context.getWriter().append("<div id=\"").append(uicomponent.getId()).append("\"").append("class=\"").append(uicomponent.getId()).append("\">");
-
- uiApp.renderChildren();
- context.getWriter().append("</div>");
- }
-}
\ No newline at end of file
Copied: portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java (from rev 3684, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java)
===================================================================
--- portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java (rev 0)
+++ portal/trunk/webui/portlet/src/main/java/org/exoplatform/webui/core/lifecycle/UIApplicationLifecycle.java 2010-07-22 22:43:39 UTC (rev 3688)
@@ -0,0 +1,76 @@
+/*
+ * 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.webui.core.lifecycle;
+
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPortletApplication;
+
+/**
+ * Author : Nhu Dinh Thuan
+ * nhudinhthuan(a)yahoo.com
+ * Jun 1, 2006
+ */
+public class UIApplicationLifecycle extends Lifecycle<UIPortletApplication>
+{
+
+ public void processDecode(UIPortletApplication uicomponent, WebuiRequestContext context) throws Exception
+ {
+ String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
+ if (componentId == null || componentId.length() == 0)
+ return;
+ UIComponent uiTarget = uicomponent.findComponentById(componentId);
+ //TODO to avoid exception
+ if (uiTarget == null)
+ return;
+ else if (uiTarget == uicomponent)
+ super.processDecode(uicomponent, context);
+ else
+ uiTarget.processDecode(context);
+ }
+
+ public void processAction(UIPortletApplication uicomponent, WebuiRequestContext context) throws Exception
+ {
+ String componentId = context.getRequestParameter(context.getUIComponentIdParameterName());
+ if (componentId != null)
+ {
+ UIComponent uiTarget = uicomponent.findComponentById(componentId);
+ if (uiTarget == uicomponent)
+ super.processAction(uicomponent, context);
+ else if (uiTarget != null)
+ uiTarget.processAction(context);
+ }
+ }
+
+ public void processRender(UIPortletApplication uicomponent, WebuiRequestContext context) throws Exception
+ {
+ if (uicomponent.getTemplate() != null)
+ {
+ super.processRender(uicomponent, context);
+ return;
+ }
+ UIPortletApplication uiApp = uicomponent;
+
+ context.getWriter().append("<div id=\"").append(uicomponent.getId()).append("\"").append("class=\"").append(uicomponent.getId()).append("\">");
+
+ uiApp.renderChildren();
+ context.getWriter().append("</div>");
+ }
+}
\ No newline at end of file
14 years, 5 months
gatein SVN: r3687 - portal/trunk/web/portal/src/main/webapp/groovy/webui/core.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-22 13:01:42 -0400 (Thu, 22 Jul 2010)
New Revision: 3687
Modified:
portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIGrid.gtmpl
Log:
should have reverted that as well
Modified: portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIGrid.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIGrid.gtmpl 2010-07-22 14:02:31 UTC (rev 3686)
+++ portal/trunk/web/portal/src/main/webapp/groovy/webui/core/UIGrid.gtmpl 2010-07-22 17:01:42 UTC (rev 3687)
@@ -1,6 +1,8 @@
<%
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.form.UIForm;
+ import java.text.DateFormat;
+ import java.text.SimpleDateFormat;
String[] beanFields = uicomponent.getBeanFields();
String[] beanActions = uicomponent.getBeanActions();
@@ -64,9 +66,22 @@
<%
for (field in beanFields)
{
- def fieldValue = uicomponent.getFieldValue(bean, field);
- def renderer = uicomponent.getRendererFor(fieldValue);
- println "<td><div class=\"" + renderer.getCSSClassFor(fieldValue) + "\" title='$fieldValue'>" + renderer.render(fieldValue, _ctx) + "</div></td>";
+ def fieldValue = uicomponent.getFieldValue(bean, field);
+ def cssClass = "";
+ if(fieldValue != null) {
+ def fieldClass = fieldValue.getClass();
+ if(fieldClass == Integer.class) cssClass = "number";
+ else if(java.util.Date.class.isAssignableFrom(fieldClass)) {
+ if(dateFormat == null) dateFormat = new SimpleDateFormat("HH:mm:ss yyyy-MM-dd");
+ cssClass = "Datetime";
+ fieldValue = dateFormat.format(fieldValue);
+ }
+ else cssClass = "Text";
+ } else {
+ fieldValue = "";
+ }
+ String value = fieldValue.toString();
+ println "<td><div class=\""+cssClass+"\" title='$fieldValue'>"+fieldValue+"</div></td>";
}
if (beanActions != null && beanActions.length > 0)
{
14 years, 5 months
gatein SVN: r3686 - portal/trunk/webui/dashboard.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-22 10:02:31 -0400 (Thu, 22 Jul 2010)
New Revision: 3686
Modified:
portal/trunk/webui/dashboard/pom.xml
Log:
rename dashboard webui module maven display name
Modified: portal/trunk/webui/dashboard/pom.xml
===================================================================
--- portal/trunk/webui/dashboard/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
+++ portal/trunk/webui/dashboard/pom.xml 2010-07-22 14:02:31 UTC (rev 3686)
@@ -29,19 +29,17 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>exo.portal.webui.dashboard</artifactId>
<packaging>jar</packaging>
- <name>GateIn Portal Component Dashboard Portlet</name>
+ <name>GateIn Portal WebUI Dashboard</name>
<dependencies>
<dependency>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.portal</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.eXo</artifactId>
- <scope>provided</scope>
- </dependency>
+ </dependency>
</dependencies>
<build>
14 years, 5 months
gatein SVN: r3685 - in portal/trunk: component and 5 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-07-22 09:44:35 -0400 (Thu, 22 Jul 2010)
New Revision: 3685
Added:
portal/trunk/webui/dashboard/
Removed:
portal/trunk/component/dashboard/
Modified:
portal/trunk/component/pom.xml
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/portlet/dashboard/pom.xml
portal/trunk/webui/dashboard/pom.xml
portal/trunk/webui/pom.xml
Log:
GTNPORTAL-1371: Move dashboard module from component to webui
Modified: portal/trunk/component/pom.xml
===================================================================
--- portal/trunk/component/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
+++ portal/trunk/component/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -46,7 +46,6 @@
<module>scripting</module>
<module>management</module>
<module>identity</module>
- <module>dashboard</module>
</modules>
</project>
Modified: portal/trunk/packaging/jboss-as/ear/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
+++ portal/trunk/packaging/jboss-as/ear/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -120,10 +120,6 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.dashboard</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.management</artifactId>
</dependency>
<dependency>
@@ -146,6 +142,10 @@
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.webui.core</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.dashboard</artifactId>
+ </dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.gadgets-core</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 13:03:34 UTC (rev 3684)
+++ portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-07-22 13:44:35 UTC (rev 3685)
@@ -193,7 +193,7 @@
module.portlet.dashboard =
new Project("org.exoplatform.portal", "exo.portal.portlet.dashboard", "exo-portlet", module.version).
- addDependency(new Project("org.exoplatform.portal", "exo.portal.component.dashboard", "jar", module.version));
+ addDependency(new Project("org.exoplatform.portal", "exo.portal.webui.dashboard", "jar", module.version));
module.sample = {};
module.sample.framework =
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
+++ portal/trunk/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -412,11 +412,6 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.dashboard</artifactId>
- <version>3.2.0-Beta01-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.management</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</dependency>
@@ -447,6 +442,11 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.dashboard</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.gadgets-core</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</dependency>
Modified: portal/trunk/portlet/dashboard/pom.xml
===================================================================
--- portal/trunk/portlet/dashboard/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
+++ portal/trunk/portlet/dashboard/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -45,7 +45,7 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.dashboard</artifactId>
+ <artifactId>exo.portal.webui.dashboard</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Copied: portal/trunk/webui/dashboard (from rev 3683, portal/trunk/component/dashboard)
Modified: portal/trunk/webui/dashboard/pom.xml
===================================================================
--- portal/trunk/component/dashboard/pom.xml 2010-07-22 12:06:19 UTC (rev 3683)
+++ portal/trunk/webui/dashboard/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -22,12 +22,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component</artifactId>
+ <artifactId>exo.portal.webui</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>exo.portal.component.dashboard</artifactId>
+ <artifactId>exo.portal.webui.dashboard</artifactId>
<packaging>jar</packaging>
<name>GateIn Portal Component Dashboard Portlet</name>
Modified: portal/trunk/webui/pom.xml
===================================================================
--- portal/trunk/webui/pom.xml 2010-07-22 13:03:34 UTC (rev 3684)
+++ portal/trunk/webui/pom.xml 2010-07-22 13:44:35 UTC (rev 3685)
@@ -40,6 +40,7 @@
<module>core</module>
<module>eXo</module>
<module>portal</module>
+ <module>dashboard</module>
</modules>
</project>
14 years, 5 months
gatein SVN: r3684 - in portal/trunk: component/portal/src/main/java and 20 other directories.
by do-not-reply@jboss.org
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"
- 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"
- 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"
+ 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"
+ 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()
- {
- }
-}
14 years, 5 months