Class ChannelConfig
- java.lang.Object
-
- lumis.portal.structure.StructureElement
-
- lumis.portal.channel.ChannelConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICacheEntry
,ICloneableCacheEntry
,ICloneableConfig<ChannelConfig>
- Direct Known Subclasses:
ChannelDataType.Data
@StableMinor(version="17.0", sinceVersion="4.0") public class ChannelConfig extends StructureElement implements ICloneableCacheEntry, ICloneableConfig<ChannelConfig>
Channel entity class- Since:
- 4.0.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CHANNEL_DEFAULT_LOCALE_PROPERTY_NAME
Channel default locale property name.static java.lang.String
CHANNEL_DETECT_USER_FROM_BROWSER_LOCALES_PROPERTY_NAME
Channel use browser locale property name.static java.lang.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 namestatic 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 java.lang.String
LUMIS_ADMIN_CHANNEL_ID
static java.lang.String
PORTAL_CHANNEL_ID
-
Constructor Summary
Constructors Constructor Description ChannelConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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(org.w3c.dom.Node channelNode)
protected void
deserializePropertyBag(org.w3c.dom.Node propertyBagNode)
Updates this element's property bag according to the given serialized property bag node.boolean
equals(java.lang.Object o)
java.util.Collection<java.util.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.java.util.Collection<java.util.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 usinggetAcceptableLocales()
instead.
Only the locales that exists in LumisPortal global locales are returned.java.lang.String
getAccessControlListId()
int
getCachePages()
int
getCenterPages()
java.util.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.java.util.Locale
getDefaultLocaleLocal()
Returns the default locale of this channel.
If this channel does not define a default locale,null
will be returned.java.lang.String
getDescription()
java.lang.String
getFriendlyId()
Returns the channel's friendly identifier.protected int
getFriendlyIdMaxLength()
Returns the maximum length of friendly identifier.int
getFriendlyPathType()
java.lang.String
getFriendlyPathUserDefined()
java.lang.String
getFriendlyURLPattern()
Returns the friendly URL pattern specific for this channel (non-inheritable).java.lang.String
getId()
java.lang.String
getLayoutFilePath()
Returns the path for the layout file for use by this channel.int
getLayoutPagesType()
Returns the layout format for pages.java.lang.String
getLocalGroupPrefix()
protected java.util.regex.Pattern
getManagedPropertiesPattern()
Returns the property name spaces.java.lang.String
getName()
java.lang.String
getPageRuntimeDataProviderClassName()
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderClassName()
.int
getPageRuntimeDataProviderType()
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderType()
.java.lang.String
getPageTemplateId()
java.lang.String
getPageWebResourceDataProviderClassName()
Returns the class name for the page web resource data provider.int
getPageWebResourceDataProviderType()
Returns the page web resource data provider type.java.lang.String
getParentId()
java.lang.String
getParentTemplateId()
int
getPosition()
IProject
getProject()
Returns the project this channel belongs to (if any).java.lang.String
getPropertyBagId()
Returns the property bag identifier.int
getProtocol()
java.lang.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.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.java.lang.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 usingisUseBrowserAcceptedLanguages()
instead.protected void
loadPropertyBagValues()
Loads the values of the property bag of this element.protected boolean
mayUseFriendlyId(java.lang.String friendlyId)
Indicates if the element may use the given friendly identifier.void
serialize(ChannelConfig channelConfig, java.io.OutputStream outputStream)
void
setAcceptableLocales(java.util.Collection<java.util.Locale> acceptableLocales)
Sets the acceptable locales of this channel.
Only accepts locales existent in LumisPortal global locales.void
setAccessControlListId(java.lang.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(java.util.Locale defaultLocale)
Sets the default locale of this channel.void
setDescription(java.lang.String description)
void
setFriendlyId(java.lang.String friendlyId)
Sets the channel's friendly identifier.void
setFriendlyPathType(int friendlyPathType)
void
setFriendlyPathUserDefined(java.lang.String friendlyPathUserDefined)
void
setFriendlyURLPattern(java.lang.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(java.lang.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.void
setInheritStylesheet(boolean inheritStylesheet)
void
setLayoutFilePath(java.lang.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(java.lang.String localGroupPrefix)
void
setLocalGroups(boolean localGroups)
void
setName(java.lang.String name)
void
setPageRuntimeDataProviderClassName(java.lang.String runtimeDataProviderClassName)
Deprecated.Since 5.0.0 replaced bysetPageWebResourceDataProviderClassName(String)
.void
setPageRuntimeDataProviderType(int runtimeDataProviderType)
Deprecated.Since 5.0.0 replaced bysetPageWebResourceDataProviderType(int)
.void
setPageTemplateId(java.lang.String pageTemplateId)
void
setPageWebResourceDataProviderClassName(java.lang.String providerClassName)
Sets the page web resource provider class name.void
setPageWebResourceDataProviderType(int providerType)
Sets the page web resource data provider type.void
setParentId(java.lang.String parentId)
void
setParentTemplateId(java.lang.String parentTemplateId)
void
setPosition(int position)
protected void
setPropertyBagId(java.lang.String propertyBagId)
Sets the property bag identifier.void
setProtocol(int protocol)
void
setTemplate(boolean isTemplate)
void
setTemplateLocalGroupPrefix(java.lang.String templateLocalGroupPrefix)
Sets the template local group prefix.void
setType(int type)
void
setUseBrowserAcceptedLanguages(java.lang.Boolean useBrowserAcceptedLanguages)
Sets whether browser's accepted languages are to be used when setting user's locale.-
Methods inherited from class lumis.portal.structure.StructureElement
getAutomaticFriendlyId, getFriendlyIdBaseValue, getFriendlyIdValueForCounter, getLocalPropertyValue, getLocalPropertyValues, getPropertyValue, getPropertyValues, isManagedProperty, normalizeFriendlyId, removeProperty, serializePropertyBag, setPropertyValue, setPropertyValues, stripAccents
-
-
-
-
Field Detail
-
CHANNEL_SUPPORTED_LOCALES_PROPERTY_NAME
public static final java.lang.String CHANNEL_SUPPORTED_LOCALES_PROPERTY_NAME
Channel acceptable locales property name.- Since:
- 8.1.0
- See Also:
- Constant Field Values
-
CHANNEL_DETECT_USER_FROM_BROWSER_LOCALES_PROPERTY_NAME
public static final java.lang.String CHANNEL_DETECT_USER_FROM_BROWSER_LOCALES_PROPERTY_NAME
Channel use browser locale property name.- Since:
- 8.1.0
- See Also:
- Constant Field Values
-
CHANNEL_DEFAULT_LOCALE_PROPERTY_NAME
public static final java.lang.String CHANNEL_DEFAULT_LOCALE_PROPERTY_NAME
Channel default locale property name.- Since:
- 8.1.0
- See Also:
- Constant Field Values
-
CHANNEL_TYPE_BASIC
public static final int CHANNEL_TYPE_BASIC
- See Also:
- Constant Field Values
-
CHANNEL_TYPE_LUMISADMIN
public static final int CHANNEL_TYPE_LUMISADMIN
- See Also:
- Constant Field Values
-
PORTAL_CHANNEL_ID
public static final java.lang.String PORTAL_CHANNEL_ID
- See Also:
- Constant Field Values
-
LUMIS_ADMIN_CHANNEL_ID
public static final java.lang.String LUMIS_ADMIN_CHANNEL_ID
- See Also:
- Constant Field Values
-
FRIENDLY_PATH_TYPE_CHANNEL_NAME
public static final int FRIENDLY_PATH_TYPE_CHANNEL_NAME
The friendly path is generated using the parent channel's path and appending this channel's name- See Also:
- Constant Field Values
-
FRIENDLY_PATH_TYPE_USER_DEFINED
public static final int FRIENDLY_PATH_TYPE_USER_DEFINED
The friendly path is user defined.- See Also:
- Constant Field Values
-
FRIENDLY_PATH_TYPE_INHERIT
public static final int FRIENDLY_PATH_TYPE_INHERIT
The friendly path is the same as this channel's parent friendly path.- See Also:
- Constant Field Values
-
-
Method Detail
-
getManagedPropertiesPattern
protected java.util.regex.Pattern getManagedPropertiesPattern()
Description copied from class:StructureElement
Returns the property name spaces. Used to decides if a property can be updated.- Specified by:
getManagedPropertiesPattern
in classStructureElement
- Returns:
- property name spaces
-
loadPropertyBagValues
protected void loadPropertyBagValues() throws PortalException
Description copied from class:StructureElement
Loads the values of the property bag of this element.Only the properties that can be changed are actually loaded.
- Overrides:
loadPropertyBagValues
in classStructureElement
- Throws:
PortalException
- See Also:
StructureElement.isManagedProperty(String)
-
applyPropertyBagChanges
protected void applyPropertyBagChanges() throws PortalException
Description copied from class:StructureElement
Apply the changes made to the properties managed by this element to the property bag persistence entities.- Overrides:
applyPropertyBagChanges
in classStructureElement
- Throws:
PortalException
- See Also:
StructureElement.isManagedProperty(String)
-
getLayoutFilePath
public java.lang.String getLayoutFilePath()
Returns the path for the layout file for use by this channel.The layout file is inherited to child elements and from parent.
If
getLayoutPagesType()
is notPageConfig.PAGE_LAYOUT_TYPE_LAYOUT_FILE
(or inherited it), this method will returnnull
since no layout file is to be used.- Returns:
- layoutFile the path for the layout file, relative to the
<lumisdata>/def
directory, possibly inherited from parent channel; ornull
if no layout file is to be used. - Since:
- 5.6.0
- See Also:
getLayoutPagesType()
,setLayoutFilePath(String)
-
setLayoutFilePath
public void setLayoutFilePath(java.lang.String layoutFile)
Sets the path for the layout file.The path must be relative to the
<lumisdata>/def
directory, ornull
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()
isPageConfig.PAGE_LAYOUT_TYPE_LAYOUT_FILE
or inherited this value.- Parameters:
layoutFile
- the path relative to the<lumisdata>/def
directory, ornull
for inheriting the value from the parent channel.- Since:
- 5.6.0
- See Also:
setLayoutPagesType(int)
-
getId
public java.lang.String getId()
- Returns:
- Returns the channelId.
-
setId
public void setId(java.lang.String id)
- Parameters:
id
- The channelId to set.
-
getDescription
public java.lang.String getDescription()
- Returns:
- Returns the description.
-
setDescription
public void setDescription(java.lang.String description)
- Parameters:
description
- The description to set.
-
getName
public java.lang.String getName()
- Returns:
- Returns the name.
-
setName
public void setName(java.lang.String name)
- Parameters:
name
- The name to set.
-
isHidden
public boolean isHidden()
- Returns:
- Returns the hidden.
-
setHidden
public void setHidden(boolean hidden)
- Parameters:
hidden
- The hidden to set.
-
isInheritStylesheet
public boolean isInheritStylesheet()
- Returns:
- true if the Stylesheet was inherited and false otherwise.
-
isInheritMetaTags
public boolean isInheritMetaTags()
- Returns:
- true if the Meta-Tags is inherited and false otherwise.
-
setInheritStylesheet
public void setInheritStylesheet(boolean inheritStylesheet)
- Parameters:
inheritStylesheet
-
-
setInheritMetaTags
public void setInheritMetaTags(boolean inheritMetaTags)
- Parameters:
inheritMetaTags
-
-
isInheritProtocol
@Deprecated public boolean isInheritProtocol()
Deprecated.since 4.0.11. This property is acquired via thegetProtocol()
method.- Returns:
- Returns the inheritProtocol.
-
setInheritProtocol
@Deprecated public void setInheritProtocol(boolean inheritProtocol)
Deprecated.since 4.0.11. This property is set via the#setProtocol()
method.- Parameters:
inheritProtocol
- The inheritProtocol to set.
-
isTemplate
public boolean isTemplate()
- Returns:
- Returns the isTemplate.
-
setTemplate
public void setTemplate(boolean isTemplate)
- Parameters:
isTemplate
- The isTemplate to set.
-
getPageTemplateId
public java.lang.String getPageTemplateId()
- Returns:
- Returns the pageTemplateId.
-
setPageTemplateId
public void setPageTemplateId(java.lang.String pageTemplateId)
- Parameters:
pageTemplateId
- The pageTemplateId to set.
-
getParentId
public java.lang.String getParentId()
- Returns:
- Returns the parentId.
-
setParentId
public void setParentId(java.lang.String parentId)
- Parameters:
parentId
- The parentId to set.
-
getPosition
public int getPosition()
- Returns:
- Returns the position.
-
setPosition
public void setPosition(int position)
- Parameters:
position
- The position to set.
-
getProtocol
public int getProtocol()
- Returns:
- Returns the protocol.
-
setProtocol
public void setProtocol(int protocol)
- Parameters:
protocol
- The protocol to set.
-
getType
public int getType()
- Returns:
- Returns the type.
-
setType
public void setType(int type)
- Parameters:
type
- The type to set.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
getAccessControlListId
public java.lang.String getAccessControlListId()
- Returns:
- Returns the accessControlListId.
-
setAccessControlListId
public void setAccessControlListId(java.lang.String accessControlListId)
- Parameters:
accessControlListId
- The accessControlListId to set.
-
getPropertyBagId
public java.lang.String getPropertyBagId()
Description copied from class:StructureElement
Returns the property bag identifier.- Specified by:
getPropertyBagId
in classStructureElement
- Returns:
- The propertyBagId.
-
setPropertyBagId
protected void setPropertyBagId(java.lang.String propertyBagId)
Sets the property bag identifier.This method should be used only for non-persisted channel, because this property value may not be changed.
- Parameters:
propertyBagId
- The propertyBagId to set.- Since:
- 5.0.0
-
getCenterPages
public int getCenterPages()
- Returns:
- Returns the centerPages.
-
setCenterPages
public void setCenterPages(int centerPages)
- Parameters:
centerPages
- The centerPages to set.
-
getLayoutPagesType
public int getLayoutPagesType()
Returns the layout format for pages.- Returns:
- The layout format for pages.
-
setLayoutPagesType
public void setLayoutPagesType(int layoutPagesType)
Sets the layout format for pages.- Parameters:
layoutPagesType
- one of the valid page layout formats The layout format to set for pages.
-
setLayoutPagesTypeInternal
protected void setLayoutPagesTypeInternal(int layoutPagesType)
Sets the layout format for pages.- Parameters:
layoutPagesType
- one of the valid page layout formats The layout format to set for pages.
-
getCachePages
public int getCachePages()
- Returns:
- Returns the cachePages.
-
setCachePages
public void setCachePages(int cachePages)
- Parameters:
cachePages
- The cachePages to set.
-
hasLocalGroups
public boolean hasLocalGroups()
- Returns:
- Returns the localGroups.
-
setLocalGroups
public void setLocalGroups(boolean localGroups)
- Parameters:
localGroups
- The localGroups to set.
-
getLocalGroupPrefix
public java.lang.String getLocalGroupPrefix()
- Returns:
- Returns the localGroupPrefix.
-
setLocalGroupPrefix
public void setLocalGroupPrefix(java.lang.String localGroupPrefix)
- Parameters:
localGroupPrefix
- The localGroupPrefix to set.
-
getTemplateLocalGroupPrefix
public java.lang.String getTemplateLocalGroupPrefix()
Returns the template local group prefix. This attribute specifies the pattern used when applying a channel template.- Returns:
- the template local group prefix.
- Since:
- 4.0.6
-
setTemplateLocalGroupPrefix
public void setTemplateLocalGroupPrefix(java.lang.String templateLocalGroupPrefix)
Sets the template local group prefix.- Parameters:
templateLocalGroupPrefix
- the value to set.- Since:
- 4.0.6
- See Also:
getTemplateLocalGroupPrefix()
-
getFriendlyPathType
public int getFriendlyPathType()
-
setFriendlyPathType
public void setFriendlyPathType(int friendlyPathType)
-
getFriendlyPathUserDefined
public java.lang.String getFriendlyPathUserDefined()
-
setFriendlyPathUserDefined
public void setFriendlyPathUserDefined(java.lang.String friendlyPathUserDefined)
-
setFriendlyId
public void setFriendlyId(java.lang.String friendlyId)
Sets the channel's friendly identifier. This value must be unique among the channels contained in the same channel this channel is contained.- Parameters:
friendlyId
- the channel's friendly identifier.- Since:
- 6.0.0
-
setAutoGeneratedFriendlyId
public void setAutoGeneratedFriendlyId()
Generates a new friendly identifier and sets it as the friendly identifier of this channel. The friendly identifier is generated based on this channel's current name.This method requires an active transaction.
- Since:
- 6.0.0
- See Also:
setFriendlyId(String)
-
getFriendlyId
public java.lang.String getFriendlyId()
Returns the channel's friendly identifier.- Returns:
- the channel's friendly identifier.
- Since:
- 6.0.0
-
setAutomaticFriendlyId
public void setAutomaticFriendlyId(boolean automaticFriendlyId)
Indicates whether the channel is going to use automatic generated friendly identifier or not.- Parameters:
automaticFriendlyId
- indicates whether the channel is going to use automatic generated friendly identifier or not.- Since:
- 6.0.0
-
isAutomaticFriendlyId
public boolean isAutomaticFriendlyId()
Returns whether the channel is going to use automatic generated friendly identifier or not.- Returns:
- whether the channel is going to use automatic generated friendly identifier or not.
- Since:
- 6.0.0
-
clone
public ChannelConfig clone() throws java.lang.CloneNotSupportedException
- Specified by:
clone
in interfaceICloneableCacheEntry
- Specified by:
clone
in interfaceICloneableConfig<ChannelConfig>
- Overrides:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
serialize
public void serialize(ChannelConfig channelConfig, java.io.OutputStream outputStream) throws PortalException
- Throws:
PortalException
-
deserialize
public void deserialize(org.w3c.dom.Node channelNode) throws PortalException
- Throws:
PortalException
-
deserializePropertyBag
protected void deserializePropertyBag(org.w3c.dom.Node propertyBagNode) throws PortalException
Description copied from class:StructureElement
Updates this element's property bag according to the given serialized property bag node.- Overrides:
deserializePropertyBag
in classStructureElement
- Parameters:
propertyBagNode
- the property bag serialized node, in the same syntax as generated byStructureElement.serializePropertyBag()
.- Throws:
PortalException
- if an error occurred during deserialization.
-
getParentTemplateId
public java.lang.String getParentTemplateId()
-
setParentTemplateId
public void setParentTemplateId(java.lang.String parentTemplateId)
-
isInheritPageTemplate
public boolean isInheritPageTemplate()
-
setInheritPageTemplate
public void setInheritPageTemplate(boolean inheritPageTemplate)
-
getPageRuntimeDataProviderType
@Deprecated public int getPageRuntimeDataProviderType()
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderType()
.Returns the page runtime data provider type. The possible values are {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_INHERIT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_DEFAULT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_CONTENT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_CUSTOM}- Returns:
- the runtime data provider type.
- Since:
- 4.2.0
-
setPageRuntimeDataProviderType
@Deprecated public void setPageRuntimeDataProviderType(int runtimeDataProviderType)
Deprecated.Since 5.0.0 replaced bysetPageWebResourceDataProviderType(int)
.Sets the page runtime data provider type. The possible values are {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_INHERIT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_DEFAULT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_CONTENT} or {@value #PageConfig.PAGE_RUNTIME_DATA_PROVIDER_TYPE_CUSTOM}- Parameters:
runtimeDataProviderType
- the runtime data provider type.- Since:
- 4.2.0
-
getPageRuntimeDataProviderClassName
@Deprecated public java.lang.String getPageRuntimeDataProviderClassName()
Deprecated.Since 5.0.0 replaced bygetPageWebResourceDataProviderClassName()
.Returns the class name for the page runtime data provider. This value should only be used if the runtime data provider type is- Returns:
- the runtime data provider class name
- Since:
- 4.2.0
-
setPageRuntimeDataProviderClassName
@Deprecated public void setPageRuntimeDataProviderClassName(java.lang.String runtimeDataProviderClassName)
Deprecated.Since 5.0.0 replaced bysetPageWebResourceDataProviderClassName(String)
.Sets the runtime data provider class name.- Parameters:
runtimeDataProviderClassName
- the class name to be set.- Since:
- 4.2.0
-
getPageWebResourceDataProviderClassName
public java.lang.String getPageWebResourceDataProviderClassName()
Returns the class name for the page web resource data provider.This value should only be used if the page web resource data provider type is
PageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
- Returns:
- the runtime data provider class name
- Since:
- 5.0.0
-
setPageWebResourceDataProviderClassName
public void setPageWebResourceDataProviderClassName(java.lang.String providerClassName)
Sets the page web resource provider class name.- Parameters:
providerClassName
- the class name to be set.- Since:
- 5.0.0
-
getPageWebResourceDataProviderType
public int getPageWebResourceDataProviderType()
Returns the page web resource data provider type. The possible values arePageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_INHERIT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_DEFAULT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CONTENT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
- Returns:
- the page web resource data provider type.
- Since:
- 5.0.0
-
setPageWebResourceDataProviderType
public void setPageWebResourceDataProviderType(int providerType)
Sets the page web resource data provider type. The possible values arePageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_INHERIT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_DEFAULT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CONTENT
orPageConfig.PAGE_WEB_RESOURCE_DATA_PROVIDER_TYPE_CUSTOM
- Parameters:
providerType
- the page web resource data provider type.- Since:
- 5.0.0
-
getFriendlyURLPattern
public java.lang.String getFriendlyURLPattern()
Returns the friendly URL pattern specific for this channel (non-inheritable).- Returns:
- the friendlyURLPattern the pattern, or
null
if it is not set for this channel. - Since:
- 5.0.0
-
setFriendlyURLPattern
public void setFriendlyURLPattern(java.lang.String friendlyURLPattern)
Sets the friendly URL pattern specific for this channel (non-inheritable).- Parameters:
friendlyURLPattern
- the pattern.- Since:
- 5.0.0
-
isFriendlyURLPatternEnabled
public boolean isFriendlyURLPatternEnabled()
Returns if the friendly URL pattern specific for this channel (non-inheritable) is enabled.- Returns:
true
if enabled,false
if disabled.- Since:
- 5.0.0
-
isIgnoreOnExportImport
public boolean isIgnoreOnExportImport()
Returns whether this channel will be ignored on export and import.- Returns:
- whether this channel will be ignored on export and import.
- Since:
- 8.0.0
-
setIgnoreOnExportImport
public void setIgnoreOnExportImport(boolean ignoreOnExportImport)
Sets whether this channel will be ignored on export and import.- Parameters:
ignoreOnExportImport
- indicates whether this channel will be ignored on export and import.- Since:
- 8.0.0
-
setFriendlyURLPatternEnabled
public void setFriendlyURLPatternEnabled(boolean friendlyURLPatternEnabled)
Sets if the friendly URL pattern specific for this channel (non-inheritable) is enabled.- Parameters:
friendlyURLPatternEnabled
-true
to enable,false
to disable.- Since:
- 5.0.0
-
mayUseFriendlyId
protected boolean mayUseFriendlyId(java.lang.String friendlyId) throws PortalException
Description copied from class:StructureElement
Indicates if the element may use the given friendly identifier.- Specified by:
mayUseFriendlyId
in classStructureElement
- Parameters:
friendlyId
- the friendly identifier.- Returns:
- true if the element may use the given friendly identifier, false otherwise.
- Throws:
PortalException
-
getFriendlyIdMaxLength
protected int getFriendlyIdMaxLength()
Description copied from class:StructureElement
Returns the maximum length of friendly identifier.- Overrides:
getFriendlyIdMaxLength
in classStructureElement
- Returns:
- the maximum length of friendly identifier.
-
getProject
public IProject getProject() throws PortalException
Returns the project this channel belongs to (if any).This method may require a current transaction.
- Returns:
- the project or
null
if this channel does not belong to any project or is not persisted. - Throws:
PortalException
- Since:
- 12.5.0
-
getAcceptableLocales
public java.util.Collection<java.util.Locale> getAcceptableLocales() throws PortalException
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. If no parent channel that defines this property was found, the global locales will be returned instead.
If the inheritance should not be used, consider usinggetAcceptableLocalesLocal()
instead.
Only the locales that exists in LumisPortal global locales are returned.- Returns:
- this channel's acceptable locales.
- Throws:
PortalException
- Since:
- 8.1.0
- See Also:
getAcceptableLocalesLocal()
,ILocalizationManager.getLocales(lumis.util.ITransaction)
-
getAcceptableLocalesLocal
public java.util.Collection<java.util.Locale> getAcceptableLocalesLocal() throws PortalException
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 usinggetAcceptableLocales()
instead.
Only the locales that exists in LumisPortal global locales are returned.- Returns:
- this channel's acceptable locales.
- Throws:
PortalException
- Since:
- 8.1.0
- See Also:
getAcceptableLocalesLocal()
,ILocalizationManager.getLocales(lumis.util.ITransaction)
-
setAcceptableLocales
public void setAcceptableLocales(java.util.Collection<java.util.Locale> acceptableLocales) throws PortalException
Sets the acceptable locales of this channel.
Only accepts locales existent in LumisPortal global locales.- Parameters:
acceptableLocales
- the acceptable locales of this channel. Usenull
to indicate it should be inherited.- Throws:
PortalException
- Since:
- 8.1.0
- See Also:
ILocalizationManager.getLocales(lumis.util.ITransaction)
-
getDefaultLocale
public java.util.Locale getDefaultLocale() throws PortalException
Returns the default locale of this channel.
If this channel does not define a default locale, it will be inherited from parent channel recursively. If no default locale could be found until reach the root channel, some registered locale will be returned.
If the inheritance is to be ignored, consider usinggetDefaultLocaleLocal()
instead.
If a default locale was found but it doesn't exist in LumisPortal global locales, some of global locales will be returned, instead.- Returns:
- the default locale of this channel.
- Throws:
PortalException
- Since:
- 8.1.0
-
getDefaultLocaleLocal
public java.util.Locale getDefaultLocaleLocal() throws PortalException
Returns the default locale of this channel.
If this channel does not define a default locale,null
will be returned. If inheritance is to be considered, consider usinggetDefaultLocale()
instead.
If a default locale was found but it doesn't exist in LumisPortal global locales,null
will be returned, instead.- Returns:
- the default locale of this channel.
- Throws:
PortalException
- Since:
- 8.1.0
-
setDefaultLocale
public void setDefaultLocale(java.util.Locale defaultLocale) throws PortalException
Sets the default locale of this channel.- Parameters:
defaultLocale
- the default locale of this channel. Usenull
to indicate it should be inherited.- Throws:
PortalException
- Since:
- 8.1.0
-
isUseBrowserAcceptedLanguages
public 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. If the root channel is reached and none of the parents defines this property,true
will be used as fallback.
If the inheritance should be ignored, consider usingisUseBrowserAcceptedLanguagesLocal()
instead.- Returns:
- whether browser's accepted languages are to be used when setting user's locale.
- Since:
- 8.1.0
-
isUseBrowserAcceptedLanguagesLocal
public java.lang.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 usingisUseBrowserAcceptedLanguages()
instead.- Returns:
- whether browser's accepted languages are to be used when setting user's locale.
- Since:
- 8.1.0
-
setUseBrowserAcceptedLanguages
public void setUseBrowserAcceptedLanguages(java.lang.Boolean useBrowserAcceptedLanguages)
Sets whether browser's accepted languages are to be used when setting user's locale.- Parameters:
useBrowserAcceptedLanguages
- whether browser's accepted languages are to be used when setting user's locale. Usenull
to indicate it should be inherited.- Since:
- 8.1.0
-
-