public interface TemplateService
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DIALOG |
static String |
DEFAULT_DIALOGS_PATH |
static String |
DEFAULT_SKIN |
static String |
DEFAULT_VIEW |
static String |
DEFAULT_VIEWS_PATH |
static String |
DIALOGS |
static String |
DOCUMENT_TEMPLATE_PROP |
static String |
LTR |
static String |
NT_UNSTRUCTURED |
static String |
RTL |
static String |
SKINS |
static String |
TEMPLATE_LABEL |
static String[] |
UNDELETABLE_TEMPLATES |
static String |
VIEWS |
| Modifier and Type | Method and Description |
|---|---|
void |
addContentTypeFilterPlugin(ContentTypeFilterPlugin filterPlugin)
This method is used to filter types of NodeType which is added in folder.
|
String |
addTemplate(String templateType,
String nodeTypeName,
String label,
boolean isDocumentTemplate,
String templateName,
String[] roles,
InputStream templateFile)
Insert a new template into NodeType by giving the following parameters.
|
String |
addTemplate(String templateType,
String nodeTypeName,
String label,
boolean isDocumentTemplate,
String templateName,
String[] roles,
InputStream templateFile,
javax.jcr.Node templatesHome)
Insert a new template into NodeType by giving the following parameters.
|
String |
buildDialogForm(String nodeTypeName)
Build string of dialog form template base on properties of nodetype.
|
String |
buildStyleSheet(String nodeTypeName)
Build string of view template form base on properties of nodetype.
|
String |
buildViewForm(String nodeTypeName)
Build string of view template form base on properties of nodetype.
|
String |
createTemplate(javax.jcr.Node templateFolder,
String name,
InputStream data,
String[] roles)
Deprecated.
|
String |
createTemplate(javax.jcr.Node templateFolder,
String title,
String templateName,
InputStream data,
String[] roles)
Insert a template into JCR database as an nt:file node.
|
Set<String> |
getAllConfiguredNodeTypes()
gets all node types configured
|
List<String> |
getAllDocumentNodeTypes()
Get All Document NodeTypes of the current repository.
|
Set<String> |
getAllEditedConfiguredNodeTypes()
Gets all node types configured whose templates were edited.
|
Set<String> |
getAllowanceFolderType()
Get set of folder type.
|
javax.jcr.NodeIterator |
getAllTemplatesOfNodeType(boolean isDialog,
String nodeTypeName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Return all teamplate of the specified NodeType.
|
List<String> |
getCreationableContentTypes(javax.jcr.Node node)
Return CreationableContent Types to the given node.
|
String |
getDefaultTemplatePath(boolean isDialog,
String nodeTypeName)
Return path of default template by giving the following parameters.
|
List<String> |
getDocumentTemplates()
Get all templates is document type of the specified repository.
|
String |
getSkinPath(String nodeTypeName,
String skinName,
String locale)
Get path of css file which included in view template.
|
String |
getTemplate(javax.jcr.Node template)
Get a template from JCR database.
|
String |
getTemplate(String templateType,
String nodeTypeName,
String templateName)
Return template file of the specified node.
|
String |
getTemplateLabel(String nodeTypeName)
Return the label of the specified template by giving the following parameters.
|
javax.jcr.Node |
getTemplateNode(String templateType,
String nodeTypeName,
String templateName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Return template Node (Name of NodeType, Name of Template) by giving the following parameters.
|
String |
getTemplatePath(boolean isDialog,
String nodeTypeName,
String templateName)
Return path template of the specified node.
|
String |
getTemplatePath(javax.jcr.Node node,
boolean isDialog)
Return path template of the specified node.
|
String |
getTemplatePathByAnonymous(boolean isDialog,
String nodeTypeName)
Return the path public template.
|
String |
getTemplatePathByUser(boolean isDialog,
String nodeTypeName,
String userName)
Return the template by user.
|
String |
getTemplateRoles(javax.jcr.Node template)
Get roles from a template.
|
javax.jcr.Node |
getTemplatesHome(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Return template home of current repository.
|
void |
init()
Get all template that is configured in XML file of current repository.
|
boolean |
isManagedNodeType(String nodeTypeName)
Return true if the given repository has document type named 'nodeTypeName'.
|
void |
removeAllTemplateCached()
Remove all templates cached.
|
void |
removeCacheTemplate(String templatePath)
Remove cache of template.
|
void |
removeManagedNodeType(String nodeTypeName)
Removes the NodeType by giving the name of NodeType.
|
void |
removeTemplate(String templateType,
String nodeTypeName,
String templateName)
Remove a template of NodeType by giving the following parameters.
|
String |
updateTemplate(javax.jcr.Node template,
InputStream data,
String[] roles)
Update a template inside JCR database.
|
static final String DIALOGS
static final String VIEWS
static final String SKINS
static final String DEFAULT_DIALOG
static final String DEFAULT_VIEW
static final String DEFAULT_SKIN
static final String[] UNDELETABLE_TEMPLATES
static final String DEFAULT_DIALOGS_PATH
static final String DEFAULT_VIEWS_PATH
static final String NT_UNSTRUCTURED
static final String DOCUMENT_TEMPLATE_PROP
static final String TEMPLATE_LABEL
static final String RTL
static final String LTR
String getDefaultTemplatePath(boolean isDialog, String nodeTypeName)
isDialog - boolean
The boolean value which specify the type of templatenodeTypeName - String
The name of NodeTypejavax.jcr.Node getTemplatesHome(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
throws Exception
provider - SessionProvider
The SessionProvider object is used to managed SessionsExceptionNodeString getTemplatePath(javax.jcr.Node node, boolean isDialog) throws Exception
node - Node
The specified nodeisDialog - boolean
The boolean value which specify the type of templateExceptionNodeString getTemplatePathByAnonymous(boolean isDialog, String nodeTypeName) throws Exception
isDialog - boolean
The boolean value which specify the type of templatenodeTypeName - String
The specify name of node typeExceptionString getTemplatePathByUser(boolean isDialog, String nodeTypeName, String userName) throws javax.jcr.RepositoryException
isDialog - boolean
The boolean value which specify the type of templatenodeTypeName - String
The specify name of node typeuserName - String
The current userjavax.jcr.RepositoryExceptionNode,
SessionString getTemplatePath(boolean isDialog, String nodeTypeName, String templateName) throws Exception
isDialog - boolean
The boolean value which specify the type of templatenodeTypeName - String
The specify name of node typetemplateName - String
The name of templateExceptionSession,
NodeString getTemplate(String templateType, String nodeTypeName, String templateName) throws Exception
templateType - String
The string value which specify the type of templatenodeTypeName - String
The specify name of node typetemplateName - String
The name of templateExceptionSession,
NodeString addTemplate(String templateType, String nodeTypeName, String label, boolean isDocumentTemplate, String templateName, String[] roles, InputStream templateFile) throws Exception
templateType - The value which specify the type of templatenodeTypeName - The specify name of NodTypelabel - The label of the specified templateisDocumentTemplate - The boolean value which yes or no is DocumentTemplatetemplateName - The name of templateroles - The roles of templatetemplateFile - The file of templateExceptionSession,
NodeString addTemplate(String templateType, String nodeTypeName, String label, boolean isDocumentTemplate, String templateName, String[] roles, InputStream templateFile, javax.jcr.Node templatesHome) throws Exception
templateType - The value which specify the type of templatenodeTypeName - The specify name of NodTypelabel - The label of the specified templateisDocumentTemplate - The boolean value which yes or no is DocumentTemplatetemplateName - The name of templateroles - The roles of templatetemplateFile - The file of templatetemplatesHome - NodeExceptionSession,
Nodevoid addContentTypeFilterPlugin(ContentTypeFilterPlugin filterPlugin) throws Exception
filterPlugin - Content filer pluginExceptionvoid removeTemplate(String templateType, String nodeTypeName, String templateName) throws Exception
templateType - String
The value which specify the type of templatenodeTypeName - String
The specify name of NodTypetemplateName - String
The name of templateExceptionSession,
Nodeboolean isManagedNodeType(String nodeTypeName) throws javax.jcr.RepositoryException
nodeTypeName - String
The name of NodeTypejavax.jcr.RepositoryExceptionSessionProvider,
Session,
NodeList<String> getDocumentTemplates() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionSession,
Nodejavax.jcr.NodeIterator getAllTemplatesOfNodeType(boolean isDialog,
String nodeTypeName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
throws Exception
isDialog - boolean The boolean value which specify the type of
templatenodeTypeName - String The name of NodeTypeprovider - SessionProvider The SessionProvider object is used to
managed SessionsExceptionSessionProvider,
Nodevoid removeManagedNodeType(String nodeTypeName) throws Exception
nodeTypeName - String
The name of NodeTypeExceptionSession,
NodeString getTemplateLabel(String nodeTypeName) throws Exception
nodeTypeName - String
The specified name of NodeTypeExceptionSessionProvider,
Nodejavax.jcr.Node getTemplateNode(String templateType, String nodeTypeName, String templateName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
templateType - String
The value which specify the type of templatenodeTypeName - String
The name of NodeTypetemplateName - String
The name of templateprovider - SessionProvider
The SessionProvider object is used to managed SessionsExceptionSessionProvider,
NodeList<String> getCreationableContentTypes(javax.jcr.Node node) throws Exception
node - The specified nodeExceptionNodevoid init() throws Exception
ExceptionTemplatePluginvoid removeAllTemplateCached()
void removeCacheTemplate(String templatePath) throws Exception
templatePath - String
jcr path of templateExceptionList<String> getAllDocumentNodeTypes() throws javax.jcr.PathNotFoundException, javax.jcr.RepositoryException
javax.jcr.PathNotFoundExceptionjavax.jcr.RepositoryExceptionString getSkinPath(String nodeTypeName, String skinName, String locale) throws Exception
nodeTypeName - String
The node type nameskinName - String
The name of css filelocale - String
The locale which specified by userExceptionString buildDialogForm(String nodeTypeName) throws Exception
nodeTypeName - ExceptionString buildViewForm(String nodeTypeName) throws Exception
nodeTypeName - ExceptionString buildStyleSheet(String nodeTypeName) throws Exception
nodeTypeName - Exception@Deprecated String createTemplate(javax.jcr.Node templateFolder, String name, InputStream data, String[] roles)
templateFolder - The parent node which contains the template nodename - The template's namedata - The template's dataroles - The template's rolesString createTemplate(javax.jcr.Node templateFolder, String title, String templateName, InputStream data, String[] roles)
templateFolder - The parent node which contains the template nodetitle - The template titletemplateName - The template's namedata - The template's dataroles - The template's rolesString updateTemplate(javax.jcr.Node template, InputStream data, String[] roles)
template - The template nodedata - The template's dataroles - The template's rolesString getTemplate(javax.jcr.Node template)
template - The template nodeString getTemplateRoles(javax.jcr.Node template)
template - The template nodeSet<String> getAllConfiguredNodeTypes()
Copyright © 2003–2019 eXo Platform SAS. All rights reserved.