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

<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">

  <external-component-plugins>
    <target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
    <component-plugin>
      <name>add.nodeType</name>
      <set-method>addPlugin</set-method>
      <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
      <priority>100</priority>
      <init-params>
        <values-param>
          <name>autoCreatedInNewRepository</name>
          <description>Node types configuration file</description>
          <value>war:/conf/globex/content/nodetypes/globex-nodetypes.xml</value>
        </values-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
  <external-component-plugins>
    <target-component>org.exoplatform.services.cms.templates.TemplateService</target-component>
    <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/globex/content/nodetypes/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">

                <!-- feature -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:feature</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Feature</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>/feature/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>/feature/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>
                <!-- video -->
                <value>
                  <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                    <field name="nodetypeName">
                      <string>exo:embeddedVideo</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Video</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>/video/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>/video/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:contactUs2Horizontal</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Contact Us 2 Horizontal</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/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/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:subscribe</string>
                    </field>
                    <field name="documentTemplate">
                      <boolean>true</boolean>
                    </field>
                    <field name="label">
                      <string>Subscribe</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>/subscribe/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>/subscribe/dialog1.gtmpl</string>
                            </field>
                            <field name="roles">
                              <string>*:/platform/web-contributors</string>
                            </field>
                          </object>
                        </value>
                      </collection>
                    </field>
                  </object>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
    <component-plugin>
      <name>FilterContentTypeForGlobex</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>questionsFolderFilterGlobex</name>
          <description>only exo:webContent can be created in exo:questionsFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:questionsFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:webContent</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
        <object-param>
          <name>featuresFolderFilterGlobex</name>
          <description>only exo:webContent can be created in exo:featuresFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:featuresFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:feature</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
        <object-param>
          <name>servicesFolderFilterGlobex</name>
          <description>only exo:webContent can be created in exo:servicesFolder</description>
          <object type="org.exoplatform.services.cms.templates.ContentTypeFilterPlugin$FolderFilterConfig">
            <field name="folderType">
              <string>exo:servicesFolder</string>
            </field>
            <field name="contentTypes">
              <collection type="java.util.ArrayList">
                <value>
                  <string>exo:services</string>
                </value>
              </collection>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
  </external-component-plugins>
  
</configuration>