Package org.opencms.loader
Class CmsTransformerTemplateProvider.Configuration
java.lang.Object
org.opencms.loader.CmsTransformerTemplateProvider.Configuration
- Enclosing class:
- CmsTransformerTemplateProvider
Contains the configuration data for the provider, usually read from a configuration file.
-
Constructor Summary
ConstructorDescriptionCreates a new instance.Configuration
(JSONObject configJson) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the map of template contexts, with their internal names as keys.getFunctionFilter
(String key) Gets the function filter pattern used to filter dynamic function paths.Gets the label for the context menugetTemplateCompatibility
(String currentContext) Gets the template compatibility for the given template context.
-
Constructor Details
-
Configuration
public Configuration()Creates a new instance. -
Configuration
Creates a new instance.- Parameters:
configJson
- the configuration JSON object- Throws:
JSONException
- if something goes wrong with the JSON
-
-
Method Details
-
getContextMap
Gets the map of template contexts, with their internal names as keys.- Returns:
- the map of template contexts
-
getFunctionFilter
Gets the function filter pattern used to filter dynamic function paths.If this returns null, dynamic functions shouldn't be filtered.
- Parameters:
key
- the template context key- Returns:
- the dynamic function filter
-
getMenuLabel
Gets the label for the context menu- Returns:
- the label for the context menu
-
getTemplateCompatibility
Gets the template compatibility for the given template context.- Parameters:
currentContext
- the current template context- Returns:
- the template compatibility for the template context
-