public class DomainResource extends AbstractOpenShiftResource implements IDomain
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest| Modifier | Constructor and Description |
|---|---|
protected |
DomainResource(DomainResourceDTO domainDTO,
APIResource api) |
protected |
DomainResource(String namespace,
String suffix,
Map<String,Link> links,
Messages messages,
APIResource api) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCreateApplicationWithEnvironmentVariables()
Returns
true if this domain can create application with environment variables. |
protected IApplication |
createApplication(String name,
ApplicationScale scale,
IGearProfile gearProfile,
String initialGitUrl,
int timeout,
Map<String,String> environmentVariables,
Collection<ICartridge> cartridges) |
IApplication |
createApplication(String name,
ApplicationScale scale,
IGearProfile gearProfile,
String initialGitUrl,
int timeout,
Map<String,String> environmentVariables,
ICartridge... cartridges)
Creates a new application with the given name and the given cartridges.
|
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
ApplicationScale scale) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
ApplicationScale scale,
IGearProfile gearProfile) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
ApplicationScale scale,
IGearProfile gearProfile,
String initialGitUrl)
Creates a new application with the given name and the given
cartridge/framework.
|
IApplication |
createApplication(String name,
IStandaloneCartridge standaloneCartridge,
ApplicationScale scale,
IGearProfile gearProfile,
String initialGitUrl,
int timeout,
IEmbeddableCartridge... embeddableCartridges)
Creates a new application with the given name and the given
cartridge/framework.
|
IApplication |
createApplication(String name,
IStandaloneCartridge standaloneCartridge,
ApplicationScale scale,
IGearProfile gearProfile,
String initialGitUrl,
int timeout,
Map<String,String> environmentVariables,
IEmbeddableCartridge... embedddableCartridges)
Creates a new application with the given name and the given
cartridge/framework.
|
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
ApplicationScale scale,
String initialGitUrl) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
IGearProfile gearProfile) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
IGearProfile gearProfile,
String initialGitUrl) |
IApplication |
createApplication(String name,
IStandaloneCartridge cartridge,
String initialGitUrl) |
void |
destroy()
Destroys the current domain.
|
void |
destroy(boolean force)
Destroys the current domain, using the 'force' parameter to also destroy the domain applications.
|
boolean |
equals(Object obj) |
IApplication |
getApplicationByName(String name)
Returns the application identified by the given name.
|
List<IApplication> |
getApplications() |
List<IApplication> |
getApplicationsByCartridge(IStandaloneCartridge cartridge) |
List<String> |
getAvailableCartridgeNames()
Returns the list of cartridges that can be used to create a new application.
|
List<IGearProfile> |
getAvailableGearProfiles()
Returns the list of available gear size that the user can choose when creating a new application (application's gear size can't be changed after creation).
|
String |
getId() |
protected List<IApplication> |
getOrLoadApplications() |
String |
getSuffix()
The domain suffix is the host part eg: 'rhcloud.com')
|
IUser |
getUser()
Returns the currently connected user that manages this domain.
|
boolean |
hasApplicationByCartridge(IStandaloneCartridge cartridge) |
boolean |
hasApplicationByName(String name)
Returns true if the application identified by the given name exists in the domain.
|
int |
hashCode() |
void |
refresh()
Refresh the resource and its list of children resources that were
previously loaded
|
protected void |
removeApplication(IApplication application) |
void |
rename(String id)
Rename the current domain with the given id....
|
String |
toString() |
getCreationLog, getLink, getMessages, hasCreationLog, setLinksclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCreationLog, getMessages, hasCreationLogprotected DomainResource(String namespace, String suffix, Map<String,Link> links, Messages messages, APIResource api)
protected DomainResource(DomainResourceDTO domainDTO, APIResource api)
public String getId()
public String getSuffix()
IDomainpublic void rename(String id) throws OpenShiftException
IDomainrename in interface IDomainOpenShiftExceptionpublic IUser getUser() throws OpenShiftException
IDomaingetUser in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, ApplicationScale scale) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, String initialGitUrl) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, ApplicationScale scale, String initialGitUrl) throws OpenShiftException
OpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, IGearProfile gearProfile) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, IGearProfile gearProfile, String initialGitUrl) throws OpenShiftException
OpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, ApplicationScale scale, IGearProfile gearProfile) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge cartridge, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl) throws OpenShiftException
IDomaincreateApplication in interface IDomainname - the name of the applicationcartridge - the cartridge (the application type, ex. jbossas-7,
jbossews-2, php.5.2, etc.scale - or null (will use default on openshift, ie, false)gearProfile - available gear sizes from openshift api or
null (will use default on openshift, ie, 'small')initialGitUrl - the git url for the initial template app to be usedOpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge standaloneCartridge, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, IEmbeddableCartridge... embeddableCartridges) throws OpenShiftException
IDomaincreateApplication in interface IDomainname - the name of the applicationstandaloneCartridge - the cartridge (the application type, ex. jbossas-7,
jbossews-2, php.5.2, etc.scale - or null (will use default on openshift, ie, false)gearProfile - available gear sizes from openshift api or
null (will use default on openshift, ie, 'small')initialGitUrl - the git url for the initial template app to be usedtimeout - the timeout value in millisecondsembeddableCartridges - the embeddable cartridges that shall get added to the new
application (the add-on cartridges mysql, mongodb, postgresql,
etc.)OpenShiftExceptionpublic IApplication createApplication(String name, IStandaloneCartridge standaloneCartridge, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, Map<String,String> environmentVariables, IEmbeddableCartridge... embedddableCartridges) throws OpenShiftException
IDomaincreateApplication in interface IDomainname - the name of the applicationstandaloneCartridge - the cartridge (the application type, ex. jbossas-7,
jbossews-2, php.5.2, etc.scale - or null (will use default on openshift)gearProfile - available gear sizes from openshift api or
null (will use default on openshift, ie, 'small')initialGitUrl - the git url for the initial template app to be usedtimeout - the timeout value in millisecondsenvironmentVariables - the environment variables to be added to the applicationembedddableCartridges - the embeddable cartridges that shall get added to the new
application (the add-on cartridges mysql, mongodb, postgresql,
etc.)OpenShiftExceptionpublic IApplication createApplication(String name, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, Map<String,String> environmentVariables, ICartridge... cartridges) throws OpenShiftException
IDomaincreateApplication in interface IDomainname - the application namescale - the scaling (or null for default)gearProfile - the gear profile (or null for default)initialGitUrl - the git url for the initial template codetimeout - the request timeoutenvironmentVariables - the environment variables (or null for none)cartridges - all (the standalone- and the embeddable) cartridgeOpenShiftExceptionprotected IApplication createApplication(String name, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, Map<String,String> environmentVariables, Collection<ICartridge> cartridges) throws OpenShiftException
OpenShiftExceptionpublic boolean hasApplicationByName(String name) throws OpenShiftException
IDomainhasApplicationByName in interface IDomainOpenShiftExceptionpublic IApplication getApplicationByName(String name) throws OpenShiftException
IDomaingetApplicationByName in interface IDomainOpenShiftExceptionpublic List<IApplication> getApplicationsByCartridge(IStandaloneCartridge cartridge) throws OpenShiftException
getApplicationsByCartridge in interface IDomainOpenShiftExceptionpublic boolean hasApplicationByCartridge(IStandaloneCartridge cartridge) throws OpenShiftException
hasApplicationByCartridge in interface IDomainOpenShiftExceptionpublic boolean canCreateApplicationWithEnvironmentVariables()
IDomaintrue if this domain can create application with environment variables. Returns false otherwise.canCreateApplicationWithEnvironmentVariables in interface IDomainIApplication.getEnvironmentVariables()public void destroy()
throws OpenShiftException
IDomaindestroy in interface IDomainOpenShiftExceptionpublic void destroy(boolean force)
throws OpenShiftException
IDomaindestroy in interface IDomainOpenShiftExceptionpublic List<IApplication> getApplications() throws OpenShiftException
getApplications in interface IDomainOpenShiftExceptionprotected List<IApplication> getOrLoadApplications() throws OpenShiftException
OpenShiftExceptionprotected void removeApplication(IApplication application)
public List<String> getAvailableCartridgeNames() throws OpenShiftException
IDomaingetAvailableCartridgeNames in interface IDomainOpenShiftExceptionpublic List<IGearProfile> getAvailableGearProfiles() throws OpenShiftException
IDomaingetAvailableGearProfiles in interface IDomainOpenShiftExceptionpublic void refresh()
throws OpenShiftException
IOpenShiftResourcerefresh in interface IOpenShiftResourceOpenShiftExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.