Author: theute
Date: 2011-11-17 03:22:46 -0500 (Thu, 17 Nov 2011)
New Revision: 8086
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/url/PortalURL.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/performance/Standalone.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/Names.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestLegacyPortal.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/resources/org/exoplatform/web/controller/performance/controller.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/url/ComponentURL.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/
Log:
JBEPP-1366: Sanitize controller.xml
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4868,4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/xss:7377-7595,7597
/portal/branches/xss-issues:7350-7351,7358
/portal/trunk:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450,7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7741,7748,7780,7877,8045
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/xss:7377-7595,7597
/portal/branches/xss-issues:7350-7351,7358
/portal/trunk:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450,7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7741,7748,7773,7780,7877,7900,7928,7938,8045,8053,8072
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4868,4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7906,8045
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072
Property changes on: epp/portal/branches/EPP_5_2_Branch/component/portal
___________________________________________________________________
Modified: svn:mergeinfo
- /portal/branches/branch-GTNPORTAL-1592/component/portal:4868
/portal/trunk:7451
/portal/trunk/component/portal:7085,7412,7451,7500,7570-7571,7573,7577,7614-7615,7695-7696,7701-7704,7748,7780,7877,8045
+ /portal/branches/branch-GTNPORTAL-1592/component/portal:4868,4875
/portal/trunk:7451
/portal/trunk/component/portal:7085,7412,7451,7500,7570-7571,7573,7577,7614-7615,7695-7696,7701-7704,7748,7773,7780,7877,7900,7928,7938,8045,8053,8072
Property changes on:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4868,4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7906,8045
/portal/trunk/src/main/java/org:7451
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4876,4891,5269,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7120,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072
/portal/trunk/src/main/java/org:7451
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/url/PortalURL.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/url/PortalURL.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/url/PortalURL.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -243,6 +243,18 @@
}
/**
+ * Reset the Portal URL state
+ */
+ public void reset()
+ {
+ Map<String, String[]> params = getQueryParameters();
+ if (params != null)
+ {
+ params.clear();
+ }
+ }
+
+ /**
* Returns the query parameters. Null can be returned.
*
* @return the query parameters
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/performance/Standalone.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/performance/Standalone.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/performance/Standalone.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -21,9 +21,6 @@
private static final QualifiedName HANDLER =
QualifiedName.parse("gtn:handler");
/** . */
- private static final QualifiedName LANG = QualifiedName.parse("gtn:lang");
-
- /** . */
private static final QualifiedName SITETYPE =
QualifiedName.parse("gtn:sitetype");
/** . */
@@ -32,15 +29,6 @@
/** . */
private static final QualifiedName PATH = QualifiedName.parse("gtn:path");
- /** . */
- private static final QualifiedName COMPONENT_ID =
QualifiedName.parse("gtn:componentid");
-
- /** . */
- private static final QualifiedName ACTION =
QualifiedName.parse("gtn:action");
-
- /** . */
- private static final QualifiedName OBJECT_ID =
QualifiedName.parse("gtn:objectid");
-
public void testFoo() throws Exception
{
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/Names.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/Names.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/Names.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -42,6 +42,4 @@
QualifiedName GTN_SITETYPE = QualifiedName.parse("gtn:sitetype");
QualifiedName GTN_ACCESS = QualifiedName.parse("gtn:access");
QualifiedName GTN_PATH = QualifiedName.parse("gtn:path");
- QualifiedName GTN_COMPONENTID = QualifiedName.parse("gtn:componentid");
-
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestLegacyPortal.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestLegacyPortal.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestLegacyPortal.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -23,7 +23,6 @@
import org.exoplatform.web.controller.QualifiedName;
import static org.exoplatform.web.controller.metadata.DescriptorBuilder.*;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -43,10 +42,7 @@
this.router = router().
add(route("/").
with(
- routeParam("gtn:handler").withValue("portal"),
-
requestParam("gtn:componentid").named("portal:componentId"),
- requestParam("gtn:action").named("portal:action"),
-
requestParam("gtn:objectid").named("portal:objectId")).
+ routeParam("gtn:handler").withValue("portal")).
sub(route("/public/{gtn:sitename}{gtn:path}").
with(
routeParam("gtn:access").withValue("public"),
@@ -65,11 +61,10 @@
expectedParameters.put(Names.GTN_SITENAME, "classic");
expectedParameters.put(Names.GTN_ACCESS, "private");
expectedParameters.put(Names.GTN_PATH, "");
- expectedParameters.put(Names.GTN_COMPONENTID, "foo");
//
- assertEquals(expectedParameters, router.route("/private/classic",
Collections.singletonMap("portal:componentId", new
String[]{"foo"})));
- assertEquals("/private/classic?portal:componentId=foo",
router.render(expectedParameters));
+ assertEquals(expectedParameters, router.route("/private/classic"));
+ assertEquals("/private/classic", router.render(expectedParameters));
}
public void testPrivateClassic() throws Exception
@@ -105,11 +100,10 @@
expectedParameters.put(Names.GTN_SITENAME, "classic");
expectedParameters.put(Names.GTN_ACCESS, "private");
expectedParameters.put(Names.GTN_PATH, "/");
- expectedParameters.put(Names.GTN_COMPONENTID, "foo");
//
- assertEquals(expectedParameters, router.route("/private/classic/",
Collections.singletonMap("portal:componentId", new
String[]{"foo"})));
- assertEquals("/private/classic/?portal:componentId=foo",
router.render(expectedParameters));
+ assertEquals(expectedParameters, router.route("/private/classic/"));
+ assertEquals("/private/classic/", router.render(expectedParameters));
}
public void testPrivateClassicHome() throws Exception
@@ -132,10 +126,9 @@
expectedParameters.put(Names.GTN_SITENAME, "classic");
expectedParameters.put(Names.GTN_ACCESS, "private");
expectedParameters.put(Names.GTN_PATH, "/home");
- expectedParameters.put(Names.GTN_COMPONENTID, "foo");
//
- assertEquals(expectedParameters, router.route("/private/classic/home",
Collections.singletonMap("portal:componentId", new
String[]{"foo"})));
- assertEquals("/private/classic/home?portal:componentId=foo",
router.render(expectedParameters));
+ assertEquals(expectedParameters, router.route("/private/classic/home"));
+ assertEquals("/private/classic/home",
router.render(expectedParameters));
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/java/org/exoplatform/web/controller/router/TestPortalConfiguration.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -22,7 +22,6 @@
import org.exoplatform.web.controller.QualifiedName;
import static org.exoplatform.web.controller.metadata.DescriptorBuilder.*;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -45,7 +44,6 @@
with(
routeParam("gtn:handler").withValue("site"),
routeParam("gtn:handler").withValue("site"),
-
requestParam("gtn:componentid").named("portal:componentId"),
pathParam("gtn:path").matchedBy(".*").preservePath()),
route("/private/{gtn:sitetype}/{gtn:sitename}{gtn:path}").
with(
@@ -69,11 +67,10 @@
expectedParameters.put(Names.GTN_SITENAME, "classic");
expectedParameters.put(Names.GTN_SITETYPE, "portal");
expectedParameters.put(Names.GTN_PATH, "/");
- expectedParameters.put(Names.GTN_COMPONENTID, "foo");
//
- assertEquals(expectedParameters, router.route("/private/portal/classic/",
Collections.singletonMap("portal:componentId", new
String[]{"foo"})));
- assertEquals("/private/portal/classic/?portal:componentId=foo",
router.render(expectedParameters));
+ assertEquals(expectedParameters,
router.route("/private/portal/classic/"));
+ assertEquals("/private/portal/classic/",
router.render(expectedParameters));
}
public void testPrivateClassic() throws Exception
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/resources/org/exoplatform/web/controller/performance/controller.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/resources/org/exoplatform/web/controller/performance/controller.xml 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/test/resources/org/exoplatform/web/controller/performance/controller.xml 2011-11-17
08:22:46 UTC (rev 8086)
@@ -83,11 +83,6 @@
<value>portal</value>
</route-param>
- <!-- Webui parameters -->
- <request-param qname="gtn:componentid"
name="portal:componentId"/>
- <request-param qname="gtn:action" name="portal:action"/>
- <request-param qname="gtn:objectid" name="objectId"/>
-
<!-- The group access -->
<route path="/groups/{gtn:sitename}/{gtn:path}">
<request-param qname="gtn:lang" name="lang"
value-mapping="never-empty">
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/controller.xml 2011-11-17
08:22:46 UTC (rev 8086)
@@ -88,11 +88,6 @@
<value>portal</value>
</route-param>
- <!-- Webui parameters -->
- <request-param qname="gtn:componentid"
name="portal:componentId"/>
- <request-param qname="gtn:action" name="portal:action"/>
- <request-param qname="gtn:objectid" name="objectId"/>
-
<!-- The group access -->
<route path="/g/{gtn:sitename}/{gtn:path}">
<request-param qname="gtn:lang" name="lang"
value-mapping="never-empty">
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/url/ComponentURL.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/url/ComponentURL.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/url/ComponentURL.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -35,24 +35,18 @@
*/
public class ComponentURL extends PortalURL<UIComponent, ComponentURL>
{
+ public static final String PORTAL_COMPONENT_ID = "portal:componentId";
+ public static final String PORTAL_COMPONENT_ACTION = "portal:action";
+
/** . */
public static final ResourceType<UIComponent, ComponentURL> TYPE = new
ResourceType<UIComponent, ComponentURL>() {};
/** . */
- public static final QualifiedName COMPONENT = QualifiedName.create("gtn",
"componentid");
-
- /** . */
- public static final QualifiedName ACTION = QualifiedName.create("gtn",
"action");
-
- /** . */
- public static final QualifiedName TARGET = QualifiedName.create("gtn",
"objectid");
-
- /** . */
public static final QualifiedName PATH = QualifiedName.create("gtn",
"path");
/** . */
- private static final Set<QualifiedName> NAMES =
Collections.unmodifiableSet(Tools.toSet(COMPONENT, ACTION, TARGET, PATH));
+ private static final Set<QualifiedName> NAMES =
Collections.unmodifiableSet(Tools.toSet(PATH));
/** . */
private UIComponent resource;
@@ -61,9 +55,6 @@
private String action;
/** . */
- private String targetBeanId;
-
- /** . */
private String path;
public ComponentURL(URLContext context) throws NullPointerException
@@ -79,9 +70,27 @@
public ComponentURL setResource(UIComponent resource)
{
this.resource = resource;
+
+ if (resource != null)
+ {
+ setQueryParameterValue(PORTAL_COMPONENT_ID, resource.getId());
+ }
+
return this;
}
+ public void reset()
+ {
+ super.reset();
+
+ //
+ if (resource != null)
+ {
+ setQueryParameterValue(PORTAL_COMPONENT_ID, resource.getId());
+ }
+ setQueryParameterValue(PORTAL_COMPONENT_ACTION, action);
+ }
+
public Set<QualifiedName> getParameterNames()
{
return NAMES;
@@ -89,20 +98,8 @@
public String getParameterValue(QualifiedName parameterName)
{
- if (COMPONENT.equals(parameterName))
+ if (PATH.equals(parameterName))
{
- return resource != null ? resource.getId() : null;
- }
- else if (ACTION.equals(parameterName))
- {
- return action;
- }
- else if (TARGET.equals(parameterName))
- {
- return targetBeanId;
- }
- else if (PATH.equals(parameterName))
- {
return path;
}
else
@@ -111,26 +108,12 @@
}
}
- public String getAction()
- {
- return action;
- }
-
public void setAction(String action)
{
this.action = action;
+ setQueryParameterValue(PORTAL_COMPONENT_ACTION, action);
}
- public String getTargetBeanId()
- {
- return targetBeanId;
- }
-
- public void setTargetBeanId(String targetBeanId)
- {
- this.targetBeanId = targetBeanId;
- }
-
public String getPath()
{
return path;
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -89,9 +89,9 @@
final static public int PRIVATE_ACCESS = 1;
- final static public String UI_COMPONENT_ACTION = "portal:action";
+ final static public String UI_COMPONENT_ACTION =
ComponentURL.PORTAL_COMPONENT_ACTION;
- final static public String UI_COMPONENT_ID = "portal:componentId";
+ final static public String UI_COMPONENT_ID = ComponentURL.PORTAL_COMPONENT_ID;
final static public String TARGET_NODE = "portal:targetNode";
@@ -475,7 +475,7 @@
public String getUIComponentIdParameterName()
{
- return PortalRequestContext.UI_COMPONENT_ID;
+ return ComponentURL.PORTAL_COMPONENT_ID;
}
public SiteType getSiteType()
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -59,11 +59,7 @@
private String createURL(boolean ajax, UIComponent targetComponent, String action,
String confirm, String targetBeanId, Parameter[] params)
{
- Map<String,String[]> queryParameters = url.getQueryParameters();
- if (queryParameters != null)
- {
- queryParameters.clear();
- }
+ url.reset();
//
url.setAjax(ajax);
@@ -72,7 +68,7 @@
//
url.setAction(action);
- url.setTargetBeanId(targetBeanId);
+ url.setQueryParameterValue(UIComponent.OBJECTID, targetBeanId);
//
if (params != null)
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -116,12 +116,8 @@
.append(PortalRequestContext.UI_COMPONENT_ID).append("=").append(this.portletId);
*/
- //Clear URL parameters
- Map<String, String[]> queryParameters = url.getQueryParameters();
- if (queryParameters != null)
- {
- queryParameters.clear();
- }
+ //Reset query parameters
+ url.reset();
String type;
if (containerURL instanceof RenderURL)
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2011-11-17
08:10:36 UTC (rev 8085)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2011-11-17
08:22:46 UTC (rev 8086)
@@ -39,6 +39,7 @@
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.validator.EmailAddressValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.exoplatform.webui.url.ComponentURL;
import org.gatein.wci.security.Credentials;
import java.net.URLEncoder;
@@ -145,7 +146,7 @@
HttpServletRequest request = portalContext.getRequest();
String host = request.getScheme() + "://" + request.getServerName() +
":" + request.getServerPort();
String activeLink = host + requestContext.getRequestContextPath() +
"/public/" + portalName
- +
"?portal:componentId=UIPortal&portal:action=RecoveryPasswordAndUsername&tokenId="
+ + "?" + ComponentURL.PORTAL_COMPONENT_ID +
"=UIPortal&portal:action=RecoveryPasswordAndUsername&tokenId="
+ tokenId;
String mailText = headerMail + "\n" + activeLink + footerMail;
try
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4868,4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7906,8045
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4868,4875,4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603,6771-6772,6774
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4876,4891,5269,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7085,7095,7117,7125,7132-7134,7186,7198,7239,7262,7308,7326,7330-7334,7359,7367,7412,7433,7450-7452,7454,7478,7497,7500,7552,7554-7555,7570-7571,7573,7577,7598,7614-7615,7695-7696,7701-7704,7737,7741,7748,7773,7780,7877,7900,7906,7928,7938,8045,8053,8072