public class RemoteCredentialsHolder extends java.lang.Object implements MutableRemoteCredentials
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ANONYMOUS |
static java.lang.String |
HOST |
static java.lang.String |
PASSPHRASE |
static java.lang.String |
PASSWORD |
static java.lang.String |
PORT |
static java.lang.String |
PRIVATE_KEY_FILE |
static java.lang.String |
SSH_PREFIX |
static java.lang.String |
USE_AUTH_AGENT |
static java.lang.String |
USE_KEY_PAIR |
static java.lang.String |
USERNAME |
Constructor and Description |
---|
RemoteCredentialsHolder() |
RemoteCredentialsHolder(RemoteCredentials credentials) |
Modifier and Type | Method and Description |
---|---|
void |
copyFrom(RemoteCredentials from) |
static void |
copyRemoteCredentials(RemoteCredentials from,
MutableRemoteCredentials to) |
void |
copyRemoteCredentialsTo(MutableRemoteCredentials to) |
boolean |
equals(java.lang.Object o) |
AuthType |
getAuthType() |
static java.lang.String |
getCredentialsString(RemoteCredentials cred) |
java.lang.String |
getHost() |
java.lang.String |
getLiteralPort() |
java.lang.String |
getPassphrase() |
java.lang.String |
getPassword() |
int |
getPort() |
java.lang.String |
getPrivateKeyFile() |
java.lang.String |
getSerializedUserName() |
java.lang.String |
getUserName() |
int |
hashCode() |
boolean |
isStorePassphrase() |
boolean |
isStorePassword() |
void |
load(Element element) |
void |
save(Element rootElement)
Stores main part of ssh credentials in xml element and password and passphrase in PasswordSafe.
|
void |
setAuthType(AuthType authType) |
void |
setHost(java.lang.String host) |
void |
setLiteralPort(java.lang.String portText)
Sets string representation of port and its int value, which is equal to string one if it's a valid integer,
and is 0 otherwise.
|
void |
setPassphrase(java.lang.String passphrase) |
void |
setPassword(java.lang.String password) |
void |
setPort(int port)
Sets both int and String representations of port.
|
void |
setPrivateKeyFile(java.lang.String privateKeyFile) |
void |
setStorePassphrase(boolean storePassphrase) |
void |
setStorePassword(boolean storePassword) |
void |
setUserName(java.lang.String userName) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
isSkippingHostKeyVerification
public static final java.lang.String HOST
public static final java.lang.String PORT
public static final java.lang.String ANONYMOUS
public static final java.lang.String USERNAME
public static final java.lang.String PASSWORD
public static final java.lang.String USE_KEY_PAIR
public static final java.lang.String USE_AUTH_AGENT
public static final java.lang.String PRIVATE_KEY_FILE
public static final java.lang.String PASSPHRASE
public static final java.lang.String SSH_PREFIX
public RemoteCredentialsHolder()
public RemoteCredentialsHolder(RemoteCredentials credentials)
public static java.lang.String getCredentialsString(RemoteCredentials cred)
public java.lang.String getHost()
getHost
in interface RemoteCredentials
public void setHost(java.lang.String host)
setHost
in interface MutableRemoteCredentials
public int getPort()
getPort
in interface RemoteCredentials
public void setPort(int port)
setPort
in interface MutableRemoteCredentials
public java.lang.String getLiteralPort()
getLiteralPort
in interface RemoteCredentials
public void setLiteralPort(java.lang.String portText)
setLiteralPort
in interface MutableRemoteCredentials
public java.lang.String getUserName()
getUserName
in interface RemoteCredentials
public void setUserName(java.lang.String userName)
setUserName
in interface MutableRemoteCredentials
public java.lang.String getPassword()
getPassword
in interface RemoteCredentials
public void setPassword(java.lang.String password)
setPassword
in interface MutableRemoteCredentials
public void setStorePassword(boolean storePassword)
setStorePassword
in interface MutableRemoteCredentials
public void setStorePassphrase(boolean storePassphrase)
setStorePassphrase
in interface MutableRemoteCredentials
public boolean isStorePassword()
isStorePassword
in interface RemoteCredentials
public boolean isStorePassphrase()
isStorePassphrase
in interface RemoteCredentials
public java.lang.String getPrivateKeyFile()
getPrivateKeyFile
in interface RemoteCredentials
public void setPrivateKeyFile(java.lang.String privateKeyFile)
setPrivateKeyFile
in interface MutableRemoteCredentials
public java.lang.String getPassphrase()
getPassphrase
in interface RemoteCredentials
public void setPassphrase(java.lang.String passphrase)
setPassphrase
in interface MutableRemoteCredentials
public AuthType getAuthType()
getAuthType
in interface RemoteCredentials
public void setAuthType(AuthType authType)
setAuthType
in interface MutableRemoteCredentials
public java.lang.String getSerializedUserName()
public void copyRemoteCredentialsTo(MutableRemoteCredentials to)
public void copyFrom(RemoteCredentials from)
public static void copyRemoteCredentials(RemoteCredentials from, MutableRemoteCredentials to)
public void load(Element element)
public void save(Element rootElement)
Don't use this method to serialize intermediate state of credentials because it will overwrite password and passphrase in PasswordSafe
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object