OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class UserResource

java.lang.Object
  extended by com.openshift.internal.client.AbstractOpenShiftResource
      extended by com.openshift.internal.client.UserResource
All Implemented Interfaces:
IOpenShiftResource, IUser

public class UserResource
extends AbstractOpenShiftResource
implements IUser

Author:
André Dietisheim

Nested Class Summary
 
Nested classes/interfaces inherited from class com.openshift.internal.client.AbstractOpenShiftResource
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
 
Field Summary
 
Fields inherited from interface com.openshift.client.IUser
ID
 
Constructor Summary
UserResource(APIResource api, UserResourceDTO dto, String password)
           
 
Method Summary
 IDomain createDomain(String id)
           
 void deleteKey(String name)
           
 IOpenShiftConnection getConnection()
           
 int getConsumedGears()
           
 IDomain getDefaultDomain()
           
 IDomain getDomain(String id)
           
 List<IDomain> getDomains()
           
 int getMaxGears()
           
 String getPassword()
           
 String getRhlogin()
           
 String getServer()
           
 IOpenShiftSSHKey getSSHKeyByName(String name)
           
 IOpenShiftSSHKey getSSHKeyByPublicKey(String publicKey)
           
 List<IOpenShiftSSHKey> getSSHKeys()
           
 boolean hasDomain()
           
 boolean hasDomain(String id)
           
 boolean hasSSHKeyName(String name)
           
 boolean hasSSHPublicKey(String publicKey)
           
 IOpenShiftSSHKey putSSHKey(String name, ISSHPublicKey key)
          Adds the given ssh key with the given name.
 void refresh()
          Refresh the resource and its list of children resources that were previously loaded
protected  void removeSSHKey(SSHKeyResource key)
           
 String toString()
           
 
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
 
Methods inherited from interface com.openshift.client.IOpenShiftResource
getCreationLog, getMessages, hasCreationLog
 

Constructor Detail

UserResource

public UserResource(APIResource api,
                    UserResourceDTO dto,
                    String password)
Method Detail

getConnection

public IOpenShiftConnection getConnection()
Specified by:
getConnection in interface IUser

getRhlogin

public String getRhlogin()
Specified by:
getRhlogin in interface IUser

getPassword

public String getPassword()
Specified by:
getPassword in interface IUser

getServer

public String getServer()
Specified by:
getServer in interface IUser

getMaxGears

public int getMaxGears()
Specified by:
getMaxGears in interface IUser

getConsumedGears

public int getConsumedGears()
Specified by:
getConsumedGears in interface IUser

createDomain

public IDomain createDomain(String id)
                     throws OpenShiftException
Specified by:
createDomain in interface IUser
Throws:
OpenShiftException

getDomains

public List<IDomain> getDomains()
                         throws OpenShiftException
Specified by:
getDomains in interface IUser
Throws:
OpenShiftException

getDefaultDomain

public IDomain getDefaultDomain()
                         throws OpenShiftException
Specified by:
getDefaultDomain in interface IUser
Throws:
OpenShiftException

getDomain

public IDomain getDomain(String id)
                  throws OpenShiftException
Specified by:
getDomain in interface IUser
Throws:
OpenShiftException

hasDomain

public boolean hasDomain()
                  throws OpenShiftException
Specified by:
hasDomain in interface IUser
Throws:
OpenShiftException

hasDomain

public boolean hasDomain(String id)
                  throws OpenShiftException
Specified by:
hasDomain in interface IUser
Throws:
OpenShiftException

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

getSSHKeys

public List<IOpenShiftSSHKey> getSSHKeys()
                                  throws OpenShiftUnknonwSSHKeyTypeException,
                                         OpenShiftException
Specified by:
getSSHKeys in interface IUser
Throws:
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException

deleteKey

public void deleteKey(String name)
Specified by:
deleteKey in interface IUser

getSSHKeyByName

public IOpenShiftSSHKey getSSHKeyByName(String name)
                                 throws OpenShiftUnknonwSSHKeyTypeException,
                                        OpenShiftException
Specified by:
getSSHKeyByName in interface IUser
Throws:
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException

getSSHKeyByPublicKey

public IOpenShiftSSHKey getSSHKeyByPublicKey(String publicKey)
                                      throws OpenShiftUnknonwSSHKeyTypeException,
                                             OpenShiftException
Specified by:
getSSHKeyByPublicKey in interface IUser
Throws:
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException

hasSSHKeyName

public boolean hasSSHKeyName(String name)
                      throws OpenShiftUnknonwSSHKeyTypeException,
                             OpenShiftException
Specified by:
hasSSHKeyName in interface IUser
Throws:
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException

hasSSHPublicKey

public boolean hasSSHPublicKey(String publicKey)
                        throws OpenShiftUnknonwSSHKeyTypeException,
                               OpenShiftException
Specified by:
hasSSHPublicKey in interface IUser
Throws:
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException

putSSHKey

public IOpenShiftSSHKey putSSHKey(String name,
                                  ISSHPublicKey key)
                           throws OpenShiftException
Adds the given ssh key with the given name. Key names and public keys have to be unique. Throws OpenShiftSSHKeyException if either the key name or the public key are already used.

Specified by:
putSSHKey in interface IUser
Parameters:
name - the name to identify the key
key - the key to add
Returns:
Throws:
OpenShiftException

removeSSHKey

protected void removeSSHKey(SSHKeyResource key)

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.