@Exposed @Component @Scope(value="prototype") public class WebCmsSiteConfigurationImpl extends Object implements WebCmsSiteConfiguration, WebCmsDomainAware
WebCmsSiteConfiguration.
This class is deliberately left open for extension and (partial) modification.| Constructor and Description |
|---|
WebCmsSiteConfigurationImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAttribute(String attributeName)
Get the value of the attribute identified by
attributeName. |
<Y> Y |
getAttribute(String attributeName,
Class<Y> attributeType)
Get the value of the attribute identified by
attributeName. |
<Y> Y |
getAttribute(String attributeName,
Class<Y> attributeType,
Y defaultValue)
Get the value of the attribute identified by
attributeName. |
<Y> Y |
getAttribute(String attributeName,
org.springframework.core.convert.TypeDescriptor attributeType,
Y defaultValue)
Get the value of the attribute identified by
attributeName. |
String |
getCookieDomain() |
Locale |
getDefaultLocale() |
WebCmsDomain |
getDomain() |
String |
getDomainKey() |
List<String> |
getHostNames()
List of the hostnames this domain matches.
|
Locale |
getLocaleForHostName(String hostName)
Get the configured locale for a particular configured host name.
|
Map<String,Locale> |
getLocales() |
String |
getName() |
int |
getSortIndex() |
String |
getUrlPrefix() |
boolean |
hasAttribute(String attributeName) |
boolean |
isAlwaysPrefix() |
void |
setWebCmsDomain(WebCmsDomain domain)
Set the domain this metadata belongs to.
|
public void setWebCmsDomain(WebCmsDomain domain)
WebCmsDomainAwaresetWebCmsDomain in interface WebCmsDomainAwaredomain - instancepublic WebCmsDomain getDomain()
getDomain in interface WebCmsSiteConfigurationpublic String getDomainKey()
getDomainKey in interface WebCmsSiteConfigurationpublic String getName()
getName in interface WebCmsSiteConfigurationpublic List<String> getHostNames()
WebCmsSiteConfigurationgetHostNames in interface WebCmsSiteConfigurationpublic String getCookieDomain()
getCookieDomain in interface WebCmsSiteConfigurationpublic Locale getDefaultLocale()
getDefaultLocale in interface WebCmsSiteConfigurationpublic Map<String,Locale> getLocales()
getLocales in interface WebCmsSiteConfigurationpublic Locale getLocaleForHostName(String hostName)
WebCmsSiteConfigurationnull if no locale is configured and no default locale is set.getLocaleForHostName in interface WebCmsSiteConfigurationhostName - to get the locale forpublic int getSortIndex()
getSortIndex in interface WebCmsSiteConfigurationpublic final String getAttribute(String attributeName)
WebCmsSiteConfigurationattributeName.
Return null if the attribute doesn't exist.getAttribute in interface WebCmsSiteConfigurationattributeName - the unique attribute keypublic final <Y> Y getAttribute(String attributeName, Class<Y> attributeType)
WebCmsSiteConfigurationattributeName.
The value will be converted to the attributeType specified.
Return null if the attribute doesn't exist.getAttribute in interface WebCmsSiteConfigurationattributeName - the unique attribute keyattributeType - type the attribute should havepublic final <Y> Y getAttribute(String attributeName, org.springframework.core.convert.TypeDescriptor attributeType, Y defaultValue)
WebCmsSiteConfigurationattributeName.
The value will be converted to the attributeType specified.
Return null if the attribute doesn't exist.
This variant uses the TypeDescriptor to define the attribute type,
allowing for the use of parametrized types.getAttribute in interface WebCmsSiteConfigurationattributeName - the unique attribute keyattributeType - type the attribute should havedefaultValue - if attribute not presentpublic final <Y> Y getAttribute(String attributeName, Class<Y> attributeType, Y defaultValue)
WebCmsSiteConfigurationattributeName.
The value will be converted to the attributeType specified.
Return null if the attribute doesn't exist.getAttribute in interface WebCmsSiteConfigurationattributeName - the unique attribute keyattributeType - type the attribute should havedefaultValue - if attribute not presentpublic final boolean hasAttribute(String attributeName)
hasAttribute in interface WebCmsSiteConfigurationattributeName - to check forpublic String getUrlPrefix()
getUrlPrefix in interface WebCmsDomainUrlConfigurerpublic boolean isAlwaysPrefix()
isAlwaysPrefix in interface WebCmsDomainUrlConfigurerWebCmsDomainUrlConfigurer.getUrlPrefix()Copyright © 2020. All rights reserved.