public class DomainResource extends AbstractOpenShiftResource implements IDomain
AbstractOpenShiftResource.ServiceRequest| Modifier | Constructor and Description |
|---|---|
protected |
DomainResource(DomainResourceDTO domainDTO,
APIResource api) |
protected |
DomainResource(String namespace,
String suffix,
Map<String,Link> links,
List<Message> creationLog,
APIResource api) |
| Modifier and Type | Method and Description |
|---|---|
IApplication |
createApplication(String name,
ICartridge cartridge) |
IApplication |
createApplication(String name,
ICartridge cartridge,
ApplicationScale scale) |
IApplication |
createApplication(String name,
ICartridge cartridge,
ApplicationScale scale,
IGearProfile gearProfile)
Creates a new application with the given name and the given cartridge/framework.
|
IApplication |
createApplication(String name,
ICartridge cartridge,
IGearProfile gearProfile) |
void |
destroy()
Destroys the current domain.
|
void |
destroy(boolean force)
Destroys the current domain, using the 'force' parameter to also destroy the domain applications.
|
IApplication |
getApplicationByName(String name)
Returns the application identified by the given name.
|
List<IApplication> |
getApplications() |
List<IApplication> |
getApplicationsByCartridge(ICartridge 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(ICartridge cartridge) |
boolean |
hasApplicationByName(String name)
Returns true if the application identified by the given name exists in the domain.
|
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() |
boolean |
waitForAccessible(long timeout)
Waits for the domain to become accessible.
|
areLinksLoaded, getCreationLog, getLink, getService, hasCreationLogclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCreationLog, hasCreationLogprotected DomainResource(String namespace, String suffix, Map<String,Link> links, List<Message> creationLog, 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 boolean waitForAccessible(long timeout)
throws OpenShiftException
IDomainwaitForAccessible in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, ICartridge cartridge) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, ICartridge cartridge, ApplicationScale scale) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, ICartridge cartridge, IGearProfile gearProfile) throws OpenShiftException
createApplication in interface IDomainOpenShiftExceptionpublic IApplication createApplication(String name, ICartridge cartridge, ApplicationScale scale, IGearProfile gearProfile) throws OpenShiftException
IDomaincreateApplication in interface IDomainscale - or null (will use default on openshift, ie, false)OpenShiftExceptionpublic boolean hasApplicationByName(String name) throws OpenShiftException
IDomainhasApplicationByName in interface IDomainOpenShiftExceptionpublic IApplication getApplicationByName(String name) throws OpenShiftException
IDomaingetApplicationByName in interface IDomainOpenShiftExceptionpublic List<IApplication> getApplicationsByCartridge(ICartridge cartridge) throws OpenShiftException
getApplicationsByCartridge in interface IDomainOpenShiftExceptionpublic boolean hasApplicationByCartridge(ICartridge cartridge) throws OpenShiftException
hasApplicationByCartridge in interface IDomainOpenShiftExceptionpublic void destroy()
throws OpenShiftException
IDomaindestroy in interface IDomainOpenShiftExceptionpublic void destroy(boolean force)
throws OpenShiftException
IDomaindestroy in interface IDomainOpenShiftExceptionprotected List<IApplication> getOrLoadApplications() throws OpenShiftException
OpenShiftExceptionpublic List<IApplication> getApplications() throws OpenShiftException
getApplications in interface IDomainOpenShiftExceptionprotected 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 © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.