public class UserResource extends AbstractOpenShiftResource implements IUser
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
Constructor and Description |
---|
UserResource(APIResource api,
UserResourceDTO dto,
String password) |
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCreationLog, getMessages, hasCreationLog
public UserResource(APIResource api, UserResourceDTO dto, String password)
public IOpenShiftConnection getConnection()
getConnection
in interface IUser
public String getRhlogin()
getRhlogin
in interface IUser
public String getPassword()
getPassword
in interface IUser
public int getMaxGears()
getMaxGears
in interface IUser
public int getConsumedGears()
getConsumedGears
in interface IUser
public IDomain createDomain(String id) throws OpenShiftException
createDomain
in interface IUser
OpenShiftException
public List<IDomain> getDomains() throws OpenShiftException
getDomains
in interface IUser
OpenShiftException
public IDomain getDefaultDomain() throws OpenShiftException
getDefaultDomain
in interface IUser
OpenShiftException
public IDomain getDomain(String id) throws OpenShiftException
getDomain
in interface IUser
OpenShiftException
public boolean hasDomain() throws OpenShiftException
hasDomain
in interface IUser
OpenShiftException
public boolean hasDomain(String id) throws OpenShiftException
hasDomain
in interface IUser
OpenShiftException
public IAuthorization createAuthorization(String note, String scopes) throws OpenShiftException
IUser
createAuthorization
in interface IUser
note
- A reminder description of what the authorization is for.scopes
- Scope of the authorization token to determine type of access.OpenShiftException
public IAuthorization createAuthorization(String note, String scopes, int expiresIn) throws OpenShiftException
IUser
createAuthorization
in interface IUser
note
- A reminder description of what the authorization is for.scopes
- Scope of the authorization token to determine type of access.expiresIn
- The number of seconds before this authorization expires.OpenShiftException
public IAuthorization getAuthorization() throws OpenShiftException
IUser
getAuthorization
in interface IUser
OpenShiftException
public IAuthorization getAuthorization(String id) throws OpenShiftException
IUser
getAuthorization
in interface IUser
id
- authorization token or idOpenShiftException
public Collection<IAuthorization> getAuthorizations() throws OpenShiftException
IUser
getAuthorizations
in interface IUser
OpenShiftException
public boolean removeAuthorization(String id)
IUser
removeAuthorization
in interface IUser
id
- authorization token or idpublic void refresh() throws OpenShiftException
IOpenShiftResource
refresh
in interface IOpenShiftResource
OpenShiftException
public List<IOpenShiftSSHKey> getSSHKeys() throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException
getSSHKeys
in interface IUser
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException
public boolean removeSSHKey(String name)
removeSSHKey
in interface IUser
@Deprecated public void deleteKey(String name)
public IOpenShiftSSHKey getSSHKeyByName(String name) throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException
getSSHKeyByName
in interface IUser
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException
public IOpenShiftSSHKey getSSHKeyByPublicKey(String publicKey) throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException
getSSHKeyByPublicKey
in interface IUser
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException
public boolean hasSSHKeyName(String name) throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException
hasSSHKeyName
in interface IUser
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException
public boolean hasSSHPublicKey(String publicKey) throws OpenShiftUnknonwSSHKeyTypeException, OpenShiftException
hasSSHPublicKey
in interface IUser
OpenShiftUnknonwSSHKeyTypeException
OpenShiftException
public IOpenShiftSSHKey putSSHKey(String name, ISSHPublicKey key) throws OpenShiftException
IUser
IUser.addSSHKey(String, ISSHPublicKey)
putSSHKey
in interface IUser
name
- key name to usekey
- the key to put/addOpenShiftException
public IOpenShiftSSHKey addSSHKey(String name, ISSHPublicKey key) throws OpenShiftException
IUser
addSSHKey
in interface IUser
name
- the name to identify the keykey
- the key to addOpenShiftException
protected void removeSSHKey(SSHKeyResource key)
Copyright © 2015 JBoss by Red Hat. All rights reserved.