public class APIResource extends AbstractOpenShiftResource implements IOpenShiftConnection
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequestDEFAULT_CLIENT_ID| Modifier | Constructor and Description |
|---|---|
protected |
APIResource(String token,
IRestService service,
Map<String,Link> links) |
protected |
APIResource(String login,
String password,
String token,
IRestService service,
Map<String,Link> links) |
| Modifier and Type | Method and Description |
|---|---|
IAuthorization |
createAuthorization(String note,
String scopes) |
protected AuthorizationResource |
createAuthorization(String note,
String scopes,
Integer expiresIn) |
IDomain |
createDomain(String id) |
void |
disconnect() |
protected <C extends ICartridge> |
filterObsolete(boolean includeObsolete,
List<C> allCartridges) |
IAuthorization |
getAuthorization() |
IAuthorization |
getAuthorization(String id) |
List<IAuthorization> |
getAuthorizations() |
List<ICartridge> |
getCartridges()
Returns all the available cartridges, embeddable and standalone ones.
|
List<ICartridge> |
getCartridges(boolean includeObsolete)
Returns all the available cartridges, embeddable and standalone ones.
|
IDomain |
getDefaultDomain() |
IDomain |
getDomain(String id) |
List<IDomain> |
getDomains()
Returns the domains associated with the current OpenShift connection.
|
List<IEmbeddableCartridge> |
getEmbeddableCartridges()
Returns the available embeddable cartridges associated with the current
OpenShift connection.
|
List<IEmbeddableCartridge> |
getEmbeddableCartridges(boolean includeObsolete)
Returns the available embeddable cartridges associated with the current
OpenShift connection.
|
ExecutorService |
getExecutorService()
Returns the executor service instance that's available in this
connection.
|
protected String |
getLogin() |
protected AuthorizationResource |
getOrCreateAuthorization(String token) |
protected List<IEmbeddableCartridge> |
getOrLoadEmbeddableCartridges() |
protected List<IStandaloneCartridge> |
getOrLoadStandaloneCartridges() |
protected String |
getPassword() |
List<IQuickstart> |
getQuickstarts()
Returns the available quickstarts associated with the current
OpenShift connection.
|
String |
getServer()
Returns the server this connection is bound to.
|
List<IStandaloneCartridge> |
getStandaloneCartridges()
Returns the available standalone cartridges associated with the current
OpenShift connection.
|
List<IStandaloneCartridge> |
getStandaloneCartridges(boolean includeObsolete)
Returns the available standalone cartridges associated with the current
OpenShift connection.
|
IUser |
getUser()
Returns the user associated with the current OpenShift connection.
|
protected boolean |
hasDomain(String name) |
void |
refresh()
Refresh the resource and its list of children resources that were
previously loaded
|
protected void |
removeAuthorization() |
protected void |
removeDomain(IDomain domain)
Called after a domain has been destroyed
|
IDomain |
showDomain(String id) |
getCreationLog, getLink, getMessages, hasCreationLog, setLinksprotected APIResource(String token, IRestService service, Map<String,Link> links)
protected final String getLogin()
protected final String getPassword()
public String getServer()
IOpenShiftConnectiongetServer in interface IOpenShiftConnectionpublic IUser getUser() throws OpenShiftException
IOpenShiftConnectiongetUser in interface IOpenShiftConnectionOpenShiftExceptionpublic IAuthorization createAuthorization(String note, String scopes) throws OpenShiftException
OpenShiftExceptionprotected AuthorizationResource createAuthorization(String note, String scopes, Integer expiresIn) throws OpenShiftException
OpenShiftExceptionprotected void removeAuthorization()
protected AuthorizationResource getOrCreateAuthorization(String token)
public IAuthorization getAuthorization() throws OpenShiftException
OpenShiftExceptionpublic IAuthorization getAuthorization(String id) throws OpenShiftException
OpenShiftExceptionpublic List<IAuthorization> getAuthorizations() throws OpenShiftException
OpenShiftExceptionpublic List<IDomain> getDomains() throws OpenShiftException
IOpenShiftConnectiongetDomains in interface IOpenShiftConnectionOpenShiftExceptionpublic IDomain getDomain(String id) throws OpenShiftException
OpenShiftExceptionpublic IDomain getDefaultDomain()
public IDomain createDomain(String id) throws OpenShiftException
OpenShiftExceptionpublic IDomain showDomain(String id) throws OpenShiftException
OpenShiftExceptionpublic List<IStandaloneCartridge> getStandaloneCartridges() throws OpenShiftException
IOpenShiftConnectiongetStandaloneCartridges in interface IOpenShiftConnectionOpenShiftExceptionpublic List<IStandaloneCartridge> getStandaloneCartridges(boolean includeObsolete) throws OpenShiftException
IOpenShiftConnectiongetStandaloneCartridges in interface IOpenShiftConnectionincludeObsolete - include obsolete cartridgesOpenShiftExceptionprotected List<IStandaloneCartridge> getOrLoadStandaloneCartridges() throws OpenShiftException
OpenShiftExceptionpublic List<IEmbeddableCartridge> getEmbeddableCartridges() throws OpenShiftException
IOpenShiftConnectiongetEmbeddableCartridges in interface IOpenShiftConnectionOpenShiftExceptionpublic List<IEmbeddableCartridge> getEmbeddableCartridges(boolean includeObsolete) throws OpenShiftException
IOpenShiftConnectiongetEmbeddableCartridges in interface IOpenShiftConnectionincludeObsolete - include obsolete cartridgesOpenShiftExceptionprotected List<IEmbeddableCartridge> getOrLoadEmbeddableCartridges() throws OpenShiftException
OpenShiftExceptionprotected <C extends ICartridge> List<C> filterObsolete(boolean includeObsolete, List<C> allCartridges)
public List<ICartridge> getCartridges()
IOpenShiftConnectiongetCartridges in interface IOpenShiftConnectionpublic List<ICartridge> getCartridges(boolean includeObsolete)
IOpenShiftConnectiongetCartridges in interface IOpenShiftConnectionincludeObsolete - whether to include obsolete cartridges or not.public void refresh()
throws OpenShiftException
IOpenShiftResourcerefresh in interface IOpenShiftResourceOpenShiftExceptionprotected void removeDomain(IDomain domain)
domain - the domain to remove from the API's domains list.protected boolean hasDomain(String name) throws OpenShiftException
OpenShiftExceptionpublic List<IQuickstart> getQuickstarts()
IOpenShiftConnectiongetQuickstarts in interface IOpenShiftConnectionpublic ExecutorService getExecutorService()
IOpenShiftConnectiongetExecutorService in interface IOpenShiftConnectionExecutorService,
Executorspublic void disconnect()
Copyright © 2016 JBoss by Red Hat. All rights reserved.