public abstract class View extends AppServicePlugin
The base class that different View solution should extends
Plugin.InfoRepo
Constructor and Description |
---|
View() |
Modifier and Type | Method and Description |
---|---|
boolean |
appliedTo(ActContext context) |
protected void |
applyTo(App app) |
protected void |
init(App app)
Sub class could use this method initialize the implementation
|
java.util.List<java.lang.String> |
loadContent(java.lang.String template)
Load template content.
|
protected abstract Template |
loadInlineTemplate(java.lang.String content)
Sub class must implement this method to load the template from string literal
|
protected abstract Template |
loadTemplate(java.lang.String resourcePath)
Sub class must implement this method to load the template
|
abstract java.lang.String |
name()
Returns the View solution’s name.
|
protected void |
reload(App app) |
protected java.lang.String |
templateHome() |
protected java.io.File |
templateRootDir() |
register
public abstract java.lang.String name()
Returns the View solution’s name. Recommended name should be in lower case characters. E.g. freemarker, velocity, rythm etc
protected void applyTo(App app)
applyTo
in class AppServicePlugin
public boolean appliedTo(ActContext context)
protected abstract Template loadTemplate(java.lang.String resourcePath)
Sub class must implement this method to load the template
resourcePath
- the path to the templatecontext
- the view contextnull
if template not foundprotected abstract Template loadInlineTemplate(java.lang.String content)
Sub class must implement this method to load the template from string literal
content
- the template content string literalcontext
- the view contextprotected void init(App app)
Sub class could use this method initialize the implementation
protected void reload(App app)
protected final java.lang.String templateHome()
public java.util.List<java.lang.String> loadContent(java.lang.String template)
Load template content.
This method is used by error reporting feature when app running in dev mode
template
- the template pathprotected final java.io.File templateRootDir()
Copyright © 2014–2017 ActFramework. All rights reserved.