public class SSHKeyResource extends AbstractOpenShiftResource implements IOpenShiftSSHKey
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
Modifier | Constructor and Description |
---|---|
protected |
SSHKeyResource(KeyResourceDTO dto,
UserResource user) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
SSHKeyType |
getKeyType()
Returns the type of the key (ssh-rsa or ssh-dss)
|
String |
getName()
Returns the name that is used to store this key on OpenShift.
|
String |
getPublicKey()
Returns the content of the public key (key content without ssh-rsa
identifier nor comment) of the ssh key
|
void |
refresh()
Refresh the resource and its list of children resources that were
previously loaded
|
void |
setKeyType(SSHKeyType type,
String publicKey)
Sets the new type and public key of this ssh key to the OpenShift PaaS
|
void |
setPublicKey(String publicKey)
Sets the public key portion of this ssh key to the OpenShift PaaS.
|
String |
toString() |
protected void |
update(KeyResourceDTO dto) |
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
protected SSHKeyResource(KeyResourceDTO dto, UserResource user) throws OpenShiftUnknonwSSHKeyTypeException
public void setKeyType(SSHKeyType type, String publicKey) throws OpenShiftException
IOpenShiftSSHKey
setKeyType
in interface IOpenShiftSSHKey
OpenShiftException
public String getName()
IOpenShiftSSHKey
getName
in interface IOpenShiftSSHKey
public SSHKeyType getKeyType()
ISSHPublicKey
getKeyType
in interface ISSHPublicKey
public void setPublicKey(String publicKey) throws OpenShiftException
IOpenShiftSSHKey
setPublicKey
in interface IOpenShiftSSHKey
publicKey
- the new public key porition of this keyOpenShiftException
public String getPublicKey()
ISSHPublicKey
getPublicKey
in interface ISSHPublicKey
public void refresh() throws OpenShiftException
IOpenShiftResource
refresh
in interface IOpenShiftResource
OpenShiftException
public void destroy() throws OpenShiftException
destroy
in interface IOpenShiftSSHKey
OpenShiftException
protected void update(KeyResourceDTO dto) throws OpenShiftUnknonwSSHKeyTypeException
Copyright © 2018 JBoss by Red Hat. All rights reserved.