@StableMinor(version="12.4", sinceVersion="4.0") public class ChannelConfig extends StructureElement implements ICloneableCacheEntry, ICloneableConfig<ChannelConfig>
Modifier and Type | Field and Description |
---|---|
static String |
CHANNEL_DEFAULT_LOCALE_PROPERTY_NAME
Channel default locale property name.
|
static String |
CHANNEL_DETECT_USER_FROM_BROWSER_LOCALES_PROPERTY_NAME
Channel use browser locale property name.
|
static String |
CHANNEL_SUPPORTED_LOCALES_PROPERTY_NAME
Channel acceptable locales property name.
|
static int |
CHANNEL_TYPE_BASIC |
static int |
CHANNEL_TYPE_LUMISADMIN |
static int |
FRIENDLY_PATH_TYPE_CHANNEL_NAME
The friendly path is generated using the parent channel's path and
appending this channel's name
|
static int |
FRIENDLY_PATH_TYPE_INHERIT
The friendly path is the same as this channel's parent friendly path.
|
static int |
FRIENDLY_PATH_TYPE_USER_DEFINED
The friendly path is user defined.
|
static String |
LUMIS_ADMIN_CHANNEL_ID |
static String |
PORTAL_CHANNEL_ID |
Constructor and Description |
---|
ChannelConfig() |
Modifier and Type | Method and Description |
---|---|
protected void |
applyPropertyBagChanges()
Apply the changes made to the properties managed by this element to the property
bag persistence entities.
|
ChannelConfig |
clone() |
void |
deserialize(Node channelNode) |
protected void |
deserializePropertyBag(Node propertyBagNode)
Updates this element's property bag according to the given serialized
property bag node.
|
boolean |
equals(Object o) |
Collection<Locale> |
getAcceptableLocales()
Returns this channel's acceptable locales.
If this channel does not define this property, it will be searched in parents recursively until a parent that defines it could be found or the root channel is reached. |
Collection<Locale> |
getAcceptableLocalesLocal()
Returns this channel's acceptable locales.
If this channel does not define this property, null will be returned.If the inheritance should be used, consider using getAcceptableLocales() instead.Only the locales that exists in LumisPortal global locales are returned. |
String |
getAccessControlListId() |
int |
getCachePages() |
int |
getCenterPages() |
Locale |
getDefaultLocale()
Returns the default locale of this channel.
If this channel does not define a default locale, it will be inherited from parent channel recursively. |
Locale |
getDefaultLocaleLocal()
Returns the default locale of this channel.
If this channel does not define a default locale, null will be returned. |
String |
getDescription() |
String |
getFriendlyId()
Returns the channel's friendly identifier.
|
protected int |
getFriendlyIdMaxLength()
Returns the maximum length of friendly identifier.
|
int |
getFriendlyPathType() |
String |
getFriendlyPathUserDefined() |
String |
getFriendlyURLPattern()
Returns the friendly URL pattern specific for this channel (non-inheritable).
|
String |
getId() |
String |
getLayoutFilePath()
Returns the path for the layout file for use by this channel.
|
int |
getLayoutPagesType()
Returns the layout format for pages.
|
String |
getLocalGroupPrefix() |
protected Pattern |
getManagedPropertiesPattern()
Returns the property name spaces.
|
String |
getName() |
String |
getPageRuntimeDataProviderClassName()
Deprecated.
Since 5.0.0 replaced by
getPageWebResourceDataProviderClassName() . |
int |
getPageRuntimeDataProviderType()
Deprecated.
Since 5.0.0 replaced by
getPageWebResourceDataProviderType() . |
String |
getPageTemplateId() |
String |
getPageWebResourceDataProviderClassName()
Returns the class name for the page web resource data provider.
|
int |
getPageWebResourceDataProviderType()
Returns the page web resource data provider type.
|
String |
getParentId() |
String |
getParentTemplateId() |
int |
getPosition() |
String |
getPropertyBagId()
Returns the property bag identifier.
|
int |
getProtocol() |
String |
getTemplateLocalGroupPrefix()
Returns the template local group prefix.
|
int |
getType() |
boolean |
hasLocalGroups() |
boolean |
isAutomaticFriendlyId()
Returns whether the channel is going to use automatic generated friendly
identifier or not.
|
boolean |
isFriendlyURLPatternEnabled()
Returns if the friendly URL pattern specific for this channel
(non-inheritable) is enabled.
|
boolean |
isHidden() |
boolean |
isIgnoreOnExportImport()
Returns whether this channel will be ignored on export and import.
|
boolean |
isInheritMetaTags() |
boolean |
isInheritPageTemplate() |
boolean |
isInheritProtocol()
Deprecated.
since 4.0.11. This property is acquired via the
getProtocol() method. |
boolean |
isInheritStylesheet() |
boolean |
isTemplate() |
boolean |
isUseBrowserAcceptedLanguages()
Returns whether browser's accepted languages are to be used when setting user's locale.
If this channel does not define this property, it will be searched until a parent that defines it could be found or the root channel is reached. |
Boolean |
isUseBrowserAcceptedLanguagesLocal()
Returns whether browser's accepted languages are to be used when setting user's locale.
If this channel does not define this property, null will be returned.If the inheritance should not be ignored, consider using isUseBrowserAcceptedLanguages() instead. |
protected void |
loadPropertyBagValues()
Loads the values of the property bag of this element.
|
protected boolean |
mayUseFriendlyId(String friendlyId)
Indicates if the element may use the given friendly identifier.
|
void |
serialize(ChannelConfig channelConfig,
OutputStream outputStream) |
void |
setAcceptableLocales(Collection<Locale> acceptableLocales)
Sets the acceptable locales of this channel.
Only accepts locales existent in LumisPortal global locales. |
void |
setAccessControlListId(String accessControlListId) |
void |
setAutoGeneratedFriendlyId()
Generates a new friendly identifier and sets it as the friendly
identifier of this channel.
|
void |
setAutomaticFriendlyId(boolean automaticFriendlyId)
Indicates whether the channel is going to use automatic generated
friendly identifier or not.
|
void |
setCachePages(int cachePages) |
void |
setCenterPages(int centerPages) |
void |
setDefaultLocale(Locale defaultLocale)
Sets the default locale of this channel.
|
void |
setDescription(String description) |
void |
setFriendlyId(String friendlyId)
Sets the channel's friendly identifier.
|
void |
setFriendlyPathType(int friendlyPathType) |
void |
setFriendlyPathUserDefined(String friendlyPathUserDefined) |
void |
setFriendlyURLPattern(String friendlyURLPattern)
Sets the friendly URL pattern specific for this channel (non-inheritable).
|
void |
setFriendlyURLPatternEnabled(boolean friendlyURLPatternEnabled)
Sets if the friendly URL pattern specific for this channel
(non-inheritable) is enabled.
|
void |
setHidden(boolean hidden) |
void |
setId(String id) |
void |
setIgnoreOnExportImport(boolean ignoreOnExportImport)
Sets whether this channel will be ignored on export and import.
|
void |
setInheritMetaTags(boolean inheritMetaTags) |
void |
setInheritPageTemplate(boolean inheritPageTemplate) |
void |
setInheritProtocol(boolean inheritProtocol)
Deprecated.
since 4.0.11. This property is set via the
#setProtocol() method. |
void |
setInheritStylesheet(boolean inheritStylesheet) |
void |
setLayoutFilePath(String layoutFile)
Sets the path for the layout file.
|
void |
setLayoutPagesType(int layoutPagesType)
Sets the layout format for pages.
|
protected void |
setLayoutPagesTypeInternal(int layoutPagesType)
Sets the layout format for pages.
|
void |
setLocalGroupPrefix(String localGroupPrefix) |
void |
setLocalGroups(boolean localGroups) |
void |
setName(String name) |
void |
setPageRuntimeDataProviderClassName(String runtimeDataProviderClassName)
Deprecated.
Since 5.0.0 replaced by
setPageWebResourceDataProviderClassName(String) . |
void |
setPageRuntimeDataProviderType(int runtimeDataProviderType)
Deprecated.
Since 5.0.0 replaced by
setPageWebResourceDataProviderType(int) . |
void |
setPageTemplateId(String pageTemplateId) |
void |
setPageWebResourceDataProviderClassName(String providerClassName)
Sets the page web resource provider class name.
|
void |
setPageWebResourceDataProviderType(int providerType)
Sets the page web resource data provider type.
|
void |
setParentId(String parentId) |
void |
setParentTemplateId(String parentTemplateId) |
void |
setPosition(int position) |
protected void |
setPropertyBagId(String propertyBagId)
Sets the property bag identifier.
|
void |
setProtocol(int protocol) |
void |
setTemplate(boolean isTemplate) |
void |
setTemplateLocalGroupPrefix(String templateLocalGroupPrefix)
Sets the template local group prefix.
|
void |
setType(int type) |
void |
setUseBrowserAcceptedLanguages(Boolean useBrowserAcceptedLanguages)
Sets whether browser's accepted languages are to be used when setting user's locale.
|
getAutomaticFriendlyId, getFriendlyIdBaseValue, getFriendlyIdValueForCounter, getLocalPropertyValue, getLocalPropertyValues, getPropertyValue, getPropertyValues, isManagedProperty, normalizeFriendlyId, removeProperty, serializePropertyBag, setPropertyValue, setPropertyValues, stripAccents
public static final String CHANNEL_SUPPORTED_LOCALES_PROPERTY_NAME
public static final String CHANNEL_DETECT_USER_FROM_BROWSER_LOCALES_PROPERTY_NAME
public static final String CHANNEL_DEFAULT_LOCALE_PROPERTY_NAME
public static final int CHANNEL_TYPE_BASIC
public static final int CHANNEL_TYPE_LUMISADMIN
public static final String PORTAL_CHANNEL_ID
public static final String LUMIS_ADMIN_CHANNEL_ID
public static final int FRIENDLY_PATH_TYPE_CHANNEL_NAME
public static final int FRIENDLY_PATH_TYPE_USER_DEFINED
public static final int FRIENDLY_PATH_TYPE_INHERIT
protected Pattern getManagedPropertiesPattern()
StructureElement
getManagedPropertiesPattern
in class StructureElement
protected void loadPropertyBagValues() throws PortalException
StructureElement
Only the properties that can be changed are actually loaded.
loadPropertyBagValues
in class StructureElement
PortalException
StructureElement.isManagedProperty(String)
protected void applyPropertyBagChanges() throws PortalException
StructureElement
applyPropertyBagChanges
in class StructureElement
PortalException
StructureElement.isManagedProperty(String)
public String getLayoutFilePath()
The layout file is inherited to child elements and from parent.
If getLayoutPagesType()
is not PageConfig.PAGE_LAYOUT_TYPE_LAYOUT_FILE
(or inherited it),
this method will return null
since no layout file is to be used.
<lumisdata>/def
directory,
possibly inherited from parent channel; or null
if no layout file is to be used.getLayoutPagesType()
,
setLayoutFilePath(String)
public void setLayoutFilePath(String layoutFile)
The path must be relative to the <lumisdata>/def
directory, or
null
for inheriting the value from the parent channel.
The layout file is inherited to child elements.
The layout file property is applicable only if getLayoutPagesType()
is
PageConfig.PAGE_LAYOUT_TYPE_LAYOUT_FILE
or inherited this value.
layoutFile
- the path relative to the <lumisdata>/def
directory, or
null
for inheriting the value from the parent channel.setLayoutPagesType(int)
public String getId()
public void setId(String id)
id
- The channelId to set.public String getDescription()
public void setDescription(String description)
description
- The description to set.public String getName()
public void setName(String name)
name
- The name to set.public boolean isHidden()
public void setHidden(boolean hidden)
hidden
- The hidden to set.public boolean isInheritStylesheet()
public boolean isInheritMetaTags()
public void setInheritStylesheet(boolean inheritStylesheet)
inheritStylesheet
- public void setInheritMetaTags(boolean inheritMetaTags)
inheritMetaTags
- @Deprecated public boolean isInheritProtocol()
getProtocol()
method.@Deprecated public void setInheritProtocol(boolean inheritProtocol)
#setProtocol()
method.inheritProtocol
- The inheritProtocol to set.public boolean isTemplate()
public void setTemplate(boolean isTemplate)
isTemplate
- The isTemplate to set.public String getPageTemplateId()
public void setPageTemplateId(String pageTemplateId)
pageTemplateId
- The pageTemplateId to set.public String getParentId()
public void setParentId(String parentId)
parentId
- The parentId to set.public int getPosition()
public void setPosition(int position)
position
- The position to set.public int getProtocol()
public void setProtocol(int protocol)
protocol
- The protocol to set.public int getType()
public void setType(int type)
type
- The type to set.public String getAccessControlListId()
public void setAccessControlListId(String accessControlListId)
accessControlListId
- The accessControlListId to set.public String getPropertyBagId()
StructureElement
getPropertyBagId
in class StructureElement
protected void setPropertyBagId(String propertyBagId)
This method should be used only for non-persisted channel, because this property value may not be changed.
propertyBagId
- The propertyBagId to set.public int getCenterPages()
public void setCenterPages(int centerPages)
centerPages
- The centerPages to set.public int getLayoutPagesType()
public void setLayoutPagesType(int layoutPagesType)
layoutPagesType
- one of the valid page layout formats
The layout format to set for pages.protected void setLayoutPagesTypeInternal(int layoutPagesType)
layoutPagesType
- one of the valid page layout formats
The layout format to set for pages.public int getCachePages()
public void setCachePages(int cachePages)
cachePages
- The cachePages to set.public boolean hasLocalGroups()
public void setLocalGroups(boolean localGroups)
localGroups
- The localGroups to set.public String getLocalGroupPrefix()
public void setLocalGroupPrefix(String localGroupPrefix)
localGroupPrefix
- The localGroupPrefix to set.public String getTemplateLocalGroupPrefix()
public void setTemplateLocalGroupPrefix(String templateLocalGroupPrefix)
templateLocalGroupPrefix
- the value to set.getTemplateLocalGroupPrefix()
public int getFriendlyPathType()
public void setFriendlyPathType(int friendlyPathType)
public String getFriendlyPathUserDefined()
public void setFriendlyPathUserDefined(String friendlyPathUserDefined)
public void setFriendlyId(String friendlyId)
friendlyId
- the channel's friendly identifier.public void setAutoGeneratedFriendlyId()
This method requires an active transaction.
setFriendlyId(String)
public String getFriendlyId()
public void setAutomaticFriendlyId(boolean automaticFriendlyId)
automaticFriendlyId
- indicates whether the channel is going to use automatic
generated friendly identifier or not.public boolean isAutomaticFriendlyId()
public ChannelConfig clone() throws CloneNotSupportedException
clone
in interface ICloneableCacheEntry
clone
in interface ICloneableConfig<ChannelConfig>
clone
in class Object
CloneNotSupportedException
public void serialize(ChannelConfig channelConfig, OutputStream outputStream) throws PortalException
PortalException
public void deserialize(Node channelNode) throws PortalException
PortalException
protected void deserializePropertyBag(Node propertyBagNode) throws PortalException
StructureElement
deserializePropertyBag
in class StructureElement
propertyBagNode
- the property bag serialized node, in the same
syntax as generated by StructureElement.serializePropertyBag()
.PortalException
- if an error occurred during deserialization.public String getParentTemplateId()
public void setParentTemplateId(String parentTemplateId)
public boolean isInheritPageTemplate()
public void setInheritPageTemplate(boolean inheritPageTemplate)
@Deprecated public int getPageRuntimeDataProviderType()
getPageWebResourceDataProviderType()
.@Deprecated public void setPageRuntimeDataProviderType(int runtimeDataProviderType)
setPageWebResourceDataProviderType(int)
.runtimeDataProviderType
- the runtime data provider type.@Deprecated public String getPageRuntimeDataProviderClassName()
getPageWebResourceDataProviderClassName()
.@Deprecated public void setPageRuntimeDataProviderClassName(String runtimeDataProviderClassName)
setPageWebResourceDataProviderClassName(String)
.runtimeDataProviderClassName
- the class name to be set.public String getPageWebResourceDataProviderClassName()
This value should only be used if the page web resource data provider
type is PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
public void setPageWebResourceDataProviderClassName(String providerClassName)
providerClassName
- the class name to be set.public int getPageWebResourceDataProviderType()
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_INHERIT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_DEFAULT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CONTENT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
public void setPageWebResourceDataProviderType(int providerType)
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_INHERIT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_DEFAULT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CONTENT
or
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
providerType
- the page web resource data provider type.public String getFriendlyURLPattern()
null
if it
is not set for this channel.public void setFriendlyURLPattern(String friendlyURLPattern)
friendlyURLPattern
- the pattern.public boolean isFriendlyURLPatternEnabled()
true
if enabled, false
if disabled.public boolean isIgnoreOnExportImport()
public void setIgnoreOnExportImport(boolean ignoreOnExportImport)
ignoreOnExportImport
- indicates whether this channel will be ignored on export and import.public void setFriendlyURLPatternEnabled(boolean friendlyURLPatternEnabled)
friendlyURLPatternEnabled
- true
to enable,
false
to disable.protected boolean mayUseFriendlyId(String friendlyId) throws PortalException
StructureElement
mayUseFriendlyId
in class StructureElement
friendlyId
- the friendly identifier.PortalException
protected int getFriendlyIdMaxLength()
StructureElement
getFriendlyIdMaxLength
in class StructureElement
public Collection<Locale> getAcceptableLocales() throws PortalException
getAcceptableLocalesLocal()
instead.PortalException
getAcceptableLocalesLocal()
,
ILocalizationManager.getLocales(lumis.util.ITransaction)
public Collection<Locale> getAcceptableLocalesLocal() throws PortalException
null
will be returned.getAcceptableLocales()
instead.PortalException
getAcceptableLocalesLocal()
,
ILocalizationManager.getLocales(lumis.util.ITransaction)
public void setAcceptableLocales(Collection<Locale> acceptableLocales) throws PortalException
acceptableLocales
- the acceptable locales of this channel. Use null
to indicate it should be inherited.PortalException
ILocalizationManager.getLocales(lumis.util.ITransaction)
public Locale getDefaultLocale() throws PortalException
getDefaultLocaleLocal()
instead.PortalException
public Locale getDefaultLocaleLocal() throws PortalException
null
will be returned. If inheritance is to be
considered, consider using getDefaultLocale()
instead.null
will be
returned, instead.PortalException
public void setDefaultLocale(Locale defaultLocale) throws PortalException
defaultLocale
- the default locale of this channel. Use null
to indicate it should be inherited.PortalException
public boolean isUseBrowserAcceptedLanguages()
true
will be used as fallback.isUseBrowserAcceptedLanguagesLocal()
instead.public Boolean isUseBrowserAcceptedLanguagesLocal()
null
will be returned.isUseBrowserAcceptedLanguages()
instead.public void setUseBrowserAcceptedLanguages(Boolean useBrowserAcceptedLanguages)
useBrowserAcceptedLanguages
- whether browser's accepted languages are to be used when setting user's locale. Use null
to
indicate it should be inherited.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.