You are looking at documentation for an older release. Not what you want? See the current release documentation.
This plugin is used to inject content at the server startup.
Being considered as a substitute for the deprecated XMLDeploymentPlugin
,
it is better because it allows both injection and publication to be done at once.
In configuration, plug it to the following target component:
<target-component>org.exoplatform.services.deployment.WCMContentInitializerService</target-component>
Sample configuration:
<external-component-plugins>
<target-component>org.exoplatform.services.deployment.WCMContentInitializerService</target-component>
<component-plugin>
<name>Content Initializer Service</name>
<set-method>addPlugin</set-method>
<type>org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentPlugin</type>
<description>WCM Plublication Deployment Plugin</description>
<init-params>
<value-param>
<name>override</name>
<description>The flag parameter to decide if portal metadata is overriden on restarting server</description>
<value>${acme.portalConfig.metadata.override:false}</value>
</value-param>
<object-param>
<name>ACME French translations directory</name>
<description>Deployment Descriptor</description>
<object type="org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentDescriptor">
<field name="target">
<object type="org.exoplatform.services.deployment.DeploymentDescriptor$Target">
<field name="workspace"><string>collaboration</string></field>
<field name="nodePath"><string>/sites/acme/web contents/site artifacts</string></field>
</object>
</field>
<field name="sourcePath">
<string>war:/conf/acme-portal/wcm/artifacts/site-resources/acme/FrenchTranslations.xml</string>
</field>
<field name="cleanupPublicationType">
<string>publish-first-publication</string>
</field>
</object>
</object-param>
</init-params>
</component-plugin>
</external-component-plugins>
In which:
set-method: addPlugin
type: org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentPlugin
Param name | Type | Value | Description |
---|---|---|---|
override | boolean | true or false |
|
Object type: org.exoplatform.services.wcm.extensions.deployment.WCMPublicationDeploymentDescriptor
Field | Type | Value | Description |
---|---|---|---|
target | Object | org.exoplatform.services.deployment.DeploymentDescriptor$Target | The target node to import. |
sourcePath | String | war:/conf/acme-portal/wcm/artifacts/site-resources/acme/FrenchTranslations.xml | The xml descriptor file of the imported data. |
cleanupPublicationType | String | publish-first-publication (see all the options in Description column) |
|
Object type: org.exoplatform.services.deployment.DeploymentDescriptor$Target
Field | Type | Value | Description |
---|---|---|---|
workspace | String | collaboration | The target workspace to import. |
nodePath | String | /sites/acme/web contents/site artifacts | The target node to import. |