Class XPageAppService
java.lang.Object
fr.paris.lutece.portal.service.cache.AbstractCacheableService
fr.paris.lutece.portal.service.content.ContentService
fr.paris.lutece.portal.service.content.XPageAppService
- All Implemented Interfaces:
CacheableService,LuteceService,Cloneable,net.sf.ehcache.event.CacheEventListener
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¶m1=value1& ...¶mN=valueN - See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic XPageApplicationEntrygetApplicationEntry(String strName) Gets Application entry by namestatic XPageApplicationGet an XPage instanceintGets the number of item currently in the cache.getName()Returns the Content Service namegetPage(javax.servlet.http.HttpServletRequest request, int nMode) Build the XPage content.static Collection<XPageApplicationEntry>Gets applications listbooleanGets the current cache status.booleanisInvoked(javax.servlet.http.HttpServletRequest request) Analyzes request parameters to see if the request should be handled by the current Content Servicestatic voidRegister an application by its entry defined in the plugin xml filevoidReset the cache.Methods inherited from class fr.paris.lutece.portal.service.content.ContentService
getPluginName, setPluginNameMethods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService
clone, dispose, enableCache, getCache, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getStatistics, getTimeToLive, initCache, initCache, notifyElementEvicted, notifyElementExpired, notifyElementPut, notifyElementRemoved, notifyElementUpdated, notifyRemoveAll, putInCache, removeKey
-
Field Details
-
PARAM_XPAGE_APP
- See Also:
-
-
Constructor Details
-
XPageAppService
public XPageAppService()
-
-
Method Details
-
registerXPageApplication
Register an application by its entry defined in the plugin xml file- Parameters:
entry- The application entry- Throws:
LuteceInitException- If an error occured
-
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:
isInvokedin classContentService- Parameters:
request- The HTTP request- Returns:
- true if this ContentService should handle this request
-
isCacheEnable
public boolean isCacheEnable()Gets the current cache status.- Specified by:
isCacheEnablein interfaceCacheableService- Overrides:
isCacheEnablein classAbstractCacheableService- Returns:
- true if enable, otherwise false
-
resetCache
public void resetCache()Reset the cache.- Specified by:
resetCachein interfaceCacheableService- Overrides:
resetCachein classAbstractCacheableService
-
getCacheSize
public int getCacheSize()Gets the number of item currently in the cache.- Specified by:
getCacheSizein interfaceCacheableService- Overrides:
getCacheSizein classAbstractCacheableService- Returns:
- the number of item currently in the cache.
-
getPage
public String getPage(javax.servlet.http.HttpServletRequest request, int nMode) throws UserNotSignedException, SiteMessageException Build the XPage content.- Specified by:
getPagein classContentService- Parameters:
request- The HTTP request.nMode- The current mode.- Returns:
- The HTML code of the page.
- Throws:
UserNotSignedException- The User Not Signed ExceptionSiteMessageException- occurs when a site message need to be displayed
-
getApplicationEntry
Gets Application entry by name- Parameters:
strName- The application's name- Returns:
- The entry
-
getXPageApplicationsList
Gets applications list- Returns:
- A collection of applications
-
getApplicationInstance
Get an XPage instance- Parameters:
entry- The Xpage entry- Returns:
- An instance of a given XPage
-