Author: julien_viet
Date: 2010-01-07 06:07:05 -0500 (Thu, 07 Jan 2010)
New Revision: 1191
Removed:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationInfo.java
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/annotation/
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/mvc/
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/util/
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/Application.java
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestContext.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
Log:
- cleanup non used classes
- make PortalURLBuilder usage type safe
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/Application.java
===================================================================
---
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/Application.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/Application.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -52,7 +52,6 @@
private Hashtable<String, Object> attributes_ = new Hashtable<String,
Object>();
- //TODO: Replcate by method public ApplicationInfo getApplicationInfo() ;
abstract public String getApplicationId();
abstract public String getApplicationType();
Deleted:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationInfo.java
===================================================================
---
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationInfo.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/ApplicationInfo.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -1,37 +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.application;
-
-/**
- * Created by The eXo Platform SARL
- * Author : Tuan Nguyen
- * tuan.nguyen(a)exoplatform.com
- * Apr 8, 2007
- */
-public class ApplicationInfo
-{
- private String applicationId_;
-
- private String applicationCategory_;
-
- private String applicationName_;
-
- private String applicationDescription_;
-}
Modified:
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestContext.java
===================================================================
---
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestContext.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/component/web/src/main/java/org/exoplatform/web/application/RequestContext.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -53,8 +53,6 @@
private Map<String, Object> attributes;
- protected URLBuilder urlBuilder;
-
public RequestContext(Application app)
{
app_ = app;
@@ -91,7 +89,7 @@
return getParentAppRequestContext().getJavascriptManager();
}
- abstract public URLBuilder getURLBuilder();
+ abstract public URLBuilder<?> getURLBuilder();
public String getRemoteUser()
{
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -23,6 +23,7 @@
import org.exoplatform.resolver.ResourceResolver;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.application.RequestContext;
+import org.exoplatform.web.application.URLBuilder;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
@@ -118,6 +119,9 @@
return UIComponent.UICOMPONENT;
}
+ @Override
+ public abstract URLBuilder<UIComponent> getURLBuilder();
+
abstract public String getRequestContextPath();
abstract public <T> T getRequest() throws Exception;
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -19,13 +19,12 @@
package org.exoplatform.webui.application.portlet;
-import org.exoplatform.commons.utils.WriterPrinter;
import org.exoplatform.services.resources.Orientation;
import org.exoplatform.web.application.URLBuilder;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.lifecycle.HtmlValidator;
+import org.exoplatform.webui.core.UIComponent;
import java.io.Writer;
@@ -62,6 +61,8 @@
private boolean hasProcessAction_ = false;
+ private final PortletURLBuilder urlBuilder;
+
public PortletRequestContext(WebuiApplication app, Writer writer, PortletRequest req,
PortletResponse res)
{
super(app);
@@ -179,7 +180,7 @@
hasProcessAction_ = b;
}
- public URLBuilder getURLBuilder()
+ public URLBuilder<UIComponent> getURLBuilder()
{
RenderResponse renderRes = (RenderResponse)response_;
urlBuilder.setBaseURL(renderRes.createActionURL().toString());
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -214,11 +214,11 @@
if (event == null)
return "??config??";
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- URLBuilder urlBuilder = context.getURLBuilder();
+ URLBuilder<UIComponent> urlBuilder = context.getURLBuilder();
if (urlBuilder == null)
return "??builder??";
String confirm = loadConfirmMesssage(event, context, beanId);
- return urlBuilder.createAjaxURL(this, event.getName(), confirm, beanId,
params).toString();
+ return urlBuilder.createAjaxURL(this, event.getName(), confirm, beanId, params);
}
protected String loadConfirmMesssage(org.exoplatform.webui.config.Event event,
WebuiRequestContext context,
@@ -258,7 +258,7 @@
String confirm = loadConfirmMesssage(event, context, beanId);
try
{
- return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId,
params).toString();
+ return context.getURLBuilder().createURL(this, event.getName(), confirm, beanId,
params);
}
catch (Exception e)
{
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-01-07
06:14:22 UTC (rev 1190)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-01-07
11:07:05 UTC (rev 1191)
@@ -36,6 +36,7 @@
import org.exoplatform.web.application.URLBuilder;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.lifecycle.HtmlValidator;
import javax.servlet.http.HttpServletRequest;
@@ -98,6 +99,8 @@
protected JavascriptManager jsmanager_ = new JavascriptManager();
+ private final PortalURLBuilder urlBuilder;
+
public JavascriptManager getJavascriptManager()
{
return jsmanager_;
@@ -255,7 +258,7 @@
return portalURI;
}
- public URLBuilder getURLBuilder()
+ public URLBuilder<UIComponent> getURLBuilder()
{
return urlBuilder;
}