h1. Component configuration {anchor:id=CONTref.Configuration.Publication.ComponentConfiguration}

|| *Configuration name* || *Data type* || *Sample value* || *Description* ||
| *key* | {{String}} | {{org.exoplatform.services.wcm.publication.WCMPublicationService}} | Service class location. |
| *type* | {{String}} | {{org.exoplatform.services.wcm.publication.WCMPublicationServiceImpl}} | Service class's implementation location. |
| *component-plugins* | {{Object}} |N/A  | The plugins that are used inside the component. |
| *init-params* | {{Object}} |N/A | The initial parameter that will be used inside the component. |

h2. Component-plugin configuration {anchor:id=CONTref.Configuration.Publication.ComponentPluginConfiguration}
* *Description*:

|| *Configuration name* || *Data type* || *Sample value* || *Description* ||
| *name* | {{String}} | {{Simple publication}} | Name of component-plugin. |
| *set-method* | {{String}} | {{addPublicationPlugin}} | Set method to start using the plugin. |
| *type* | {{String}} | {{org.exoplatform.services.wcm.publication.lifecycle.simple.SimplePublicationPlugin}} | Class and location of plugin. |

h2. Init-params configuration {anchor:id=CONTref.Configuration.Publication.InitparamsConfigurations}

The parameter will be set in pair: name-value and will be placed inside the <value-param> object.
|| *Configuration name* || *Data type* || *Sample value* ||
| *name* | {{String}} | {{useCache}} |
| *value* | {{String}} | {{true}} |


Also, the parameter can be set in an object, with further information which will be the object's properties.
|| *Configuration name* || *Data type* || *Sample value* || *Description* ||
| *name* | {{String}} | {{cache.config.wcm.composer}} | The name of object. |
| *description* | {{String}} |N/A  |The brief description about the object. |
| *object* | {{Object}} |N/A  | This object will be passed to component as a parameter, this object includes fieldset properties. |

h1. external-component-plugins configuration {anchor:id=CONTref.Configuration.Publication.Externalcomponentpluginsconfiguration}

|| *Configuration name* || *Data type* || *Sample value* || *Description* ||
| *target-component* | {{String}} | {{org.exoplatform.services.wcm.core.WebSchemaConfigService<}} | External plugin's class location. |
| *component-plugin* | {{Object}} | N/A | Configuration of component that will be used as a plugin. |

h1. Example {anchor:id=CONTref.Configuration.Publication.Example}

h2. Component that use plugins example {anchor:id=CONTref.Configuration.Publication.ComponentUsePluginsExamples}
{code:xml}
<component>
    <key>org.exoplatform.services.wcm.publication.WCMPublicationService</key>
    <type>org.exoplatform.services.wcm.publication.WCMPublicationServiceImpl</type>
    <component-plugins>
      <component-plugin>
        <name>States and versions based publication</name>
        <set-method>addPublicationPlugin</set-method>
        <type>org.exoplatform.services.wcm.publication.lifecycle.stageversion.StageAndVersionPublicationPlugin</type>
        <description>This publication lifecycle publish a web content or DMS document to a portal page with more state and version.</description>
      </component-plugin>
      <component-plugin>
        <name>Simple publication</name>
        <set-method>addPublicationPlugin</set-method>
        <type>org.exoplatform.services.wcm.publication.lifecycle.simple.SimplePublicationPlugin</type>
        <description>This publication lifecycle publish a web content or DMS document to a portal page without version</description>
      </component-plugin>
    </component-plugins>
</component>
{code}

h2. Component with init-params example {anchor:id=CONTref.Configuration.Publication.ComponentInitparamExample}
{code:xml}
<component>
    <key>org.exoplatform.services.wcm.publication.WCMComposer</key>
    <type>org.exoplatform.services.wcm.publication.WCMComposerImpl</type>
    <init-params>
      <value-param>
        <name>useCache</name>
        <value>true</value>
      </value-param>
    </init-params>
</component>
{code}

h2. Sample configuration {anchor:id=CONTref.Configuration.Publication.Externalcomponentpluginsexample}
{code:xml}
<external-component-plugins>
    <target-component>org.exoplatform.services.cache.CacheService</target-component>
    <component-plugin>
      <name>addExoCacheConfig</name>
      <set-method>addExoCacheConfig</set-method>
      <type>org.exoplatform.services.cache.ExoCacheConfigPlugin</type>
      <description>Configures the cache for query service</description>
      <init-params>
        <object-param>
          <name>cache.config.wcm.composer</name>
          <description>The default cache configuration</description>
          <object type="org.exoplatform.services.cache.ExoCacheConfig">
            <field name="name">
              <string>wcm.composer</string>
            </field>
            <field name="maxSize">
              <int>300</int>
            </field>
            <field name="liveTime">
              <long>600</long>
            </field>
            <field name="distributed">
              <boolean>false</boolean>
            </field>
            <field name="implementation">
              <string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string>
            </field>
          </object>
        </object-param>
      </init-params>
    </component-plugin>
</external-component-plugins>
{code}
