Author: julien_viet
Date: 2010-11-29 14:02:26 -0500 (Mon, 29 Nov 2010)
New Revision: 5357
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/gatein_router_1_0.xsd
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/router.xml
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/default-router.xml
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/proto-router-1.xml
Log:
more convenient name in XML schema
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/gatein_router_1_0.xsd
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/gatein_router_1_0.xsd 2010-11-29
16:47:37 UTC (rev 5356)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/gatein_router_1_0.xsd 2010-11-29
19:02:26 UTC (rev 5357)
@@ -49,12 +49,12 @@
</xs:complexType>
<xs:complexType name="routeParamType">
- <xs:attribute name="name" type="xs:string"
use="required"/>
+ <xs:attribute name="qname" type="xs:string"
use="required"/>
<xs:attribute name="value" type="xs:string"
use="required"/>
</xs:complexType>
<xs:complexType name="pathParamType">
- <xs:attribute name="name" type="xs:string"
use="required"/>
+ <xs:attribute name="qname" type="xs:string"
use="required"/>
<xs:attribute name="pattern" type="xs:string"
use="optional"/>
<xs:attribute name="encoding" use="optional">
<xs:simpleType>
@@ -67,9 +67,9 @@
</xs:complexType>
<xs:complexType name="requestParamType">
+ <xs:attribute name="qname" type="xs:string"
use="required"/>
<xs:attribute name="name" type="xs:string"
use="required"/>
- <xs:attribute name="matchName" type="xs:string"
use="required"/>
- <xs:attribute name="matchValue" type="xs:string"
use="optional"/>
+ <xs:attribute name="value" type="xs:string"
use="optional"/>
<xs:attribute name="required" type="xs:boolean"
use="optional"/>
</xs:complexType>
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java 2010-11-29
16:47:37 UTC (rev 5356)
+++
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/DescriptorBuilder.java 2010-11-29
19:02:26 UTC (rev 5357)
@@ -93,21 +93,21 @@
{
if (paramQN.equals(reader.getName()))
{
- String name = reader.getAttributeValue(null, "name");
+ String name = reader.getAttributeValue(null, "qname");
String value = reader.getAttributeValue(null, "value");
routeDesc.addRouteParam(QualifiedName.parse(name), value);
}
else if (requestParamQN.equals(reader.getName()))
{
- String name = reader.getAttributeValue(null, "name");
- String matchName = reader.getAttributeValue(null, "matchName");
- String matchValue = reader.getAttributeValue(null,
"matchValue");
+ String name = reader.getAttributeValue(null, "qname");
+ String matchName = reader.getAttributeValue(null, "name");
+ String matchValue = reader.getAttributeValue(null, "value");
String optional = reader.getAttributeValue(null, "required");
routeDesc.addRequestParam(QualifiedName.parse(name), matchName,
matchValue, "true".equals(optional));
}
else if (pathParamQN.equals(reader.getName()))
{
- String name = reader.getAttributeValue(null, "name");
+ String name = reader.getAttributeValue(null, "qname");
String pattern = reader.getAttributeValue(null, "pattern");
String encoded = reader.getAttributeValue(null, "encoding");
EncodingMode encodingMode = "preserve-path".equals(encoded) ?
EncodingMode.PRESERVE_PATH : EncodingMode.FORM;
Modified:
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/router.xml
===================================================================
---
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/router.xml 2010-11-29
16:47:37 UTC (rev 5356)
+++
portal/branches/navcontroller/component/web/controller/src/test/java/org/exoplatform/web/controller/router/router.xml 2010-11-29
19:02:26 UTC (rev 5357)
@@ -4,34 +4,34 @@
xmlns="http://www.gatein.org/xml/ns/gatein_router_1_0">
<route path="/public/{gtn:sitetype}/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:handler" value="portal"/>
- <path-param name="gtn:path" pattern=".*"/>
+ <route-param qname="gtn:handler" value="portal"/>
+ <path-param qname="gtn:path" pattern=".*"/>
</route>
<route path="/private/{gtn:sitetype}/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:handler" value="portal"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:handler" value="portal"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
<route path="/upload">
- <route-param name="gtn:handler" value="upload"/>
+ <route-param qname="gtn:handler" value="upload"/>
</route>
<route path="/download">
- <route-param name="gtn:handler" value="download"/>
+ <route-param qname="gtn:handler" value="download"/>
</route>
<route path="/a">
- <route-param name="a" value="a_value"/>
+ <route-param qname="a" value="a_value"/>
<route path="/b">
- <route-param name="b" value="b_value"/>
+ <route-param qname="b" value="b_value"/>
</route>
</route>
<route path="/b">
- <request-param name="foo" matchName="foo"/>
- <request-param name="bar" matchName="bar"
matchValue="bar"/>
- <request-param name="juu" matchName="juu"
matchValue="juu" required="true"/>
+ <request-param qname="foo" name="foo"/>
+ <request-param qname="bar" name="bar"
value="bar"/>
+ <request-param qname="juu" name="juu" value="juu"
required="true"/>
</route>
</router>
\ No newline at end of file
Modified:
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/default-router.xml
===================================================================
---
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/default-router.xml 2010-11-29
16:47:37 UTC (rev 5356)
+++
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/default-router.xml 2010-11-29
19:02:26 UTC (rev 5357)
@@ -6,49 +6,49 @@
<route path="/">
<!-- Use the portal handler -->
- <route-param name="gtn:handler" value="portal"/>
+ <route-param qname="gtn:handler" value="portal"/>
<!-- Webui parameters -->
- <request-param name="gtn:componentid"
matchName="portal:componentId" required="false"/>
- <request-param name="gtn:action" matchName="portal:action"
required="false"/>
- <request-param name="gtn:objectid" matchName="objectId"
required="false"/>
+ <request-param qname="gtn:componentid"
name="portal:componentId" required="false"/>
+ <request-param qname="gtn:action" name="portal:action"
required="false"/>
+ <request-param qname="gtn:objectid" name="objectId"
required="false"/>
<!-- The public access -->
<route path="/public/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:access" value="public"/>
- <route-param name="gtn:sitetype" value="portal"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="public"/>
+ <route-param qname="gtn:sitetype" value="portal"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
<!-- The private access -->
<route path="/private/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:access" value="private"/>
- <route-param name="gtn:sitetype" value="portal"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="private"/>
+ <route-param qname="gtn:sitetype" value="portal"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
<!-- The group access -->
<route path="/groups/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:access" value="private"/>
- <route-param name="gtn:sitetype" value="group"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="private"/>
+ <route-param qname="gtn:sitetype" value="group"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
<!-- The user access -->
<route path="/users/{gtn:sitename}{gtn:path}">
- <route-param name="gtn:access" value="private"/>
- <route-param name="gtn:sitetype" value="user"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="private"/>
+ <route-param qname="gtn:sitetype" value="user"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
</route>
<route path="/upload">
- <route-param name="gtn:handler" value="upload"/>
+ <route-param qname="gtn:handler" value="upload"/>
</route>
<route path="/download">
- <route-param name="gtn:handler" value="download"/>
+ <route-param qname="gtn:handler" value="download"/>
</route>
</router>
\ No newline at end of file
Modified:
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/proto-router-1.xml
===================================================================
---
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/proto-router-1.xml 2010-11-29
16:47:37 UTC (rev 5356)
+++
portal/branches/navcontroller/web/portal/src/main/webapp/WEB-INF/conf/proto-router-1.xml 2010-11-29
19:02:26 UTC (rev 5357)
@@ -8,33 +8,33 @@
<route path="/">
<!-- Use the portal handler -->
- <route-param name="gtn:handler" value="portal"/>
+ <route-param qname="gtn:handler" value="portal"/>
<!-- Webui parameters -->
- <request-param name="gtn:componentid"
matchName="portal:componentId" required="false"/>
- <request-param name="gtn:action" matchName="portal:action"
required="false"/>
- <request-param name="gtn:objectid" matchName="objectId"
required="false"/>
+ <request-param qname="gtn:componentid"
name="portal:componentId" required="false"/>
+ <request-param qname="gtn:action" name="portal:action"
required="false"/>
+ <request-param qname="gtn:objectid" name="objectId"
required="false"/>
<!-- The public access -->
<route path="/public/{gtn:sitename}{gtn:path}.html">
- <route-param name="gtn:access" value="public"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="public"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
<!-- The private access -->
<route path="/private/{gtn:sitename}{gtn:path}.html">
- <route-param name="gtn:access" value="private"/>
- <path-param name="gtn:path" pattern=".*"
encoding="preserve-path"/>
+ <route-param qname="gtn:access" value="private"/>
+ <path-param qname="gtn:path" pattern=".*"
encoding="preserve-path"/>
</route>
</route>
<route path="/upload">
- <route-param name="gtn:handler" value="upload"/>
+ <route-param qname="gtn:handler" value="upload"/>
</route>
<route path="/download">
- <route-param name="gtn:handler" value="download"/>
+ <route-param qname="gtn:handler" value="download"/>
</route>
</router>
\ No newline at end of file