<?xml version="1.0" encoding="ISO-8859-1"?>
<!--

    Copyright (C) 2009 eXo Platform SAS.
    
    This is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as
    published by the Free Software Foundation; either version 2.1 of
    the License, or (at your option) any later version.
    
    This software is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    Lesser General Public License for more details.
    
    You should have received a copy of the GNU Lesser General Public
    License along with this software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->

<configuration
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
   xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">

  <component>
    <key>org.exoplatform.services.cms.templates.TemplateService</key>
    <type>org.exoplatform.services.cms.templates.impl.TemplateServiceImpl</type>
  </component>

  <external-component-plugins>
    <target-component>org.exoplatform.services.cms.templates.TemplateService</target-component>
    <component-plugin>
      <name>FilterContentTypeForWCMSpecificFolder</name>
      <set-method>addContentTypeFilterPlugin</set-method>
      <type>org.exoplatform.services.cms.templates.ContentTypeFilterPlugin</type>
      <description>this plugin is used to filter wcm nodetype</description>
      <init-params>
        <object-param>
          <name>cssFolderFilter</name>
          <description>only exo:cssFile can be created in exo:cssFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:cssFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:cssFile</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
        <object-param>
          <name>jsFolderFolderFilter</name>
          <description>only exo:cssFile can be created in exo:cssFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:jsFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:jsFile</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
        <object-param>
          <name>webFolderFilter</name>
          <description>only exo:webContent can be created in exo:webFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:webFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:pictureOnHeadWebcontent</string>
                </value>
                <value>
                  <string>exo:webContent</string>
                </value>
                <!-- value><string>exo:twoColumnsWebcontent</string></value -->
              </collection>
            </field>
          </object>
        </object-param>
        <object-param>
          <name>webLinkFolderFilter</name>
          <description>only exo:webContent can be created in exo:webFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:linkFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:link</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>addTemplates</name>
      <set-method>addTemplates</set-method>
      <type>org.exoplatform.services.cms.templates.impl.TemplatePlugin</type>
      <init-params>
        <value-param>
          <name>autoCreateInNewRepository</name>
          <value>true</value>
        </value-param>
        <value-param>
          <name>storedLocation</name>
          <value>war:/conf/wcm-artifacts/nodetype-templates</value>
        </value-param>
        <object-param>
          <name>template.configuration</name>
          <description>configuration for the localtion of nodetypes templates to inject in jcr</description>
          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig">
            <field name="nodeTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:htmlFile</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>HTML File</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/htmlFile/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/htmlFile/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:cssFile</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>CSS File</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/cssFile/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/cssFile/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:jsFile</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>JS File</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/jsFile/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/jsFile/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <!-- Only webdesigner profile can edit this content -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:siteSearchBox</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Site search box webcontent</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteSearchBoxWebContent/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteSearchBoxWebContent/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:pictureOnHeadWebcontent</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Picture on head layout webcontent</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/pictureOnHeadWebContent/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/pictureOnHeadWebContent/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <!--
                  value> <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType"> <field name="nodetypeName"><string>exo:twoColumnsWebcontent</string></field> <field name="documentTemplate"><boolean>true</boolean></field> <field name="label"><string>Two columns layout webcontent</string></field> <field name="referencedView"> <collection type="java.util.ArrayList"> <value> <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template"> <field name="templateFile"><string>/twoColumnsWebContent/views/view1.gtmpl</string></field> <field name="roles"><string>*</string></field> </object> </value> </collection> </field> <field name="referencedDialog"> <collection type="java.util.ArrayList"> <value> <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template"> <field name="templateFile"><string>/twoColumnsWebContent/dialogs/dialog1.gtmpl</string></field> <field name="roles"><string>*:/platform/administrators</string></field>
                  </object> </value> </collection> </field> </object> </value
                -->

                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:webContent</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Free layout webcontent</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/webContent/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/webContent/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>


                <!-- Only webdesigner profile can edit this content -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:siteNavigationWebContent</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Site Navigation</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteNavigationWebContent/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteNavigationWebContent/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <!-- Only webdesigner profile can edit this content -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:siteBreadcrumb</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Site Breadcrumb</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteBreadcrumbWebContent/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/siteBreadcrumbWebContent/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>webdesigner:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <!-- All contributors profiles can edit this content -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:link</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Web Link</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/webLink/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/webLink/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

                <!-- >value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:template</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Template</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/template/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/administrators</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/template/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/administrators</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value-->

                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:contact_us</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Contact Us</string>
                    </field>
                    <field name="referencedView">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/contactUs/views/view1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                    <field name="referencedDialog">
                      <collection type="java.util.ArrayList">
                        <value>
                          <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                            <field name="templateFile">
                              <string>/contactUs/dialogs/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>

              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>

</configuration>
