public class SeoERecFormatter extends Object implements ERecFormatter
ERecFormatter
that formats the UrlState
associated with an Endecan record in SEO Optimized format,
taking into account record Dimension Values and Properties.
Property Summary | ||
---|---|---|
Property | Type | Default Value |
useDimensionNameAsKey |
boolean |
false |
dimLocationFormatters |
|
null |
propertyKeys |
String[] |
empty |
propertyFormatter |
|
NOOP_STRING_FORMATTER = new StringFormatter() |
Constructor and Description |
---|
SeoERecFormatter() |
Modifier and Type | Method and Description |
---|---|
String |
formatERec(UrlState pUrlState,
com.endeca.navigation.ERec pERec) |
DimLocationFormatter[] |
getDimLocationFormatters() |
StringFormatter |
getPropertyFormatter() |
String[] |
getPropertyKeys() |
boolean |
getUseDimensionNameAsKey()
Indicates whether
DimLocationFormatter objects should be associated
to this formatter by dimension name or id. |
void |
setDimLocationFormatters(DimLocationFormatter[] pDimLocationFormatters)
Specifies a list of DimLocationFormatters that will be used to format the DimLocations in the UrlState.
|
void |
setPropertyFormatter(StringFormatter pPropertyFormatter)
Specifies a class that implements StringFormatter to format each of the properties included in the propertyKeys.
|
void |
setPropertyKeys(String[] pPropertyKeys)
Specifies a list of Record Property keys that will be included in the formatted Url.
|
void |
setUseDimensionNameAsKey(boolean pUseDimensionNameAsKey)
Specifies whether
DimLocationFormatter objects should be associated
to this formatter by dimension name or id. |
public boolean getUseDimensionNameAsKey()
DimLocationFormatter
objects should be associated
to this formatter by dimension name or id.public void setUseDimensionNameAsKey(boolean pUseDimensionNameAsKey)
DimLocationFormatter
objects should be associated
to this formatter by dimension name or id.pUseDimensionNameAsKey
- flag indicating whether dimension name should be used.SeoDimLocationFormatter.getKey()
,
setDimLocationFormatters(DimLocationFormatter[])
public DimLocationFormatter[] getDimLocationFormatters()
public void setDimLocationFormatters(DimLocationFormatter[] pDimLocationFormatters)
pDimLocationFormatters
- Array of DimLocationFormatter objects used to format the UrlState. SeoDimLocationFormatter
for an example implementation of a DimLocation formatter.public String[] getPropertyKeys()
public void setPropertyKeys(String[] pPropertyKeys)
pPropertyKeys
- Array of Properties to include in the formatted Url. public StringFormatter getPropertyFormatter()
public void setPropertyFormatter(StringFormatter pPropertyFormatter)
pPropertyFormatter
- StringFormatter class to format the propertyKeys. public String formatERec(UrlState pUrlState, com.endeca.navigation.ERec pERec) throws UrlFormatException
formatERec
in interface ERecFormatter
UrlFormatException
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.