Package com.aspectran.core.support.view
Class PebbleViewDispatcher
- java.lang.Object
-
- com.aspectran.core.support.view.PebbleViewDispatcher
-
- All Implemented Interfaces:
ViewDispatcher
public class PebbleViewDispatcher extends java.lang.Object implements ViewDispatcher
The Class PebbleViewDispatcher.Created: 2016. 1. 27.
- Since:
- 2.0.0
-
-
Field Summary
-
Fields inherited from interface com.aspectran.core.activity.response.dispatch.ViewDispatcher
VIEW_DISPATCHER_SETTING_NAME
-
-
Constructor Summary
Constructors Constructor Description PebbleViewDispatcher(com.mitchellbosecke.pebble.PebbleEngine pebbleEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(Activity activity, DispatchResponseRule dispatchResponseRule)
Dispatch to other resources as the given rule.java.lang.String
getContentType()
boolean
isSingleton()
Return whether this view dispatcher corresponds to a singleton instance.void
setContentType(java.lang.String contentType)
void
setTemplateNamePrefix(java.lang.String templateNamePrefix)
Sets the prefix for the template name.void
setTemplateNameSuffix(java.lang.String templateNameSuffix)
Sets the suffix for the template name.
-
-
-
Method Detail
-
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interfaceViewDispatcher
-
setContentType
public void setContentType(java.lang.String contentType)
-
setTemplateNamePrefix
public void setTemplateNamePrefix(java.lang.String templateNamePrefix)
Sets the prefix for the template name.- Parameters:
templateNamePrefix
- the new prefix for the template name
-
setTemplateNameSuffix
public void setTemplateNameSuffix(java.lang.String templateNameSuffix)
Sets the suffix for the template name.- Parameters:
templateNameSuffix
- the new suffix for the template name
-
dispatch
public void dispatch(Activity activity, DispatchResponseRule dispatchResponseRule) throws ViewDispatcherException
Description copied from interface:ViewDispatcher
Dispatch to other resources as the given rule.- Specified by:
dispatch
in interfaceViewDispatcher
- Parameters:
activity
- the current activitydispatchResponseRule
- the dispatch response rule- Throws:
ViewDispatcherException
- the view dispatch exception
-
isSingleton
public boolean isSingleton()
Description copied from interface:ViewDispatcher
Return whether this view dispatcher corresponds to a singleton instance.- Specified by:
isSingleton
in interfaceViewDispatcher
- Returns:
- whether this view dispatcher corresponds to a singleton instance
-
-