@Component
public class ConfigCommands
extends java.lang.Object
implements org.springframework.shell.core.CommandMarker, org.springframework.beans.factory.InitializingBean
Configuration
object.Constructor and Description |
---|
ConfigCommands() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Initialize the default
Target for the XD Admin Server. |
java.lang.String |
info() |
java.lang.String |
listTimeZones()
Retrieve a list of available
TimeZone Ids via a Spring XD Shell command. |
java.lang.String |
setTimeZone(java.lang.String timeZoneId)
Allows for setting the
TimeZone via a Spring XD Shell command. |
java.lang.String |
target(java.lang.String targetUriString,
java.lang.String targetUsername,
java.lang.String targetPassword) |
@CliCommand(value="admin config server", help="Configure the XD admin server to use") public java.lang.String target(@CliOption(mandatory=false,key={"","uri"},help="the location of the XD Admin REST endpoint",unspecifiedDefaultValue="http://localhost:9393/") java.lang.String targetUriString, @CliOption(mandatory=false,key="username",help="the username for authenticated access to the Admin REST endpoint",unspecifiedDefaultValue="") java.lang.String targetUsername, @CliOption(mandatory=false,key="password",help="the password for authenticated access to the Admin REST endpoint (valid only with a username)",specifiedDefaultValue="",unspecifiedDefaultValue="__NULL__") java.lang.String targetPassword)
@CliCommand(value="admin config info", help="Show the XD admin server being used") public java.lang.String info()
@CliCommand(value="admin config timezone list", help="List all timezones") public java.lang.String listTimeZones()
TimeZone
Ids via a Spring XD Shell command.@CliCommand(value="admin config timezone set", help="Set the timezone of the Spring XD Shell (Not persisted)") public java.lang.String setTimeZone(@CliOption(mandatory=true,key={"","timeZone"},help="the id of the timezone, You can obtain a list of timezone ids using \'admin config timezone list\', If an invalid timezone id is provided, then \'Greenwich Mean Time\' is being used") java.lang.String timeZoneId)
TimeZone
via a Spring XD Shell command.public void afterPropertiesSet() throws java.lang.Exception
Target
for the XD Admin Server. It will use
the constants Target.DEFAULT_HOST
, Target.DEFAULT_PORT
and Target.DEFAULT_SCHEME
.
Alternatively, the host and port can also be set using the --host
and --port
command line parameters.afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception