OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class SSHKeyResource

java.lang.Object
  extended by com.openshift.internal.client.AbstractOpenShiftResource
      extended by com.openshift.internal.client.SSHKeyResource
All Implemented Interfaces:
IOpenShiftResource, IOpenShiftSSHKey, ISSHPublicKey

public class SSHKeyResource
extends AbstractOpenShiftResource
implements IOpenShiftSSHKey

Author:
Andre Dietisheim

Nested Class Summary
 
Nested classes/interfaces inherited from class com.openshift.internal.client.AbstractOpenShiftResource
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
 
Constructor Summary
protected SSHKeyResource(KeyResourceDTO dto, UserResource user)
           
 
Method Summary
 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)
           
 
Methods inherited from class com.openshift.internal.client.AbstractOpenShiftResource
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SSHKeyResource

protected SSHKeyResource(KeyResourceDTO dto,
                         UserResource user)
                  throws OpenShiftUnknonwSSHKeyTypeException
Throws:
OpenShiftUnknonwSSHKeyTypeException
Method Detail

setKeyType

public void setKeyType(SSHKeyType type,
                       String publicKey)
                throws OpenShiftException
Description copied from interface: IOpenShiftSSHKey
Sets the new type and public key of this ssh key to the OpenShift PaaS

Specified by:
setKeyType in interface IOpenShiftSSHKey
Throws:
OpenShiftException

getName

public String getName()
Description copied from interface: IOpenShiftSSHKey
Returns the name that is used to store this key on OpenShift.

Specified by:
getName in interface IOpenShiftSSHKey
Returns:

getKeyType

public SSHKeyType getKeyType()
Description copied from interface: ISSHPublicKey
Returns the type of the key (ssh-rsa or ssh-dss)

Specified by:
getKeyType in interface ISSHPublicKey
Returns:
the type of key, either ssh-rsa or ssh-dss

setPublicKey

public void setPublicKey(String publicKey)
                  throws OpenShiftException
Description copied from interface: IOpenShiftSSHKey
Sets the public key portion of this ssh key to the OpenShift PaaS.

Specified by:
setPublicKey in interface IOpenShiftSSHKey
Parameters:
publicKey - the new public key porition of this key
Throws:
OpenShiftException

getPublicKey

public String getPublicKey()
Description copied from interface: ISSHPublicKey
Returns the content of the public key (key content without ssh-rsa identifier nor comment) of the ssh key

Specified by:
getPublicKey in interface ISSHPublicKey
Returns:
the content of the public key (without signature, without comment)

refresh

public void refresh()
             throws OpenShiftException
Description copied from interface: IOpenShiftResource
Refresh the resource and its list of children resources that were previously loaded

Specified by:
refresh in interface IOpenShiftResource
Throws:
OpenShiftException

destroy

public void destroy()
             throws OpenShiftException
Specified by:
destroy in interface IOpenShiftSSHKey
Throws:
OpenShiftException

update

protected void update(KeyResourceDTO dto)
               throws OpenShiftUnknonwSSHKeyTypeException
Throws:
OpenShiftUnknonwSSHKeyTypeException

toString

public String toString()
Overrides:
toString in class Object

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.