A URL configuration file defines a
BasicQueryBuilder and a top-level
SeoUrlFormatter.
To create a URL configuration file, follow these steps:
Create a basic query builder that invokes the
com.endeca.soleng.urlformatter.basic.BasicQueryBuilderclass:For example:
<bean id="queryBuilder" class="com.endeca.soleng.urlformatter.basic.BasicQueryBuilder"> </bean>
Option Description queryEncodingSpecifies the query encoding. For example: <value>UTF-8</value>baseUrlENEQuerySets the baseUrLENEQuery. This query is used to create theUrlENEQueryif theUrlStateis not associated with a record or navigation state. If this value is<null/>, a new query is created.baseNavigationUrlENEQuerySets the baseNavigationUrlENEQuery. This query is used to create theUrlENEQueryif theUrlStateis associated with a navigation state (but not a record or aggregate record). If this value is<null/>, a new query is created.baseERecUrlENEQuerySets the baseERecUrlENEQuery. This query is used to create theUrlENEQueryif theUrlStateis associated with a record (but not an aggregate record). If this value is<null/>, a new query is created.baseAggrERecUrlENEQuerySets the baseAggrERecUrlENEQuery. This query is used to create theUrlENEQueryif theUrlStateis associated with an aggregate record. If this value is<null/>, a new query is created.defaultUrlENEQuerySets the detaultUrlENEQuery. This query is used to create theUrlENEQueryif theUrlStatecontains no parameters.For example:
<bean id="queryBuilder" class="com.endeca.soleng.urlformatter.basic.BasicQueryBuilder"> <property name="queryEncoding"> <value>UTF-8</value> </property> <property name="baseUrlENEQuery"> <value><![CDATA[N=0&Ns=P_Price|1&Nr=8020]]></value> </property> <property name="baseNavigationUrlENEQuery"> <value><![CDATA[N=0&Ns=P_Price|1&Nr=8020]]></value> </property> <property name="baseERecUrlENEQuery"> <null/> </property> <property name="baseAggrERecUrlENEQuery"> <value>An=0</value> <null/> </property> <property name="defaultUrlENEQuery"> <value>N=0</value> </property> </bean>Create a top-level
seoUrlFormatterbean to invoke thecom.endeca.soleng.urlformatter.seo.SeoUrlFormatterclass:For example:
<bean id="seoUrlFormatter" class="com.endeca.soleng.urlformatter.seo.SeoUrlFormatter"> </bean>
Option Description defaultEncodingSpecifies the default query encoding. For example: <value>UTF-8</value>pathSeparatorTokenSpecifies the character used to separate the misc-path from the path-params section in URLs. pathKeyValueSeparatorSpecifies the character used to separate key-value pairs in the path parameter section of the URL. For example:
<bean id="seoUrlFormatter" class="com.endeca.soleng.urlformatter.seo.SeoUrlFormatter"> <property name="defaultEncoding"> <value>UTF-8</value> </property> <property name="pathSeparatorToken"> <value>_</value> </property> <property name="pathKeyValueSeparator"> <value>-</value> </property> <!-- additional elements deleted from this example --!> </bean>Set any required properties to specify configuration beans.
Note
The instructions in this chapter explain which of beans are required for each task. You can set these properties on your
SeoUrlProviderobject as you work through the chapter.For example:
<bean id="seoUrlFormatter" class="com.endeca.soleng.urlformatter.seo.SeoUrlFormatter"> <property name="pathParamKeys"> <list> <value>R</value> <value>A</value> <value>An</value> <value>Au</value> <value>N</value> <value>No</value> <value>Np</value> <value>Nu</value> <value>D</value> <value>Ntt</value> <value>Ne</value> </list> </property> <property name="navStateFormatter"> <ref bean="navStateFormatter"/> </property> <property name="ERecFormatter"> <ref bean="erecFormatter"/> </property> <property name="aggrERecFormatter"> <ref bean="aggrERecFormatter"/> </property> <property name="navStateCanonicalizer"> <ref bean="navStateCanonicalizer"/> </property> <property name="urlParamEncoders"> <list> <ref bean="N-paramEncoder"/> <ref bean="Ne-paramEncoder"/> <ref bean="An-paramEncoder"/> </list> </property> </bean>
After you have created the basic URL configuration file, you create additional beans to specify further configuration for the misc-path and path-params. Follow the procedures in the sections below to complete your URL configuration.
Related links

