public abstract class AbstractExtensiblePartType extends Object implements ExtensiblePartType
ExtensiblePartType
. This class
should be the base class for all new implementations of PartTypes.
To use extensible parttypes you need to insert a row into the type table of the cms database.
Please note that once the row has been inserted, any changes to the row, such as updating
the class name, require a tomcat restart (the part type information is cached internally).
To avoid id conflicts please calculate your personal id range for now:
take the 1st 4 characters of one of the customers cms license keys.
convert them from hex to dec.
multiply by 1000. this is the lowest allowed id.
add 999. thid is the highest allowed id.
eg: license key is A2B4-xxxx-xxxx...
hex a2b4 is 41652 in decimal.
your personal id range is 41652000 - 41652999.Constructor and Description |
---|
AbstractExtensiblePartType() |
Modifier and Type | Method and Description |
---|---|
void |
cleanAfterRender()
Perform cleanup operations after rendering.
|
void |
clearCache()
Clear the cache
|
protected com.gentics.contentnode.object.parttype.CMSResolver |
createCMSResolver()
Creates a new cms resolver and adds it to the stack.
|
Map |
createContext(boolean wrapRenderables)
Get the context of the parttype.
|
Object |
getCachedObject(Object key)
Get the object cached for this parttype class with the given key
|
protected String |
getCacheGroup()
Get the cache group name (=classname)
|
void |
putObjectIntoCache(Object key,
Object object)
Put the given object into the cache
|
void |
removeObjectFromCache(Object key)
Remove the object with the given key from the cache
|
Object |
resolve(String path)
Helper method to resolve property paths in the context of the part
|
String |
resolveToString(String path)
Help method to resolve a property and return it's string representation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
render
protected com.gentics.contentnode.object.parttype.CMSResolver createCMSResolver() throws com.gentics.api.lib.exception.NodeException
com.gentics.api.lib.exception.NodeException
public Object resolve(String path) throws com.gentics.api.lib.exception.NodeException
path
- property path to resolvecom.gentics.api.lib.exception.NodeException
- when an error occurred while resolvingpublic String resolveToString(String path) throws com.gentics.api.lib.exception.NodeException
path
- property path to resolvecom.gentics.api.lib.exception.NodeException
- when an error occurredpublic Map createContext(boolean wrapRenderables) throws com.gentics.api.lib.exception.NodeException
wrapRenderables
- flag to wrap renderable objects into instances of RenderableResolvablecom.gentics.api.lib.exception.NodeException
public Object getCachedObject(Object key)
key
- cache keypublic void putObjectIntoCache(Object key, Object object)
key
- cache keyobject
- cached objectpublic void removeObjectFromCache(Object key)
key
- cache keypublic void clearCache()
protected String getCacheGroup()
public void cleanAfterRender()
ExtensiblePartType
ExtensiblePartType.cleanAfterRender()
.cleanAfterRender
in interface ExtensiblePartType
Copyright © 2014 Gentics Software GmbH. All Rights Reserved.