Get-Properties
Command Reference
Description
Gets the properties.
Retrieves the configuration data for the Managed-Entity. This data is made accessible to your command execution context.
Access
Managed-Entity includes this base implementation for accessing and storing property data driven by the following two parameters.
- entity.properties.file: This property references the file where property data will be stored. By default it is stored as ${entity.instance.dir}/var/entity.properties.
- entity.properties.url: This property references a URL that can be used to retrieve the file.
The locations for either property above can be modified via the framework configuration file, ${antdepo.base}/etc/entity.properties.
For efficiency sake, this implementation uses a timestamp check to compare if the ${entity.properties.url} is newer than ${entity.properties.file}, and if so, will download a new copy.
Data Format
CTL uses Java properties as its own data format but you are not required to follow that convention. Since it is only your commands that load and interpret the data, you are free to choose alternative formats such as XML, YAML, CSV, etc.
If you do choose, another format, be sure to override the Properties command to provide a pretty format for it.
Usage
ctl -t Managed-Entity -o <objectname> -c Get-Properties [-destfile <>] [-force] [-noexpand] [-print]
Options
Option | Description | Type | Default |
---|---|---|---|
destfile |
file to save property data
If the property is unset, the data will be saved to the value of ${entity.properties.file}. |
string | ${entity.properties.file} |
force | Remove old properties file first | boolean | |
noexpand |
Do not expand the property values
Normally, the data is expanded to resolve any embeded property references. This is generally preferable but can be avoided if -noexpand flag is used. |
boolean | |
flag specifying Properties command should run after properties are saved | boolean |