Author: julien_viet
Date: 2010-11-30 16:12:07 -0500 (Tue, 30 Nov 2010)
New Revision: 5390
Modified:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProvider.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProviderFilter.java
Log:
rennable this code I commented before
Modified:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProvider.java
===================================================================
---
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProvider.java 2010-11-30
20:49:57 UTC (rev 5389)
+++
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProvider.java 2010-11-30
21:12:07 UTC (rev 5390)
@@ -24,6 +24,8 @@
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
+import java.util.Locale;
+
/**
* @author <a href="trongtt(a)gmail.com">Trong Tran</a>
* @version $Revision$
@@ -35,11 +37,14 @@
private ControllerContext controllerContext;
private LocatorProvider locatorProvider;
+
+ private Locale requestLocale;
- public PortalURLProvider(ControllerContext controllerCtx, LocatorProvider
locatorService)
+ public PortalURLProvider(ControllerContext controllerCtx, LocatorProvider
locatorService, Locale requestLocale)
{
this.controllerContext = controllerCtx;
this.locatorProvider = locatorService;
+ this.requestLocale = requestLocale;
}
public static void setCurrentPortalURLProvider(PortalURLProvider provider)
@@ -57,9 +62,8 @@
PortalURLProvider portalURLProvider = currentProvider.get();
if (portalURLProvider != null)
{
-// L newLocator = locatorProvider.newLocator(resourceType);
-// return new PortalURL<R, L>(controllerContext, newLocator, false,
siteType, siteName, access);
- throw new UnsupportedOperationException("is it used ?");
+ L newLocator = locatorProvider.newLocator(resourceType);
+ return new PortalURL<R, L>(controllerContext, newLocator, false,
requestLocale, siteType, siteName, access);
}
return null;
}
Modified:
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProviderFilter.java
===================================================================
---
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProviderFilter.java 2010-11-30
20:49:57 UTC (rev 5389)
+++
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURLProviderFilter.java 2010-11-30
21:12:07 UTC (rev 5390)
@@ -56,7 +56,7 @@
try
{
ControllerContext controllerCtx = new ControllerContext(webAppController,
httpRequest, httpResponse, null);
- PortalURLProvider urlProvider = new PortalURLProvider(controllerCtx,
locatorProvider);
+ PortalURLProvider urlProvider = new PortalURLProvider(controllerCtx,
locatorProvider, null);
PortalURLProvider.setCurrentPortalURLProvider(urlProvider);
chain.doFilter(httpRequest, httpResponse);
}