This class is is used to manage templates for ecm-based products.

Package org.exoplatform.services.cms.templates.TemplateService;

|| *Method* || *Return* || *Prototype* || *Description* |
| getDefaultTemplatePath | String | getDefaultTemplatePath(boolean isDialog, String nodeTypeName) {example}{example} throws Exception ; | Return path of default template by giving the following params{example}{example}@param isDialog        boolean    The boolean value which specify the type of template                {example}{example}@param nodeTypeName    String   The name of NodeType|
| getTemplatesHome | Node | getTemplatesHome(String repository,SessionProvider provider) {example}{example} throws Exception ; | Return template home of repository{example}{example}@param repository      String   The name of repository              {example}{example}@param provider        SessionProvider   The SessionProvider object is used to managed Sessions{example}{example}@see                   Node{example}{example}@throws Exception the exception|
| getTemplatePath | String | getTemplatePath(Node node, boolean isDialog) {example}{example} throws Exception ; | Return path template of the specified node{example}{example}@param node            Node   The specified node{example}{example}@param isDialog        boolean   The boolean value which specify the type of template{example}{example}@see                   Node{example}{example}@throws Exception the exception|
| getTemplatePathByAnonymous | String | getTemplatePathByAnonymous(boolean isDialog, String nodeTypeName, String repository) {example}{example} throws Exception; | Return the path public template{example}{example}@param isDialog        boolean  The boolean value which specify the type of template{example}{example}@param nodeTypeName    String   The specify name of node type{example}{example}@param repository      String  The name of repository {example}{example}@throws Exception the exception |
| getTemplatePathByUser | String | getTemplatePathByUser(boolean isDialog, String nodeTypeName, String userName, String repository) {example}{example} throws Exception; | Return path template of the specified node{example}{example}@param isDialog        boolean  The boolean value which specify the type of template{example}{example}@param nodeTypeName    String   The specify name of node type{example}{example}@param templateName    String    The name of template{example}{example}@param repository      String  The name of repository{example}{example}@see                   Session{example}{example}@see                   Node {example}{example}@throws Exception the exception |
| getTemplatePath | String | getTemplatePath(boolean isDialog, String nodeTypeName, String templateName, String repository){example}{example} throws Exception ; | Return template file of the specified node{example}{example}@param templateType    String{example}{example}The string value which specify the type of template{example}{example}@param nodeTypeName    String   The specify name of node type{example}{example}@param templateName    String   The name of template{example}{example}@param repository      String   The name of repository{example}{example}@see                   Session{example}{example}@see                   Node   {example}{example}@throws Exception the exception |
| addContentTypeFilterPlugin | void | addContentTypeFilterPlugin(ContentTypeFilterPlugin filterPlugin){example}{example} throws Exception ; | This method is used to filter types of NodeType which is added in folder. {example}{example}@param filterPlugin      Content filer plugin{example}{example}@throws Exception the exception |
| getAllowanceFolderType | Set<String> | getAllowanceFolderType(String repository){example}{example} throws Exception ; | Get set of folder type{example}{example}@param repository{example}{example}@throws Exception the exception |
| removeTemplate | void | removeTemplate(String templateType, String nodeTypeName, String templateName, String repository){example}{example} throws Exception ; | Remove a template of NodeType by giving the following params{example}{example}@param templateType      String    The value which specify the type of template{example}{example}@param nodeTypeName      String   The specify name of NodType{example}{example}@param templateName      String   The name of template{example}{example}@param repository        String  The name of repository{example}{example}@see                     Session{example}{example}@see                     Node                                 {example}{example}@throws Exception the exception |
| isManagedNodeType | boolean | isManagedNodeType(String nodeTypeName, String repository){example}{example} throws Exception ; | Return true if the given repository has document type named nodeTypeName {example}{example}@param nodeTypeName    String  The name of NodeType{example}{example}@param repository      String  The name of repository{example}{example}@see                   SessionProvider{example}{example}@see                   Session{example}{example}@see                   Node     {example}{example}@throws Exception the exception |
| getDocumentTemplates | List<String> | getDocumentTemplates(String repository){example}{example} throws Exception ; |Get all templates is document type of the specified repository  {example}{example}@param repository      String          The name of repository{example}{example}@see                   Session{example}{example}@see                   Node {example}{example}@throws Exception the exception |
| getAllTemplatesOfNodeType | NodeIterator | getAllTemplatesOfNodeType(boolean isDialog, String nodeTypeName, String repository,SessionProvider provider){example}{example} throws Exception ; | Return all teamplate of the specified NodeType{example}{example}@param isDialog        boolean     The boolean value which specify the type of template{example}{example}@param nodeTypeName    String  The name of NodeType{example}{example}@param repository      String  The name of repository{example}{example}@param provider        SessionProvider  The SessionProvider object is used to managed Sessions{example}{example}@see                   SessionProvider{example}{example}@see                   Node    {example}{example}@throws Exception the exception |
| removeManagedNodeType | void | removeManagedNodeType(String nodeTypeName, String repository){example}{example} throws Exception ; | Removes the NodeType by giving the name of NodeType{example}{example}@param nodeTypeName    String  The name of NodeType           {example}{example}@param repository      String  The name of repository{example}{example}@see                   Session{example}{example}   @see                   Node                        {example}{example}@throws Exception the exception |
| getTemplateLabel | String | getTemplateLabel(String nodeTypeName, String repository){example}{example} throws Exception ; | Return the label of the specified template by giving the following params{example}{example}@param nodeTypeName    String  The specified name of NodeType{example}{example}@param repository      String  The name of repository{example}{example}@see                   SessionProvider{example}{example}@see                   Node                        {example}{example}@throws Exception the exception |
| getTemplateNode | Node | getTemplateNode(String templateType, String nodeTypeName, String templateName, String repository, SessionProvider provider){example}{example} throws Exception ; | Return template Node (Name of NodeType, Name of Template) by giving the following params {example}{example}@param templateType    String       The value which specify the type of template{example}{example}@param nodeTypeName    String  The name of NodeType{example}{example}@param templateName    String  The name of teamplate{example}{example}@param repository      String  The name of repository{example}{example}@param provider        SessionProvider  The SessionProvider object is used to managed Sessions{example}{example} @see                   SessionProvider{example}{example}@see                   Node                              {example}{example}@throws Exception the exception |
| getCreationableContentTypes | List<String> | getCreationableContentTypes(Node node){example}{example} throws Exception ; | Return CreationableContent Types to the given node{example}{example}@param node          The specified nod{example}{example}@see                 Node              {example}{example}@throws Exception the exception |
| init | void | init(String repository){example}{example} throws Exception ; | Get all template that is configed in XML file of specified repository {example}{example}@param repository      String{example}{example}The name of repository{example}{example}@see                   TemplatePlugin                       {example}{example}@throws Exception the exception |
| removeAllTemplateCached | void | removeAllTemplateCached(){example}{example} throws Exception ; | Remove all templates cached|
| removeCacheTemplate | void | removeCacheTemplate(String templatePath){example}{example} throws Exception ; | Remove cache of template{example}{example}@param templatePath String jcr path of template{example}{example}@throws Exception{example}{example}@throws Exception the exception |
| getAllDocumentNodeTypes | List<String> | getAllDocumentNodeTypes(String repository){example}{example} throws Exception ; | Get path of css file which included in view template{example}{example}@param nodeTypeName  String The node type name{example}{example}@param skinName      String The name of css file{example}{example}@param locale        String The locale which specified by user{example}{example}@param repository    String The name of current repository{example}{example}@return  String      The path of css file{example}{example}@throws Exception the exception |
| getSkinPath | String | getSkinPath(String nodeTypeName, String skinName, String locale, String repository){example}{example} throws Exception ; |     Build string of dialog form template base on properties of nodetype{example}{example}@param nodeType{example}{example} @return {example}{example} @throws Exception the exception |
| buildDialogForm | String | buildDialogForm(String nodeTypeName, String repository){example}{example} throws Exception ; |    Build string of dialog form template base on properties of nodetype{example}{example}@param nodeType{example}{example}@return the String value{example}{example}@throws Exception the exception |
| buildViewForm | String | buildViewForm(String nodeTypeName, String repository){example}{example} throws Exception ; | Build string of view template form base on properties of nodetype{example}{example}@param nodeType{example}{example}@return{example}{example} @throws Exception the exception |
| buildStyleSheet | String | buildStyleSheet(String nodeTypeName, String repository){example}{example} throws Exception ; | Build string of view template form base on properties of nodetype{example}{example}@param nodeType{example}{example}@return the String value{example}{example}@throws Exception the exception |
| addTemplate | String | addTemplate(String templateType, String nodeTypeName, String label, boolean isDocumentTemplate, String templateName, String \[\] roles, InputStream templateFile, String repository){example}{example} throws Exception ; |Insert a new template into NodeType by giving the following params{example}{example}@param templateType        The value which specify the type of template{example}{example}@param nodeTypeName        The specify name of NodType{example}{example}@param label               The label of the specified template{example}{example}@param isDocumentTemplate  The boolean value which yes or no is DocumentTemplate{example}{example}@param templateName        The name of templat{example}{example}@param roles               The roles of template{example}{example}@param templateFile        The file of template{example}{example}@param repository          The name of repository{example}{example}@see                       Session{example}{example}@see                       Node                            {example}{example}@throws Exception the exception |
| addTemplate | String | addTemplate(String templateType, String nodeTypeName, String label, boolean isDocumentTemplate, String templateName, String \[\] roles, InputStream templateFile, String repository, Node templatesHome){example}{example}throws Exception ; | Insert a new template into NodeType by giving the following params{example}{example}@param templateType        The value which specify the type of template{example}{example}@param nodeTypeName        The specify name of NodType{example}{example}@param label               The label of the specified template{example}{example}@param isDocumentTemplate  The boolean value which yes or no is DocumentTemplate{example}{example}@param templateName        The name of template{example}{example}@param roles               The roles of template{example}{example}@param templateFile        The file of template{example}{example}@param repository          The name of repository{example}{example}@param templatesHome       Node{example}{example}@see                       Session{example}{example}@see                       Node                            {example}{example}@throws Exception the exception |
| createTemplate | String | createTemplate(Node templateFolder, String name, InputStream data, String \[\] roles){example}{example} throws Exception ; | Insert a template into JCR database as an nt:file node. This method should be used for all the template types.{example}{example}@param templateFolder The parent node which contains the template node{example}{example}@param name The template s name{example}{example}@param data The template s data{example}{example}@param roles. The templates roles|
| updateTemplate | String | updateTemplate(Node template, InputStream data, String \[\] roles){example}{example} | Update a template inside JCR database. This method should be used for all the template types.{example}{example}@param template.The template node{example}{example}@param data The templates data{example}{example}@param roles The templates roles|
| getTemplate | String | getTemplate(Node template) | Get a template from JCR database. This method should be used for all the template types.{example}{example}@param template The template node{example}{example}@throws Exception the exception |
| getTemplateRoles | String | getTemplateRoles(Node template)| Get roles from a template. This method should be used for all the template types.{example}{example}@param template The template node|
