fr.paris.lutece.portal.service.content
Class XPageAppService

java.lang.Object
  extended by fr.paris.lutece.portal.service.cache.AbstractCacheableService
      extended by fr.paris.lutece.portal.service.content.ContentService
          extended by fr.paris.lutece.portal.service.content.XPageAppService
All Implemented Interfaces:
CacheableService, LuteceService, java.lang.Cloneable, net.sf.ehcache.event.CacheEventListener

public class XPageAppService
extends ContentService

This class delivers Extra pages (xpages) to web components. An XPage is a page where the content is provided by a specific class, but should be integrated into the portal struture and design. XPageApps are identified by a key name. To display an XPage into the portal just call the following url :
Portal.jsp?page=keyname&param1=value1& ...&paramN=valueN

See Also:
XPage

Field Summary
static java.lang.String PARAM_XPAGE_APP
           
 
Constructor Summary
XPageAppService()
           
 
Method Summary
static XPageApplicationEntry getApplicationEntry(java.lang.String strName)
          Gets Application entry by name
 int getCacheSize()
          Gets the number of item currently in the cache.
 java.lang.String getName()
          Returns the Content Service name
 java.lang.String getPage(javax.servlet.http.HttpServletRequest request, int nMode)
          Build the XPage content.
static java.util.Collection<XPageApplicationEntry> getXPageApplicationsList()
          Gets applications list
 boolean isCacheEnable()
          Gets the current cache status.
 boolean isInvoked(javax.servlet.http.HttpServletRequest request)
          Analyzes request parameters to see if the request should be handled by the current Content Service
static void registerXPageApplication(XPageApplicationEntry entry)
          Register an application by its entry defined in the plugin xml file
 void resetCache()
          Reset the cache.
 void setCache(boolean bCache)
          Enable or disable the cache feature.
 
Methods inherited from class fr.paris.lutece.portal.service.content.ContentService
getPluginName, setPluginName
 
Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getTimeToLive, initCache, initCache, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_XPAGE_APP

public static final java.lang.String PARAM_XPAGE_APP
See Also:
Constant Field Values
Constructor Detail

XPageAppService

public XPageAppService()
Method Detail

registerXPageApplication

public static void registerXPageApplication(XPageApplicationEntry entry)
                                     throws LuteceInitException
Register an application by its entry defined in the plugin xml file

Parameters:
entry - The application entry
Throws:
LuteceInitException - If an error occured

getName

public java.lang.String getName()
Returns the Content Service name

Returns:
The name as a String

isInvoked

public boolean isInvoked(javax.servlet.http.HttpServletRequest request)
Analyzes request parameters to see if the request should be handled by the current Content Service

Specified by:
isInvoked in class ContentService
Parameters:
request - The HTTP request
Returns:
true if this ContentService should handle this request

setCache

public void setCache(boolean bCache)
Enable or disable the cache feature.

Parameters:
bCache - true to enable the cache, false to disable

isCacheEnable

public boolean isCacheEnable()
Gets the current cache status.

Specified by:
isCacheEnable in interface CacheableService
Overrides:
isCacheEnable in class AbstractCacheableService
Returns:
true if enable, otherwise false

resetCache

public void resetCache()
Reset the cache.

Specified by:
resetCache in interface CacheableService
Overrides:
resetCache in class AbstractCacheableService

getCacheSize

public int getCacheSize()
Gets the number of item currently in the cache.

Specified by:
getCacheSize in interface CacheableService
Overrides:
getCacheSize in class AbstractCacheableService
Returns:
the number of item currently in the cache.

getPage

public java.lang.String getPage(javax.servlet.http.HttpServletRequest request,
                                int nMode)
                         throws UserNotSignedException,
                                SiteMessageException
Build the XPage content.

Specified by:
getPage in class ContentService
Parameters:
request - The HTTP request.
nMode - The current mode.
Returns:
The HTML code of the page.
Throws:
UserNotSignedException - The User Not Signed Exception
SiteMessageException - occurs when a site message need to be displayed

getApplicationEntry

public static XPageApplicationEntry getApplicationEntry(java.lang.String strName)
Gets Application entry by name

Parameters:
strName - The application's name
Returns:
The entry

getXPageApplicationsList

public static java.util.Collection<XPageApplicationEntry> getXPageApplicationsList()
Gets applications list

Returns:
A collection of applications


Copyright © 2012 Mairie de Paris. All Rights Reserved.