public class ConcourseClientConfiguration extends ConcourseClientPreferences
Instantiate using from(Path...)
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
NO_PASSWORD_DEFINED
An empty char array to return if there is no password defined in the
prefs file during a call to
getPasswordExplicit(). |
| Modifier and Type | Method and Description |
|---|---|
static ConcourseClientConfiguration |
from(Path... files)
Return a
ConcourseClientConfiguration handler that is sourced
from the files. |
static ConcourseClientConfiguration |
fromCurrentWorkingDirectory()
Return a
ConcourseClientConfiguration handler that is sourced
from Concourse client configuration files in the current working
directory. |
static ConcourseClientConfiguration |
fromUserHomeDirectory()
Return a
ConcourseClientConfiguration handler that is sourced
from Concourse client configuration files in the user's home directory. |
String |
getEnvironment()
Return the value associated with the
environment key. |
String |
getHost()
Return the value associated with the
host key. |
char[] |
getPassword()
Return the value associated with the
password key. |
char[] |
getPasswordExplicit()
Return the value associated with the
password key, if it is
explicitly defined in the prefs file. |
int |
getPort()
Return the value associated with the
port key. |
String |
getUsername()
Return the value associated with the
username key. |
void |
setEnvironment(String environment)
Set the value associated with the
environment key. |
void |
setHost(String host)
Set the value associated with the
host key. |
void |
setPassword(char[] password)
Set the value associated with the
password key. |
void |
setPort(int port)
Set the value associated with the
port key. |
void |
setUsername(String username)
Set the value associated with the
username key. |
opengetEnum, getSizeprotected static final char[] NO_PASSWORD_DEFINED
getPasswordExplicit().public static ConcourseClientConfiguration from(Path... files)
ConcourseClientConfiguration handler that is sourced
from the files.files - public static ConcourseClientConfiguration fromCurrentWorkingDirectory()
ConcourseClientConfiguration handler that is sourced
from Concourse client configuration files in the current working
directory.public static ConcourseClientConfiguration fromUserHomeDirectory()
ConcourseClientConfiguration handler that is sourced
from Concourse client configuration files in the user's home directory.public String getEnvironment()
environment key.getEnvironment in class ConcourseClientPreferencespublic String getHost()
host key.getHost in class ConcourseClientPreferencespublic char[] getPassword()
password key.
NOTE: This method returns the password as a char array so that the caller can null out the data immediately after use. This is generally advised to limit the amount of time that the sensitive data remains in memory.
getPassword in class ConcourseClientPreferencespublic char[] getPasswordExplicit()
password key, if it is
explicitly defined in the prefs file. Unlike the getPassword()
method, this one will not return the default password if one is not
explicitly defined in the file.
NOTE: This method returns the password as a char array so that the caller can null out the data immediately after use. This is generally advised to limit the amount of time that the sensitive data remains in memory.
getPasswordExplicit in class ConcourseClientPreferencespublic int getPort()
port key.getPort in class ConcourseClientPreferencespublic String getUsername()
username key.getUsername in class ConcourseClientPreferencespublic void setEnvironment(String environment)
environment key.setEnvironment in class ConcourseClientPreferencesenvironment - public void setHost(String host)
host key.setHost in class ConcourseClientPreferenceshost - public void setPassword(char[] password)
password key.setPassword in class ConcourseClientPreferencespassword - public void setPort(int port)
port key.setPort in class ConcourseClientPreferencesport - public void setUsername(String username)
username key.setUsername in class ConcourseClientPreferencesusername -