|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.policy.AbstractPolicyFilter
com.jalios.jcms.policy.BasicChannelPolicyFilter
public class BasicChannelPolicyFilter
This class allow developers to put hooks to change channel mechanism behaviour. To get more information about the current request in hooks, the method Channel#getCurrentJcmsContext() must be called.
ChannelPolicyFilter| Field Summary | |
|---|---|
static String |
REVISION
|
| Fields inherited from class com.jalios.jcms.policy.AbstractPolicyFilter |
|---|
order |
| Constructor Summary | |
|---|---|
BasicChannelPolicyFilter()
|
|
| Method Summary | |
|---|---|
void |
checkJAVAMetaTemplates(Map templateMap,
String className,
org.jdom.Element typeElt,
boolean isExtension)
This method is a Hook to generate custom JAVA templates for a given type or extension The templateMap contains the template file to generate. |
void |
checkJSPMetaTemplates(Map templateMap,
String className,
org.jdom.Element typeElt,
boolean isExtension)
This method is a Hook to generate custom JSP templates for a given type or extension The templateMap contains the template file to generate. |
Data |
getData(String id)
Retrieve a Data from its id. |
boolean |
init(Plugin plugin)
Initialize the component with the given plugin configuration |
| Methods inherited from class com.jalios.jcms.policy.AbstractPolicyFilter |
|---|
compareTo, equals, getOrder, setOrder |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public static final String REVISION
| Constructor Detail |
|---|
public BasicChannelPolicyFilter()
| Method Detail |
|---|
public boolean init(Plugin plugin)
PluginComponent
init in interface PluginComponentplugin - the calling plugin
PluginComponent.init(Plugin)
public void checkJSPMetaTemplates(Map templateMap,
String className,
org.jdom.Element typeElt,
boolean isExtension)
ChannelPolicyFilterThis method is a Hook to generate custom JSP templates for a given type or extension
The templateMap contains the template file to generate.
checkJSPMetaTemplates in interface ChannelPolicyFiltertemplateMap - The map of key/value = file/templateclassName - The classname of the processing typetypeElt - The XML Element of the processing typeisExtension - boolean true if the type is an Extension
Called in private method com.jalios.jcms.TypeProcessor#generateTypeJSP(String, Element)ChannelPolicyFilter.checkJSPMetaTemplates(Map, String, Element, boolean)
public void checkJAVAMetaTemplates(Map templateMap,
String className,
org.jdom.Element typeElt,
boolean isExtension)
ChannelPolicyFilterThis method is a Hook to generate custom JAVA templates for a given type or extension
The templateMap contains the template file to generate.
checkJAVAMetaTemplates in interface ChannelPolicyFiltertemplateMap - The map of key/value = file/templateclassName - The classname of the processing typetypeElt - The XML Element of the processing typeisExtension - boolean true if the type is an Extension
Called in private method com.jalios.jcms.TypeProcessor#processTypes()ChannelPolicyFilter.checkJAVAMetaTemplates(Map, String, Element, boolean)public Data getData(String id)
ChannelPolicyFilter
This method is invoked only when JCMS internal method could not find any
data associated with the specified id (and if no other ChannelPolicyFilter did return a Data).
May be invoked frequently !! Ensure high performance.
This hook can be implemented by plugins creating transient Data (e.g through QueryFilter).
Example :
public Data getData(String id) {
if (!id.startsWith("someprefix_") {
return null;
}
// perform data retrieval (preferably using a internal cache on your side)
// ...
}
getData in interface ChannelPolicyFilterid - the id to look for (never null)
ChannelPolicyFilter.getData(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||