public abstract class BaseView extends Object implements View, Comparable<View>
DEFAULT_VIEW_KEY, TYPE_KEY, VISIBLE_FALSE, VISIBLE_KEY, VISIBLE_STUDIO_ONLY| Modifier | Constructor and Description |
|---|---|
protected |
BaseView(String path,
String key,
JahiaTemplatesPackage module)
Initializes an instance of this class.
|
protected |
BaseView(String path,
String key,
JahiaTemplatesPackage module,
String displayName)
Initializes an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(View otherView) |
boolean |
equals(Object o) |
Properties |
getDefaultProperties()
Return default properties of the node type template
|
String |
getDisplayName() |
String |
getFileExtension() |
String |
getInfo()
Return printable information about the script : type, localization, file, ..
|
protected abstract InputStream |
getInputStream(String resource)
Returns an input stream for the specified resource or null if the resource does not exist.
|
String |
getKey() |
JahiaTemplatesPackage |
getModule() |
String |
getModuleVersion() |
String |
getPath() |
Properties |
getProperties()
Return properties of the template
|
protected abstract URL |
getResource(String resource) |
protected abstract String |
getResourcePath(String resource)
Obtains the path for the specified resource which can be used to read it using corresponding script, e.g.
|
int |
hashCode() |
protected Properties |
loadProperties(String path,
String thumbnailPath) |
void |
setDefaultProperties(Properties defaultProperties) |
void |
setProperties(Properties properties) |
String |
toString() |
protected BaseView(String path, String key, JahiaTemplatesPackage module)
path - the resource pathkey - the key of the viewmodule - corresponding JahiaTemplatesPackage instanceprotected BaseView(String path, String key, JahiaTemplatesPackage module, String displayName)
path - the resource pathkey - the key of the viewmodule - corresponding JahiaTemplatesPackage instancedisplayName - the display name for this viewpublic int compareTo(View otherView)
compareTo in interface Comparable<View>public Properties getDefaultProperties()
ViewgetDefaultProperties in interface Viewpublic String getDisplayName()
getDisplayName in interface Viewpublic String getFileExtension()
getFileExtension in interface Viewpublic String getInfo()
Viewprotected abstract InputStream getInputStream(String resource) throws IOException
resource - the resource path to obtain input stream forIOException - in case of an I/O errorspublic JahiaTemplatesPackage getModule()
public String getModuleVersion()
getModuleVersion in interface Viewpublic Properties getProperties()
ViewgetProperties in interface Viewprotected abstract String getResourcePath(String resource)
null.resource - the resource to get the path fornullprotected Properties loadProperties(String path, String thumbnailPath)
public void setProperties(Properties properties)
public void setDefaultProperties(Properties defaultProperties)
Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.