Nuxeo 5

Nuxeo 5 Component
org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent

Individual Documentation Coverage

done proportion
100.0 %


The CommandLineExecutor component let you define command line call using the command extension point.
You can call those commands with your own arguments like blobs or properties. The result is available
in the ExecResult object.



Author: Thierry Delprat ([email protected])

Version: missing

Location: nuxeo-services/nuxeo-platform-commandline-executor/src/main/resources/OSGI-INF/commandline-framework.xml

Require

No requirements

Required by

Not required

Implementation


Extension Points:

environment


Extension point to contribute environment configuration.
Currently not used by commandLine service. Living example can be found in tilling services.

Available options are:
- workingDirectory: the Folder when command should be executed. Default is the system
temporary folder.

- parameters/parameter


Author: Thierry Delprat ([email protected])

command


Extension point to contribute new commands.

Available options are:
- name: string attribute used as the command identifier.

- enabled: boolean attribute, command is unavailable if false.

- commandLine: the command to execute.

- parameterString: the parameters to pass to the command. Parameters like #{parameter}
represents a file. So you can use either a path to a file or a blob. Parameters like %parameters
are literals.

- winParameterString: Same as above but used in windows environments. For instance you have to use
double quotes in windows instead of simple quote.

- winCommand: command to execute specifically for windows. Use commandLine is WinCommand is null;

- tester: name of the CommandTester. The CommandTester defined in commandTester extension point.
Default is SystemPathExistTester, which look if the command is available in system Path.

- readOutput: Boolean, default is true. If false, command output is never read.

- installationDirective: a String that is returned instead of the usual output when
the command isn't available.

CommandLine contribution example:

            <command enabled="true" name="myCommand">
              <commandLine>commandName</commandLine>
              <parameterString> -any -parameters '%specific' %parameters #{blobOrPath}</parameterString>
              <winParameterString> -any -parameters "%specific" %parameters " #{blobOrPath}</winParameterString>
              <installationDirective>You need to install commandName.</installationDirective>
            </command>




Author: Thierry Delprat ([email protected])

commandTester


Extension point to contribute new command testers.
It's a class that provides a way to test if a command is installed on the target server OS.

Available options are:
-name: the name of the commandTester.

-class: the class implementing CommandTester interface.

Command tester contribution example:

      <commandTester class="org.nuxeo.ecm.platform.commandline.executor.service.cmdtesters.SystemPathExistTester" name="SystemPathTester">
      </commandTester>




Author: Thierry Delprat ([email protected])


Has contribution from:

Last generation: 18:17:20 CEST 25/08/2009