Last modified: 13 March 2025
Command line tools
You can access these from a shell prompt by navigating to the Lib folder
pdrBatcher
Purpose
Wrapper to start the application service
Usage
No parameters
Example
pdrBatcher.bat
pdrBatcherTransformTest
Purpose
Used for testing tof transformation configurations
Usage
usage: AppPdrBatcherTransformTest
-ds,--data_source <arg> Translation specification
-i,--input <arg> The input file to process
-t,--translation <arg> Translation specification
Example 1: Modify column name in first line of a gas INT file and rename the file
pdrBatcherTransformTest.bat "REPLACE -find current_date -replace curr_date -to_line 1|RENAME -name DWGM_{name}.gascsv" int111_v5_sdpc_1~20210318131932.csv
Example 2: Transform a NEMCSV file to JSON
pdrBatcherTransformTest.bat NEMCSV_TO_JSON PUBLIC_DISPATCHIS_202008120505_0000000418405314_LEGACY.CSV
Please refer to pdrBatcher.properties for documentation of available file translation functions
Example
pdrBatcherTransformTest.bat NEMCSV_TO_JSON .\PUBLIC_DISPATCHIS_202209091330_0000000361385800.CSV
pdrConnectionTest
Purpose
Used to test the connectivity to FTP services defined in the properties configuration file
Usage
The properties file to use, default is pdrBatcher.properties
Example
pdrConnectionTest.bat
pdrKeyManager
Purpose
Used to manage the HMAC keys that secure the API services which are consumed by pdrMonitor
Usage
usage: AppHMACKeyManager
-c,--cycle Cycle the web server HMAC key
-s,--show Display the web server HMAC key
Example
pdrKeyManager.bat --show
pdrPasswordEncrypt
Purpose
Used to encrypt a plain text password prior to adding this to the pdrBatcher.properties file
Usage
The password to encrypt
Example
pdrPasswordEncrypt.bat mySecretPasswordToEncrypt
pdrServiceInstall
Purpose
Used to register and run the application as a windows service
Usage
The service name to use
May be required to run this script under elevated/administrator privileges
Example
pdrServiceInstall.bat pdrBatcher
pdrServiceUnInstall
Purpose
Used to uninstall the application windows service configuration
Usage
The service name to uninstall
The service name can be identified by the existance of a <service_name>.exe in the Lib folder.
May be required to run this script under elevated/administrator privileges
Example
pdrServiceUnInstall.bat pdrBatcher
pdrThreadExecute
Purpose
An example script that illustrates how to invoke a pdrBatcher thread that is configured to be executed on an API service call
Usage
usage: AppPdrBatcherAPIExecuteThread
-a,--api <arg> The aPI key to access the applications web services
-c,--configuration <arg> The properties configuration file
-h,--host <arg> The host on which the applications is running
-p,--port <arg> The port on which the applications web services are exposed
-t,--thread <arg> Thread ID to execute
Example
pdrThreadExecute.bat --thread 1
pdrCertificateManager
Purpose
Used to manage certiciates for providing or consuming secured API services
Not that many of the operations of this tool can also be performed by keytool which is shipped as part of the JRE
This tool simplifies the required ceetificate operations by providing integration into the AEMO application configurations
Usage
usage: au.com.aemo.Common.Certificate.AppCertificateManager
-al,--alias <arg> The alias of a certificate
-ap,--application <arg> The application name
-c,--client Client keystore
-ch,--chain <arg> Import certificate and add to chain in keystore
-cn,--configuration <arg> The properties configuration file
-cr,--create Create certificate and add to keystore
-d,--defaultconfiguration <arg> The default properties configuration file
-e,--export <arg> Export certificate to file
-i,--import <arg> Import certificate and add to keystore
-k,--keystore <arg> The keystore filename
-l,--list List certificates
-r,--remove <arg> Remove certificate from keystore
-rp,--reply <arg> Import CA reply from certificate signing request
-s,--server Web Server keystore
-sr,--certsignreq <arg> Create certificate signing request
-v,--validity <arg> The validity days
-x,--ext <arg> The X509 extension attributes
Examples
Create a self signed certificate to secure API services
pdrCertificateManager.bat --server --create --validity 365
List certificates being used to secure API services
pdrCertificateManager.bat --server --list
List certificates being used to consume external services, e.g. the certificate chain required to connect to AEMO API services
pdrCertificateManager.bat --client --list
Export public certificate to a file, e.g. for installing into a workstation which consumes pdrMonitor browser services or manually importing into pdrMonitor client truststore
pdrCertificateManager.bat --server --alias monitor_web_20240915 --export myPublicKey.pem