Package lumis.portal.channel
Class ChannelWebResource
- java.lang.Object
-
- lumis.portal.url.WebResource
-
- lumis.portal.channel.ChannelWebResource
-
- All Implemented Interfaces:
java.lang.Cloneable
,ICacheEntry
,ICloneableCacheEntry
public class ChannelWebResource extends WebResource
A web resource that corresponds to a link that is directly to a channel.- Since:
- 5.0.0
- Version:
- $Revision: 23895 $ $Date: 2020-06-10 15:33:53 -0300 (Wed, 10 Jun 2020) $
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
calculatePath()
Returns the path to access this web resource.java.lang.String
getChannelId()
Returns the identifier of the channel this web resource represents.java.lang.String
getFriendlyURLPattern()
Returns the pattern to be used to resolve friendly URL for this web resource.java.lang.String
getName()
Returns the name for this web resource.java.util.Map<java.lang.String,java.lang.String[]>
getParameterMap()
Returns a map containing all parameters for this web resource.WebResource
getParent()
Returns the web resource of the parent element of this web resource.IProject
getProject()
Returns the project this web resource belongs to (if any).
It is important to notice that the relation webresource <-> project is not persisted.java.util.Map<java.lang.String,java.util.List<java.lang.String>>
getProperties()
Returns the properties for this web resource.protected java.lang.String
getRecommendedFileExtension()
Returns the file extension recommended for this web resource, according to its configurations.protected java.lang.String
getSeoRuleUrlPattern()
Get the Url Path from the SeoRule linked to this WebResource.java.lang.String
getTitle()
Returns the title for this web resource.java.lang.String
getUrlTitle()
Returns the title value meant to be used for friendly URL generation of this web resource.protected boolean
hasSSI()
Returns whether this web resource has Server Side Include (requires SSI pos-processing).boolean
isCacheEnabled()
Returns if the cache is enabled for this web resource.protected boolean
isFriendlyURLEnabled()
Indicates if friendly URL is enabled for this web resource.-
Methods inherited from class lumis.portal.url.WebResource
clone, getCreatedDateTime, getDynamicPath, getFriendlyPath, getId, getLocale, getPageCache, getParameter, getParameterValues, getPath, getWebsite, isAvailableForGetRequest, isCacheEnabled, isDynamicRequestValid, localize, mayBePersisted, setDynamicPath, setFriendlyPath, setId, setLocale, setPageCache, setWebsite, toString
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:WebResource
Returns the name for this web resource. The name is usually used for management display purposes.- Specified by:
getName
in classWebResource
- Returns:
- this web resource's name, localized according to its locale.
- See Also:
WebResource.getLocale()
-
getTitle
public java.lang.String getTitle()
Description copied from class:WebResource
Returns the title for this web resource. The title is usually used as an end-user title.- Specified by:
getTitle
in classWebResource
- Returns:
- this web resource's title, localized according to its locale.
- See Also:
WebResource.getLocale()
-
getUrlTitle
public java.lang.String getUrlTitle()
Description copied from class:WebResource
Returns the title value meant to be used for friendly URL generation of this web resource.- Specified by:
getUrlTitle
in classWebResource
- Returns:
- the title value.
- See Also:
IURLResolver
-
getParent
public WebResource getParent()
Description copied from class:WebResource
Returns the web resource of the parent element of this web resource.- Specified by:
getParent
in classWebResource
- Returns:
- the parent of this web resource, or
null
if it has no parent.
-
getParameterMap
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
Description copied from class:WebResource
Returns a map containing all parameters for this web resource.- Specified by:
getParameterMap
in classWebResource
- Returns:
- an immutable map containing all parameters for this web resource.
-
getProperties
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getProperties()
Description copied from class:WebResource
Returns the properties for this web resource.- Specified by:
getProperties
in classWebResource
- Returns:
- a immutable map where the key is the property name and the value is a list of the property's values.
-
calculatePath
protected java.lang.String calculatePath()
Description copied from class:WebResource
Returns the path to access this web resource. The returned value is taken from cache configuration,WebResource.getFriendlyPath()
orWebResource.getDynamicPath()
.- Overrides:
calculatePath
in classWebResource
- Returns:
- the path to access this web resource, starting with '/' and relative to the portal web application root.
-
isCacheEnabled
public boolean isCacheEnabled()
Description copied from class:WebResource
Returns if the cache is enabled for this web resource.- Overrides:
isCacheEnabled
in classWebResource
- Returns:
true
if the cache is enabled,false
otherwise.
-
isFriendlyURLEnabled
protected boolean isFriendlyURLEnabled()
Description copied from class:WebResource
Indicates if friendly URL is enabled for this web resource.- Overrides:
isFriendlyURLEnabled
in classWebResource
- Returns:
true
if it is enabled,false
otherwise.
-
getFriendlyURLPattern
public java.lang.String getFriendlyURLPattern()
Description copied from class:WebResource
Returns the pattern to be used to resolve friendly URL for this web resource.The specific syntax or usage of the pattern is up to the
IURLResolver
configured for this web resource.- Overrides:
getFriendlyURLPattern
in classWebResource
- Returns:
- the pattern.
-
hasSSI
protected boolean hasSSI()
Description copied from class:WebResource
Returns whether this web resource has Server Side Include (requires SSI pos-processing).- Overrides:
hasSSI
in classWebResource
- Returns:
true
if this web resource has SSI,false
otherwise.
-
getRecommendedFileExtension
protected java.lang.String getRecommendedFileExtension()
Description copied from class:WebResource
Returns the file extension recommended for this web resource, according to its configurations.- Overrides:
getRecommendedFileExtension
in classWebResource
- Returns:
- the extension, starting with '.'. Example: ".htm"
-
getChannelId
public java.lang.String getChannelId()
Returns the identifier of the channel this web resource represents.- Returns:
- the channel identifier.
- Since:
- 5.0.0
-
getSeoRuleUrlPattern
protected java.lang.String getSeoRuleUrlPattern() throws PortalException
Description copied from class:WebResource
Get the Url Path from the SeoRule linked to this WebResource.- Specified by:
getSeoRuleUrlPattern
in classWebResource
- Returns:
- The url path pattern or
null
if not specified. - Throws:
PortalException
-
getProject
public IProject getProject() throws PortalException
Description copied from class:WebResource
Returns the project this web resource belongs to (if any).
It is important to notice that the relation webresource <-> project is not persisted. Instead, it is calculated at runtime.
This method may require a current transaction.- Specified by:
getProject
in classWebResource
- Returns:
- the project this web resource belongs to (if any).
- Throws:
PortalException
-
-