Shortcuts Usage in the Action File
One of the advantages of using the action file template is that you can use shortcuts to define the parameter names. In order to use shortcuts, you must add the t:templatename.xml parameter to the command line. The template contains the action, so the action parameter is not required when using a template.
Below is an example command line using shortcuts:
java cfcc.CFAdmin t:AddFile.xml U:xyz P:xyz KN:certificate KP:pswd CFN:clientfile.txt SFN:serverfile.txt UID:user1 AuthGroupId:TransferRight TKN:cacerts TKP:changeit
The shortcut names can be changed by the user. 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. If you want, 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 could use a text editor to change the value CFN to CN. Therefore, you could use the value CN in the command line to reference the ClientFileName parameter whenever you used that XML template file.
If file Global.xml is updated to contain the user ID, password and keystore information, then you could simply execute:
java cfcc.CFAdmin a:addFile
Name | Description |
---|---|
U | The user ID sent to the web service for authentication to use the web service. May be specified in Global.xml. |
P | The user password sent to web service for authentication to use the web service. May be specified in Global.xml. |
A | The action to take. For example, add file. If the parameter is specified, the program ignores 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 executes all actions specified in the file. If the program specified A parameter, this parameter is 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 values supported for this parameter are as follows: |
TD | The trace directory. This value only affects this utility. Sets the directory where the trace files are 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. Keystore name can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. May be specified in Global.xml. |
KP | The Java keystore password for client certificate authentication. Keystore password can be specified as a Java parameter, in which case, it is not necessary to use this parameter again. May be specified in Global.xml. |
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. May be specified in Global.xml. |
TKP | The trusted Java keystore password for client certificate authentication. If the default password is used, you can leave this parameter blank. May be specified in Global.xml. |
help | The program displays the command line parameter list. |
help:action | The program displays the parameters needed for the action if the action is a valid action; Otherwise, display all currently supported actions. |
Name:value | Other name:value pairs. These values are used to assign the parameters’ value if the action is specified by A parameter, or to replace the default values if 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. |
Below are four entries 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"/>
As you can see, the parameter names are much shorter when using the shortcut parameters. Once again, note that 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.