Author: julien_viet
Date: 2010-11-24 10:42:47 -0500 (Wed, 24 Nov 2010)
New Revision: 5250
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
Log:
change / escape to _ char instead of tilda
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-11-24
15:02:41 UTC (rev 5249)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/router/Route.java 2010-11-24
15:42:47 UTC (rev 5250)
@@ -45,7 +45,7 @@
{
/** Julien : make that configurable. */
- private static final char slashEscape = '~';
+ private static final char slashEscape = '_';
/** . */
private Route parent;
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java 2010-11-24
15:02:41 UTC (rev 5249)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestMatch.java 2010-11-24
15:42:47 UTC (rev 5250)
@@ -124,7 +124,7 @@
Router router = new Router(routerMD);
//
- assertEquals(Collections.singletonMap(QualifiedName.create("p"),
"/"), router.route("/~"));
+ assertEquals(Collections.singletonMap(QualifiedName.create("p"),
"/"), router.route("/_"));
}
public void testPreservePath() throws Exception
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-11-24
15:02:41 UTC (rev 5249)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2010-11-24
15:42:47 UTC (rev 5250)
@@ -129,12 +129,12 @@
Map<QualifiedName, String> expectedParameters = new HashMap<QualifiedName,
String>();
expectedParameters.put(QualifiedName.create("gtn",
"controller"), "site");
expectedParameters.put(QualifiedName.create("gtn", "sitetype"),
"group");
- expectedParameters.put(QualifiedName.create("gtn", "sitename"),
"platform_administrator");
+ expectedParameters.put(QualifiedName.create("gtn", "sitename"),
"platform");
expectedParameters.put(QualifiedName.create("gtn", "path"),
"/administration/registry");
//
- assertEquals(expectedParameters,
router.route("/private/group/platform_administrator/administration/registry"));
-
assertEquals("/private/group/platform_administrator/administration/registry",
router.render(expectedParameters));
+ assertEquals(expectedParameters,
router.route("/private/group/platform/administration/registry"));
+ assertEquals("/private/group/platform/administration/registry",
router.render(expectedParameters));
Map<QualifiedName, String> expectedParameters1 = new
HashMap<QualifiedName, String>();
expectedParameters1.put(QualifiedName.create("gtn",
"controller"), "site");
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java 2010-11-24
15:02:41 UTC (rev 5249)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestRender.java 2010-11-24
15:42:47 UTC (rev 5250)
@@ -113,7 +113,7 @@
Router router = new Router(routerMD);
//
- assertEquals("/~",
router.render(Collections.singletonMap(QualifiedName.create("p"),
"/")));
+ assertEquals("/_",
router.render(Collections.singletonMap(QualifiedName.create("p"),
"/")));
}
public void testWildcardParamPathPreservePathEncoding() throws Exception
@@ -133,7 +133,7 @@
Router router = new Router(routerMD);
//
- assertEquals("/~",
router.render(Collections.singletonMap(QualifiedName.create("p"),
"/")));
+ assertEquals("/_",
router.render(Collections.singletonMap(QualifiedName.create("p"),
"/")));
}
public void testPrecedence() throws Exception
Show replies by date