|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.paris.lutece.portal.service.cache.AbstractCacheableService
fr.paris.lutece.portal.service.content.ContentService
fr.paris.lutece.portal.service.page.OldPageService
public class OldPageService
This class delivers pages to web componants. It handles XML tranformation to HTML and provides a cache feature in order to reduce the number of tranformations.
Nested Class Summary | |
---|---|
class |
OldPageService.CustomAction
CustomAction define a customized action for portlet types |
Field Summary | |
---|---|
static java.lang.String |
REDIRECTION_KEY
|
static java.lang.String |
TEMPLATE_PAGE_ACCESS_CONTROLED
Access Controled template |
static java.lang.String |
TEMPLATE_PAGE_ACCESS_DENIED
Access denied template |
Constructor Summary | |
---|---|
OldPageService()
Creates a new PageService object. |
Method Summary | |
---|---|
void |
addPageEventListener(PageEventListener listener)
Add a new page event listener |
java.lang.String |
buildPageContent(java.lang.String strIdPage,
int nMode,
javax.servlet.http.HttpServletRequest request,
java.lang.Boolean bCanBeCached)
Build the page content. |
java.lang.Object |
clone()
|
void |
createPage(Page page)
Create a page |
static java.lang.String |
getBaseUrl(javax.servlet.http.HttpServletRequest request)
Evaluate base URL from request Useful when a Lutece instance can be accessed from different virtual hosts |
ImageResource |
getImageResource(int nIdResource)
Gets the image resource for a given resource |
java.lang.String |
getName()
Returns the Content Service name |
java.lang.String |
getPage(javax.servlet.http.HttpServletRequest request,
int nMode)
Returns the page for a given ID. |
java.lang.String |
getPage(java.lang.String strIdPage,
int nMode,
javax.servlet.http.HttpServletRequest request)
Returns the page for a given ID. |
java.lang.String |
getPageContent(int nIdPage,
int nMode,
javax.servlet.http.HttpServletRequest request)
Build the page content. |
java.lang.String |
getResourceTypeId()
Returns the resource type Id |
void |
invalidateContent(int nPageId)
Invalidate Page Content |
boolean |
isAuthorizedAdminPage(int nIdPage,
java.lang.String strPermission,
AdminUser user)
Check that a given user is allowed to access a page for a given permission and his workgroups |
boolean |
isInvoked(javax.servlet.http.HttpServletRequest request)
Analyzes request's parameters to see if the request should be handled by the current Content Service |
void |
notifyElementEvicted(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
|
void |
notifyElementExpired(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
|
void |
notifyElementRemoved(net.sf.ehcache.Ehcache cache,
net.sf.ehcache.Element element)
|
void |
notifyRemoveAll(net.sf.ehcache.Ehcache cache)
|
void |
processPageEvent(PageEvent event)
Process a page event |
void |
removeKeyFromMap(net.sf.ehcache.Element element)
|
void |
removePage(int nPageId)
Remove a given page |
void |
setCacheKeyService(ICacheKeyService cacheKeyService)
|
void |
updatePage(Page page)
Update a given page |
Methods inherited from class fr.paris.lutece.portal.service.content.ContentService |
---|
getPluginName, setPluginName |
Methods inherited from class fr.paris.lutece.portal.service.cache.AbstractCacheableService |
---|
dispose, enableCache, getCache, getCacheSize, getFromCache, getInfos, getKeys, getMaxElements, getMemorySize, getTimeToLive, initCache, initCache, isCacheEnable, notifyElementPut, notifyElementUpdated, putInCache, resetCache |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String REDIRECTION_KEY
public static final java.lang.String TEMPLATE_PAGE_ACCESS_DENIED
public static final java.lang.String TEMPLATE_PAGE_ACCESS_CONTROLED
Constructor Detail |
---|
public OldPageService()
Method Detail |
---|
public java.lang.String getName()
getName
in interface LuteceService
public boolean isInvoked(javax.servlet.http.HttpServletRequest request)
isInvoked
in class ContentService
request
- The HTTP request
public static java.lang.String getBaseUrl(javax.servlet.http.HttpServletRequest request)
request
- The HTTP servlet request
public java.lang.String getPage(javax.servlet.http.HttpServletRequest request, int nMode) throws SiteMessageException
getPage
in interface IPageService
getPage
in class ContentService
request
- The page IDnMode
- The current mode.
SiteMessageException
- If a message shouldbe displayedpublic java.lang.String getPage(java.lang.String strIdPage, int nMode, javax.servlet.http.HttpServletRequest request) throws SiteMessageException
getPage
in interface IPageService
strIdPage
- The page IDnMode
- The current mode.request
- The HttpRequest
SiteMessageException
- occurs when a site message need to be displayedpublic java.lang.String buildPageContent(java.lang.String strIdPage, int nMode, javax.servlet.http.HttpServletRequest request, java.lang.Boolean bCanBeCached) throws SiteMessageException
strIdPage
- The page IDnMode
- The current mode.request
- The HttpRequestbCanBeCached
- The boolean
SiteMessageException
- occurs when a site message need to be displayedpublic java.lang.String getPageContent(int nIdPage, int nMode, javax.servlet.http.HttpServletRequest request) throws SiteMessageException
getPageContent
in interface IPageService
nIdPage
- The page IDnMode
- The current mode.request
- The HttpRequest
SiteMessageException
- occurs when a site message need to be displayedpublic void setCacheKeyService(ICacheKeyService cacheKeyService)
cacheKeyService
- the _cacheKeyService to setpublic void addPageEventListener(PageEventListener listener)
listener
- An event listener to addpublic java.lang.String getResourceTypeId()
getResourceTypeId
in interface ImageResourceProvider
getResourceTypeId
in interface IPageService
public ImageResource getImageResource(int nIdResource)
getImageResource
in interface ImageResourceProvider
nIdResource
- The Resource id
public void createPage(Page page)
createPage
in interface IPageService
page
- The page to createpublic void updatePage(Page page)
updatePage
in interface IPageService
page
- The page to updatepublic void removePage(int nPageId)
removePage
in interface IPageService
nPageId
- The page Idpublic void processPageEvent(PageEvent event)
processPageEvent
in interface PageEventListener
event
- The event to processpublic void invalidateContent(int nPageId)
invalidateContent
in interface IPageService
nPageId
- The Page IDpublic boolean isAuthorizedAdminPage(int nIdPage, java.lang.String strPermission, AdminUser user)
isAuthorizedAdminPage
in interface IPageService
nIdPage
- the id of the page to checkstrPermission
- the permission neededuser
- The current user
public void notifyElementEvicted(net.sf.ehcache.Ehcache cache, net.sf.ehcache.Element element)
AbstractCacheableService
notifyElementEvicted
in interface net.sf.ehcache.event.CacheEventListener
notifyElementEvicted
in class AbstractCacheableService
cache
- The Ehcache objectelement
- The Element objectCacheEventListener.notifyElementEvicted(net.sf.ehcache.Ehcache,
net.sf.ehcache.Element)
public void notifyElementExpired(net.sf.ehcache.Ehcache cache, net.sf.ehcache.Element element)
AbstractCacheableService
notifyElementExpired
in interface net.sf.ehcache.event.CacheEventListener
notifyElementExpired
in class AbstractCacheableService
cache
- The Ehcache objectelement
- The Element objectCacheEventListener.notifyElementExpired(net.sf.ehcache.Ehcache,
net.sf.ehcache.Element)
public void notifyElementRemoved(net.sf.ehcache.Ehcache cache, net.sf.ehcache.Element element)
AbstractCacheableService
notifyElementRemoved
in interface net.sf.ehcache.event.CacheEventListener
notifyElementRemoved
in class AbstractCacheableService
cache
- The Ehcache objectelement
- The Element objectCacheEventListener.notifyElementRemoved(net.sf.ehcache.Ehcache,
net.sf.ehcache.Element)
public void notifyRemoveAll(net.sf.ehcache.Ehcache cache)
AbstractCacheableService
notifyRemoveAll
in interface net.sf.ehcache.event.CacheEventListener
notifyRemoveAll
in class AbstractCacheableService
cache
- .cache
- The Ehcache objectCacheEventListener.notifyRemoveAll(net.sf.ehcache.Ehcache)
public void removeKeyFromMap(net.sf.ehcache.Element element)
element
- The Element objectpublic java.lang.Object clone()
clone
in interface net.sf.ehcache.event.CacheEventListener
clone
in class AbstractCacheableService
Object.clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |