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, waitisSkippingHostKeyVerificationpublic 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 RemoteCredentialspublic void setHost(java.lang.String host)
setHost in interface MutableRemoteCredentialspublic int getPort()
getPort in interface RemoteCredentialspublic void setPort(int port)
setPort in interface MutableRemoteCredentialspublic java.lang.String getLiteralPort()
getLiteralPort in interface RemoteCredentialspublic void setLiteralPort(java.lang.String portText)
setLiteralPort in interface MutableRemoteCredentialspublic java.lang.String getUserName()
getUserName in interface RemoteCredentialspublic void setUserName(java.lang.String userName)
setUserName in interface MutableRemoteCredentialspublic java.lang.String getPassword()
getPassword in interface RemoteCredentialspublic void setPassword(java.lang.String password)
setPassword in interface MutableRemoteCredentialspublic void setStorePassword(boolean storePassword)
setStorePassword in interface MutableRemoteCredentialspublic void setStorePassphrase(boolean storePassphrase)
setStorePassphrase in interface MutableRemoteCredentialspublic boolean isStorePassword()
isStorePassword in interface RemoteCredentialspublic boolean isStorePassphrase()
isStorePassphrase in interface RemoteCredentialspublic java.lang.String getPrivateKeyFile()
getPrivateKeyFile in interface RemoteCredentialspublic void setPrivateKeyFile(java.lang.String privateKeyFile)
setPrivateKeyFile in interface MutableRemoteCredentialspublic java.lang.String getPassphrase()
getPassphrase in interface RemoteCredentialspublic void setPassphrase(java.lang.String passphrase)
setPassphrase in interface MutableRemoteCredentialspublic AuthType getAuthType()
getAuthType in interface RemoteCredentialspublic void setAuthType(AuthType authType)
setAuthType in interface MutableRemoteCredentialspublic 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.Objectpublic int hashCode()
hashCode in class java.lang.Object