Shortcuts Usage in the Action File
The advantage of using action file template is that you can use shortcuts to define the parameter names.
An example of command line using shortcuts is as follows:
java cfcc.CFAdmin U:xyz P:xyz KN:certificate KP:pswd a:addFile CFN:clientfile.txt SFN:serverfile.txt UID:user1 AuthGroupId:TransferRight TKN:cacerts TKP:changeit
You can change the shortcut names. The shortcut names defined in the XML template are the default shortcut names. In the above text, the CFN parameter is defined as the shortcut name for the ClientFileName parameter. You can change this value to any value that you want, as long as the value does not conflict with an existing parameter name or shortcut value. For example, you can use a text editor to change the value CFN to CN. Therefore, you can use the value CN in the command line to reference the ClientFileName parameter whenever you use that XML template file.
If the Global.xml file has been updated to contain the user ID, password, and keystore information, you can simply execute following command line.
java cfcc.CFAdmin a:addFile
For client certificate authentication, the client must specify the keystore for its certificate via the Java system parameter, or via the KN and KP parameters of command line. To run the program over an SSL connection, the certificate authority (CA) that signed the certificate of the client must be a trusted CA. This might require you to update your keystore.
Name | Description |
---|---|
U | The user ID sent to the web service for authentication to use the web service. This parameter might be specified in the Global.xml file. |
P | The user password sent to the web service for authentication to use the web service. This parameter might be specified in the Global.xml file. |
A | The action to take. For example, add file. If the parameter is specified, the program will ignore the T parameter that specifies the action file name. The program only accepts one action from command line. |
T | The action file name. The file can contain multiple actions in XML format. The program will execute all actions specified in the file. If the program specified the A parameter, this parameter will be ignored. |
TL | The trace level. This value only affects this utility. This parameter should only be set when instructed to do so by TIBCO technical support. The valid value rage is 0 to 10. |
TD | The trace directory. This value only affects this utility. Sets the directory where the trace files will be written. |
G | The global template file name. The default one is Global.xml in the current directory. |
S | The web service address. For example, https://ip:port/cfcc/….. |
KN | The Java keystore name for client certificate authentication. The keystore name can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. This parameter might be specified in the Global.xml file. |
KP | The Java keystore password for client certificate authentication. The keystore password can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. This parameter might be specified in the Global.xml file. |
TKN | The trusted Java keystore name for certificate authentication. This file should contain the name of the keystore file that contains the Java trusted certificate authorities. You can leave this parameter blank if you want to use the default trusted keystore. This parameter might be specified in the Global.xml file. |
TKP | The trusted Java keystore password for client certificate authentication. If the default password is used, you can leave this parameter blank. This parameter might be specified in the Global.xml file. |
help | The program will display the command line parameter list. |
help:action | The program will display the parameters needed for the action if the action is a valid action; otherwise, the program will display all currently supported actions. |
name:value | Other name:value pairs. These values will be used to assign the values of parameters if the action is specified by the A parameter, or to replace the default values if the T parameter is used. The name is case sensitive if name is a parameter name for an action. The name is not case sensitive if name is a shortcut for a real parameter name. |
In the following example, four entries are defined in the addFile.xml file.
<arg name="ClientFileName" value="clientFileName" sc="CFN" description="Client File Name"/> <arg name="ServerFileName" value="serverFileName" sc="SFN" description="Server File Name"/> <arg name="Description" value="fileDesc" sc="D" description="File Description"/> <arg name="UserId" value="user id" sc="UID" description="UserID authorized to transfer this file"/>
Sample Shortcuts Usage
The following examples show how to use standard parameters and shortcuts in the TIBCO MFT Command Center commands:
Using standard parameter names:
java cfcc.CFAdmin a:addFile ClientFileName:client.file1 ServerFileName:prod.file.name Description:”file upload” Userid:acctuser
Using shortcut parameter names:
java cfcc.CFAdmin t:addFile.xml CFN:client.file1 SFN:prod.file.name D:”file upload” uid:acctuser
As you can see, the parameter names are much shorter when using the shortcut parameters. The shortcut parameter names can only be used when the action file template (T:) parameter is used in the CFAdmin command. The shortcut values must be defined by the sc= value in the template.