org.exoplatform.wiki.rendering.cache
Interface PageRenderingCacheService

All Known Implementing Classes:
PageRenderingCacheServiceImpl

public interface PageRenderingCacheService

Manages the Rendering Cache of wiki pages. The cache stores all HTML markups from the wiki page markups. Therefore, it saves much time in rendering markups, especially with a long content page. Generally, its workflow is as follows:


Method Summary
 void addPageLink(WikiPageParams param, WikiPageParams entity)
          Adds a link between two pages.
 int getAttachmentCount(PageImpl page)
          Get number of attachment of a wiki page
 Page getPageByParams(WikiPageParams param)
          Gets the wiki page object by params
 Map<WikiPageParams,List<WikiPageParams>> getPageLinksMap()
          Returns a collection of connections of a wiki page.
 String getRenderedContent(WikiPageParams param, String targetSyntax)
          Gets the rendered content of a wiki page.
 org.exoplatform.services.cache.ExoCache<Integer,MarkupData> getRenderingCache()
          Gets the rendering cache.
 void invalidateAttachmentCache(WikiPageParams param)
          Invalidate cache storing attachment size of a wiki page
 void invalidateCache(WikiPageParams param)
          Invalidates all cache entries linking to a page in case this page is removed, changed or renamed.
 void invalidateUUIDCache(WikiPageParams param)
          Invalidates the cache entry containing given wiki page param
 

Method Detail

getRenderedContent

String getRenderedContent(WikiPageParams param,
                          String targetSyntax)
Gets the rendered content of a wiki page.

Parameters:
param - The parameter which specifies the wiki page.
targetSyntax - The syntax to be displayed.
Returns:
The rendered content.

getPageByParams

Page getPageByParams(WikiPageParams param)
Gets the wiki page object by params

Parameters:
param - the wiki page param
Returns:
the wiki page

getAttachmentCount

int getAttachmentCount(PageImpl page)
Get number of attachment of a wiki page

Parameters:
param - the parameter to specify the wiki page
targetSyntax - the syntax to be display
Returns:
the attachment size

getRenderingCache

org.exoplatform.services.cache.ExoCache<Integer,MarkupData> getRenderingCache()
Gets the rendering cache.

Returns:
The rendering cache.

getPageLinksMap

Map<WikiPageParams,List<WikiPageParams>> getPageLinksMap()
Returns a collection of connections of a wiki page. In details, a connection is built if there is a link to another page in the page content.

Returns:
The map of connections.

addPageLink

void addPageLink(WikiPageParams param,
                 WikiPageParams entity)
Adds a link between two pages.

Parameters:
param - The identity parameter of the wiki page to add.
entity - The identity parameter of the wiki page to be added.

invalidateCache

void invalidateCache(WikiPageParams param)
Invalidates all cache entries linking to a page in case this page is removed, changed or renamed.

Parameters:
param - The parameter which specifies the wiki page identity.

invalidateUUIDCache

void invalidateUUIDCache(WikiPageParams param)
Invalidates the cache entry containing given wiki page param

Parameters:
param -

invalidateAttachmentCache

void invalidateAttachmentCache(WikiPageParams param)
Invalidate cache storing attachment size of a wiki page

Parameters:
param - specify identity of a page


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.