org.exoplatform.wiki.rendering.cache.impl
Class PageRenderingCacheServiceImpl

java.lang.Object
  extended by org.exoplatform.wiki.rendering.cache.impl.PageRenderingCacheServiceImpl
All Implemented Interfaces:
PageRenderingCacheService

public class PageRenderingCacheServiceImpl
extends Object
implements PageRenderingCacheService


Field Summary
static String ATT_CACHE_NAME
           
static String CACHE_NAME
           
static String UUID_CACHE_NAME
           
 
Constructor Summary
PageRenderingCacheServiceImpl(org.exoplatform.wiki.rendering.RenderingService renderingService, WikiService wikiService, org.exoplatform.services.cache.CacheService cacheService)
          Initialize rendering cache service
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_NAME

public static final String CACHE_NAME
See Also:
Constant Field Values

ATT_CACHE_NAME

public static final String ATT_CACHE_NAME
See Also:
Constant Field Values

UUID_CACHE_NAME

public static final String UUID_CACHE_NAME
See Also:
Constant Field Values
Constructor Detail

PageRenderingCacheServiceImpl

public PageRenderingCacheServiceImpl(org.exoplatform.wiki.rendering.RenderingService renderingService,
                                     WikiService wikiService,
                                     org.exoplatform.services.cache.CacheService cacheService)
Initialize rendering cache service

Parameters:
renderingService - the rendering service
Method Detail

getRenderedContent

public String getRenderedContent(WikiPageParams param,
                                 String targetSyntax)
Description copied from interface: PageRenderingCacheService
Gets the rendered content of a wiki page.

Specified by:
getRenderedContent in interface PageRenderingCacheService
Parameters:
param - The parameter which specifies the wiki page.
targetSyntax - The syntax to be displayed.
Returns:
The rendered content.

getPageByParams

public Page getPageByParams(WikiPageParams param)
Description copied from interface: PageRenderingCacheService
Gets the wiki page object by params

Specified by:
getPageByParams in interface PageRenderingCacheService
Parameters:
param - the wiki page param
Returns:
the wiki page

getAttachmentCount

public int getAttachmentCount(PageImpl page)
Description copied from interface: PageRenderingCacheService
Get number of attachment of a wiki page

Specified by:
getAttachmentCount in interface PageRenderingCacheService
Returns:
the attachment size

getRenderingCache

public final org.exoplatform.services.cache.ExoCache<Integer,MarkupData> getRenderingCache()
Description copied from interface: PageRenderingCacheService
Gets the rendering cache.

Specified by:
getRenderingCache in interface PageRenderingCacheService
Returns:
The rendering cache.

getPageLinksMap

public Map<WikiPageParams,List<WikiPageParams>> getPageLinksMap()
Description copied from interface: PageRenderingCacheService
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.

Specified by:
getPageLinksMap in interface PageRenderingCacheService
Returns:
The map of connections.

addPageLink

public void addPageLink(WikiPageParams param,
                        WikiPageParams entity)
Description copied from interface: PageRenderingCacheService
Adds a link between two pages.

Specified by:
addPageLink in interface PageRenderingCacheService
Parameters:
param - The identity parameter of the wiki page to add.
entity - The identity parameter of the wiki page to be added.

invalidateCache

public void invalidateCache(WikiPageParams param)
Description copied from interface: PageRenderingCacheService
Invalidates all cache entries linking to a page in case this page is removed, changed or renamed.

Specified by:
invalidateCache in interface PageRenderingCacheService
Parameters:
param - The parameter which specifies the wiki page identity.

invalidateUUIDCache

public void invalidateUUIDCache(WikiPageParams param)
Description copied from interface: PageRenderingCacheService
Invalidates the cache entry containing given wiki page param

Specified by:
invalidateUUIDCache in interface PageRenderingCacheService

invalidateAttachmentCache

public void invalidateAttachmentCache(WikiPageParams param)
Description copied from interface: PageRenderingCacheService
Invalidate cache storing attachment size of a wiki page

Specified by:
invalidateAttachmentCache in interface PageRenderingCacheService
Parameters:
param - specify identity of a page


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