The Command service
The Command service is based on Apache's commons-chain and allows to encapsulate methods to execute as a Command objects A Command framework Application can create own Catalog of Commands, configuring org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin as following:<component>
<key>org.exoplatform.services.command.impl.CommandService</key>
<type>org.exoplatform.services.command.impl.CommandService</type>
<component-plugins>
<component-plugin>
<name>config.catalog</name>
<set-method>addPlugin</set-method>
<type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
<init-params>
<value-param>
<name>config-file</name>
<value>conf/test-commands.xml</value>
</value-param>
</init-params>
</component-plugin>
</component-plugins>
</component><catalog> <command name="addNode" className="org.exoplatform.frameworks.jcr.command.core.AddNodeCommand"/> <command name="save" className="org.exoplatform.frameworks.jcr.command.core.SaveCommand"/> <command name="setProperty" className="org.exoplatform.frameworks.jcr.command.core.SetPropertyCommand"/> </catalog>
........
<type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
<init-params>
<value-param>
<name>config-file</name>
<value>conf/test-commands1.xml</value>
</value-param>
</init-params>
........<catalog> <command name="save" className="org.exoplatform.frameworks.jcr.command.core.SaveCommand"/> </catalog>
........
<type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
<init-params>
<value-param>
<name>config-file</name>
<value>conf/test-commands2.xml</value>
</value-param>
</init-params>
........<catalog> <command name="addNode" className="org.exoplatform.frameworks.jcr.command.core.AddNodeCommand"/> </catalog>
on 27/03/2008 at 15:15