Package lumis.portal.presentation.mode
Class AbstractPortalMode
- java.lang.Object
-
- lumis.portal.presentation.mode.AbstractPortalMode
-
- All Implemented Interfaces:
Serializable
,IPortalMode
,IPortalModeSPI
- Direct Known Subclasses:
ContextValidatingPortalMode
,NavigationPortalMode
,SettingsPortalMode
public abstract class AbstractPortalMode extends Object implements IPortalModeSPI
Default implementation for IPortalMode.- Since:
- 6.0.0
- Version:
- $Revision: 21880 $ $Date: 2018-09-21 17:07:19 -0300 (Fri, 21 Sep 2018) $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static Set<String>
ROOT_CHANNELS_ONLY_PORTAL
Utility constant that may be used by implementations ofgetValidWebResourceRootChannels()
.
-
Constructor Summary
Constructors Constructor Description AbstractPortalMode(int id, String name, String description, IPermissionProvider permissionProvider, Class<? extends HTMLFragmentComponent> renderComponentClass, String[] attributeNames, Class<? extends AbstractLayoutFileMarkupFilter> markupFilterClass, String modeRootUrl)
Constructor for the class.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Set<String>
getAttributeNames()
Returns the set of attribute names for the current PortalMode.String
getDescription()
Returns the description of the current PortalMode.int
getId()
Returns the id of the current PortalMode.Class<? extends AbstractLayoutFileMarkupFilter>
getMarkupFilterClass()
Returns markup filter for parser to use to render page.String
getModeRootUrl()
String
getName()
Returns the name of the current PortalMode.IPermissionProvider
getPermissionProvider()
Returns the permission provider of the current PortalMode.Class<? extends HTMLFragmentComponent>
getRenderComponentClass()
Returns the render componentprotected abstract Set<String>
getValidWebResourceRootChannels()
Used by the default implementation ofisWebResourceAvailable(WebResource, ChannelConfig)
.boolean
isWebResourceAvailable(WebResource webResource, ChannelConfig rootChannel)
Returns whether the given web resource is available for access in the this mode.protected Object
writeReplace()
UsesPortalModeSerializedData
as the serialization of this portal mode.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.presentation.mode.IPortalModeSPI
isAccessWithWebResourceWebsiteRequired, validateAccess
-
-
-
-
Field Detail
-
ROOT_CHANNELS_ONLY_PORTAL
protected static final Set<String> ROOT_CHANNELS_ONLY_PORTAL
Utility constant that may be used by implementations ofgetValidWebResourceRootChannels()
.- Since:
- 11.0.0
-
-
Constructor Detail
-
AbstractPortalMode
public AbstractPortalMode(int id, String name, String description, IPermissionProvider permissionProvider, Class<? extends HTMLFragmentComponent> renderComponentClass, String[] attributeNames, Class<? extends AbstractLayoutFileMarkupFilter> markupFilterClass, String modeRootUrl)
Constructor for the class.- Parameters:
id
- the id of the current PortalModename
- the name of the current PortalMode.description
- the description of the current PortalMode.the
- portal mode url provider of the current PortalMode.attributeNames
- attribute names for the current PortalMode.markupFilterClass
- markup filter class for the current PortalMode.- Since:
- 7.1.0
-
-
Method Detail
-
getAttributeNames
public Set<String> getAttributeNames()
Returns the set of attribute names for the current PortalMode.- Specified by:
getAttributeNames
in interfaceIPortalModeSPI
- Returns:
- the set of attribute names for the current PortalMode.
- Since:
- 6.0.0
-
getDescription
public String getDescription()
Returns the description of the current PortalMode.- Specified by:
getDescription
in interfaceIPortalMode
- Returns:
- the description of the current PortalMode.
- Since:
- 6.0.0
-
getId
public int getId()
Returns the id of the current PortalMode.- Specified by:
getId
in interfaceIPortalMode
- Returns:
- the id of the current PortalMode.
- Since:
- 6.0.0
-
getName
public String getName()
Returns the name of the current PortalMode.- Specified by:
getName
in interfaceIPortalMode
- Returns:
- the name of the current PortalMode.
- Since:
- 6.0.0
-
getPermissionProvider
public IPermissionProvider getPermissionProvider()
Returns the permission provider of the current PortalMode.- Specified by:
getPermissionProvider
in interfaceIPortalModeSPI
- Returns:
- the permission provider of the current PortalMode.
- Since:
- 6.0.0
-
getRenderComponentClass
public Class<? extends HTMLFragmentComponent> getRenderComponentClass()
Returns the render component- Specified by:
getRenderComponentClass
in interfaceIPortalModeSPI
- Returns:
- the component render.
- Since:
- 6.0.0
-
getMarkupFilterClass
public Class<? extends AbstractLayoutFileMarkupFilter> getMarkupFilterClass()
Description copied from interface:IPortalModeSPI
Returns markup filter for parser to use to render page.- Specified by:
getMarkupFilterClass
in interfaceIPortalModeSPI
- Returns:
- markup filter for parser to use to render page.
-
getModeRootUrl
public String getModeRootUrl()
- Specified by:
getModeRootUrl
in interfaceIPortalMode
-
isWebResourceAvailable
public boolean isWebResourceAvailable(WebResource webResource, ChannelConfig rootChannel)
Description copied from interface:IPortalModeSPI
Returns whether the given web resource is available for access in the this mode.- Specified by:
isWebResourceAvailable
in interfaceIPortalModeSPI
- Parameters:
webResource
- the web resource.- Returns:
true
if the web resource is available,false
otherwise.
-
getValidWebResourceRootChannels
protected abstract Set<String> getValidWebResourceRootChannels()
Used by the default implementation ofisWebResourceAvailable(WebResource, ChannelConfig)
.- Returns:
- the identifiers of valid root channels of web resource in this mode.
- Since:
- 11.0.0
-
writeReplace
protected Object writeReplace()
UsesPortalModeSerializedData
as the serialization of this portal mode.- Returns:
- the serialized data of this portal mode.
- Since:
- 10.4.0
-
-