Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.platform.cache
Class CacheableObjectKeys

java.lang.Object
  extended by org.nuxeo.ecm.platform.cache.CacheableObjectKeys

public class CacheableObjectKeys
extends Object


Constructor Summary
CacheableObjectKeys()
           
 
Method Summary
static String getCacheKey(DataModel dataModel)
           
static String getCacheKey(DocumentModel docModel)
           
static String getCacheKey(DocumentRef docRef)
          Constructs a cache key based on the doc reference which in most cases is a document path DocumentRef.reference().
static String getCacheKey(DocumentRef docRef, String childName)
          Constructs a cache key similar to the case when only docRef is given, but adding as a suffix "/child/[childName]".
static String getCacheKey(DocumentRef docRef, VersionModel version)
          Constructs a cache key similar to the case when only docRef is given, but adding as a suffix "/ver/[version label]".
static String getCacheKey(Object docRef)
           
static String getCacheKey(Object docRef, Object version)
           
static String getCacheKey(Object docRef, String childName)
           
static String getCacheKeyForDocPath(String docPath)
          This method pertains to ServerCache only...
static String getCacheKeyForDocUUID(String docPath)
          This method pertains to ServerCache only...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheableObjectKeys

public CacheableObjectKeys()
Method Detail

getCacheKey

public static String getCacheKey(DataModel dataModel)
Parameters:
dataModel -
Returns:
the key for DataModel base on DataModel.getSchema()

getCacheKey

public static String getCacheKey(DocumentModel docModel)
Parameters:
docModel -
Returns:
the key for DocumentModel based on DocumentModel.getPathAsString()

getCacheKey

public static String getCacheKey(DocumentRef docRef)
Constructs a cache key based on the doc reference which in most cases is a document path DocumentRef.reference().

Parameters:
docRef -
Returns:

getCacheKey

public static String getCacheKey(Object docRef)

getCacheKeyForDocPath

public static String getCacheKeyForDocPath(String docPath)
This method pertains to ServerCache only... Used in Event Listener for Document objects to invalidate entries in the cache. It work only with documents referenced by their paths


getCacheKeyForDocUUID

public static String getCacheKeyForDocUUID(String docPath)
This method pertains to ServerCache only... Used in Event Listener for Document objects to invalidate entries in the cache. It work only with documents referenced by their UUIDs


getCacheKey

public static String getCacheKey(DocumentRef docRef,
                                 String childName)
Constructs a cache key similar to the case when only docRef is given, but adding as a suffix "/child/[childName]".

Parameters:
docRef -
childName -
Returns:

getCacheKey

public static String getCacheKey(Object docRef,
                                 String childName)

getCacheKey

public static String getCacheKey(DocumentRef docRef,
                                 VersionModel version)
Constructs a cache key similar to the case when only docRef is given, but adding as a suffix "/ver/[version label]".

Parameters:
docRef -
version -
Returns:

getCacheKey

public static String getCacheKey(Object docRef,
                                 Object version)

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.