|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.template.cache.A_CmsElement
An instance of A_CmsElement represents an requestable Element in the OpenCms element cache area. It contains all informations to generate the content of this element. It also stores the variants of once generated content to speed up performance. It may point to other depending elements. Theses elements are called to generate their content on generation-time.
| Field Summary | |
protected A_CmsCacheDirectives |
m_cacheDirectives
Cache directives of this element. |
protected String |
m_className
The class-name of this element definition. |
protected CmsElementDefinitionCollection |
m_elementDefinitions
All definitions declared in this element. |
protected boolean |
m_hasDepVariants
indicates if this element may have a variant that has dependencies if such a element is deletet from elementcache the extern dependencies hashtable must be updated. |
protected String |
m_readAccessGroup
The name of the group that can read this ressource. |
protected String |
m_templateName
The template-name of this element definition. |
protected long |
m_timestamp
Last time this element was generated. |
| Fields inherited from interface com.opencms.boot.I_CmsLogChannels |
C_FLEX_CACHE, C_FLEX_LOADER, C_LOGGING, C_MODULE_CRITICAL, C_MODULE_DEBUG, C_MODULE_INFO, C_OPENCMS_CACHE, C_OPENCMS_CRITICAL, C_OPENCMS_CRONSCHEDULER, C_OPENCMS_DEBUG, C_OPENCMS_ELEMENTCACHE, C_OPENCMS_INFO, C_OPENCMS_INIT, C_OPENCMS_POOL, C_OPENCMS_STATICEXPORT, C_OPENCMS_STREAMING, C_PREPROCESSOR_IS_LOGGING |
| Constructor Summary | |
A_CmsElement()
|
|
| Method Summary | |
void |
addDefinition(CmsElementDefinition def)
Adds a single definition to this element. |
Vector |
addVariant(Object key,
CmsElementVariant variant)
Adds a single variant to this element. |
void |
checkProxySettings(CmsObject cms,
CmsCacheDirectives proxySettings,
Hashtable parameters)
checks the proxy public and the proxy private cache settings of this element and all subelements. |
void |
checkReadAccess(CmsObject cms)
checks the read access. |
void |
clearVariantCache()
Clears all variants. |
CmsElementDefinitionCollection |
getAllDefinitions()
Returns a Vector with all ElementDefinitions |
Vector |
getAllVariantKeys()
|
A_CmsCacheDirectives |
getCacheDirectives()
Get cache directives for this element. |
abstract byte[] |
getContent(CmsElementCache elementCache,
CmsObject cms,
CmsElementDefinitionCollection efDefs,
String elementName,
Hashtable parameters,
String methodParameter)
Abstract method for getting the content of this element. |
CmsElementDefinition |
getElementDefinition(String name)
Get the element definition for the sub-element with the given name |
protected I_CmsTemplate |
getTemplateClass(CmsObject cms,
String classname)
Get a template class from the template class manager. |
CmsElementVariant |
getVariant(Object key)
Get a variant from the vatiant cache |
boolean |
hasDependenciesVariants()
says if the extern dependenciescache has to be updated when this element is deleted. |
protected void |
init(String className,
String templateName,
String readAccessGroup,
A_CmsCacheDirectives cd,
CmsElementDefinitionCollection defs,
int variantCachesize)
Initializer for building an element with the given element definitions. |
protected void |
init(String className,
String templateName,
String readAccessGroup,
A_CmsCacheDirectives cd,
int variantCachesize)
Initializer for an element with the given class and template name. |
void |
removeVariant(Object key)
|
byte[] |
resolveVariant(CmsObject cms,
CmsElementVariant variant,
CmsElementCache elementCache,
CmsElementDefinitionCollection elDefs,
Hashtable parameters)
Resolve given variant of this element and get content of all sub elements. |
void |
thisElementHasDepVariants()
indicates this element critical for delete. |
String |
toString()
Get a string representation of this element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String m_className
protected String m_templateName
protected A_CmsCacheDirectives m_cacheDirectives
protected String m_readAccessGroup
protected long m_timestamp
protected CmsElementDefinitionCollection m_elementDefinitions
protected boolean m_hasDepVariants
| Constructor Detail |
public A_CmsElement()
| Method Detail |
protected void init(String className,
String templateName,
String readAccessGroup,
A_CmsCacheDirectives cd,
int variantCachesize)
protected void init(String className,
String templateName,
String readAccessGroup,
A_CmsCacheDirectives cd,
CmsElementDefinitionCollection defs,
int variantCachesize)
className - the classname of this element-definition.readAccessGroup - The group that may read the element.cd - Cache directives for this elementdefs - Vector with ElementDefinitions for this element.variantCachesize - The size of the variant cache.public void addDefinition(CmsElementDefinition def)
def - - the ElementDefinition to add.
public Vector addVariant(Object key,
CmsElementVariant variant)
public void removeVariant(Object key)
public void checkReadAccess(CmsObject cms)
throws CmsException
cms - The cms Object for reading groups.
CmsException - if no read access.public void clearVariantCache()
public Vector getAllVariantKeys()
public CmsElementVariant getVariant(Object key)
key - Key of the ElementVariant.
public boolean hasDependenciesVariants()
public void thisElementHasDepVariants()
public CmsElementDefinitionCollection getAllDefinitions()
public CmsElementDefinition getElementDefinition(String name)
name - Name of the sub-element that should be looked up
public A_CmsCacheDirectives getCacheDirectives()
public void checkProxySettings(CmsObject cms,
CmsCacheDirectives proxySettings,
Hashtable parameters)
throws CmsException
cms - the cms object.proxySettings - The CacheDirectives to merge the own CacheDriectives with.parameters - A Hashtable with the parameters.
CmsException
public abstract byte[] getContent(CmsElementCache elementCache,
CmsObject cms,
CmsElementDefinitionCollection efDefs,
String elementName,
Hashtable parameters,
String methodParameter)
throws CmsException
elementCache - Entry point for the element cachecms - CmsObject for accessing system resourcesparameters - All parameters of this request
CmsException
protected I_CmsTemplate getTemplateClass(CmsObject cms,
String classname)
throws CmsException
cms - CmsObject for accessing system resources.classname - Name of the requested class.
CmsException - if the loaded class is no OpenCms template class
public byte[] resolveVariant(CmsObject cms,
CmsElementVariant variant,
CmsElementCache elementCache,
CmsElementDefinitionCollection elDefs,
Hashtable parameters)
throws CmsException
cms - CmsObject for accessing system resourcesvariant - Variant that should be resolvedelementCache - Entry point for element cacheelDefs - Definitions for all subelementsparameters - All parameters of this request
CmsException - if resolving fails.public String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||