OpenShift Java Client 2.5.0.Final

com.openshift.client
Interface IDomain

All Superinterfaces:
IOpenShiftResource
All Known Implementing Classes:
DomainResource

public interface IDomain
extends IOpenShiftResource

Author:
André Dietisheim, Nicolas Spano, Syed Iqbal

Method Summary
 boolean canCreateApplicationWithEnvironmentVariables()
          Returns true if this domain can create application with environment variables.
 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 cartridge, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, IEmbeddableCartridge... cartridges)
          Creates a new application with the given name and the given cartridge/framework.
 IApplication createApplication(String name, IStandaloneCartridge cartridge, ApplicationScale scale, IGearProfile gearProfile, String initialGitUrl, int timeout, Map<String,String> environmentVariable, IEmbeddableCartridge... cartridges)
          Creates a new application with the given name and the given cartridge/framework.
 IApplication createApplication(String name, IStandaloneCartridge cartridge, IGearProfile gearProfile)
           
 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.
 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()
           
 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.
 void rename(String id)
          Rename the current domain with the given id....
 
Methods inherited from interface com.openshift.client.IOpenShiftResource
getCreationLog, getMessages, hasCreationLog, refresh
 

Method Detail

getId

String getId()
Returns:
the domain id (formerly known as 'namespace'). A unique litteral identifier on OpenShift.

getSuffix

String getSuffix()
The domain suffix is the host part eg: 'rhcloud.com')

Returns:

rename

void rename(String id)
            throws OpenShiftException
Rename the current domain with the given id....

Parameters:
id -
Throws:
OpenShiftException

getUser

IUser getUser()
              throws OpenShiftException
Returns the currently connected user that manages this domain.

Returns:
Throws:
OpenShiftException

destroy

void destroy()
             throws OpenShiftException
Destroys the current domain. This method works only if it has not application.

Throws:
OpenShiftException

destroy

void destroy(boolean force)
             throws OpenShiftException
Destroys the current domain, using the 'force' parameter to also destroy the domain applications. The domain cannot be destroyed without setting 'force-true' if it still contains applications.

Parameters:
force -
Throws:
OpenShiftException

canCreateApplicationWithEnvironmentVariables

boolean canCreateApplicationWithEnvironmentVariables()
Returns true if this domain can create application with environment variables. Returns false otherwise.

Returns:
true if can create an application with environment variables
See Also:
IApplication.getEnvironmentVariables()

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge)
                               throws OpenShiftException
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               String initialGitUrl)
                               throws OpenShiftException
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               ApplicationScale scale)
                               throws OpenShiftException
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               IGearProfile gearProfile)
                               throws OpenShiftException
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               ApplicationScale scale,
                               IGearProfile gearProfile)
                               throws OpenShiftException
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               ApplicationScale scale,
                               IGearProfile gearProfile,
                               String initialGitUrl)
                               throws OpenShiftException
Creates a new application with the given name and the given cartridge/framework. Optionally, adds scalability and a specific gear profile and a git url to use for the initial template.

Parameters:
name - the name of the application
cartridge - 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 - ("small", "micro", "medium", "large", "exlarge", "jumbo") or null (will use default on openshift, ie, 'small')
initialGitUrl - the git url for the initial template app to be used
Returns:
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               ApplicationScale scale,
                               IGearProfile gearProfile,
                               String initialGitUrl,
                               int timeout,
                               IEmbeddableCartridge... cartridges)
                               throws OpenShiftException
Creates a new application with the given name and the given cartridge/framework. Optionally, adds scalability, a specific gear profile, a git url to use for the initial template, the timeout value and the embeddable (add-on) cartridges for it.

Parameters:
name - the name of the application
cartridge - 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 - ("small", "micro", "medium", "large", "exlarge", "jumbo") or null (will use default on openshift, ie, 'small')
initialGitUrl - the git url for the initial template app to be used
timeout - the timeout value in milliseconds
cartridges - the embeddable cartridges that shall get added to the new application (the add-on cartridges mysql, mongodb, postgresql, etc.)
Returns:
IApplication created
Throws:
OpenShiftException

createApplication

IApplication createApplication(String name,
                               IStandaloneCartridge cartridge,
                               ApplicationScale scale,
                               IGearProfile gearProfile,
                               String initialGitUrl,
                               int timeout,
                               Map<String,String> environmentVariable,
                               IEmbeddableCartridge... cartridges)
                               throws OpenShiftException
Creates a new application with the given name and the given cartridge/framework. Optionally, adds scalability, a specific gear profile, a git url to use for the initial template, the timeout value, environment variables and the embeddable (add-on) cartridges for it.

Parameters:
name - the name of the application
cartridge - 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 - ("small", "micro", "medium", "large", "exlarge", "jumbo") or null (will use default on openshift, ie, 'small')
initialGitUrl - the git url for the initial template app to be used
timeout - the timeout value in milliseconds
environmentVariable - the environment variables to be added to the application
cartridges - the embeddable cartridges that shall get added to the new application (the add-on cartridges mysql, mongodb, postgresql, etc.)
Returns:
IApplication created
Throws:
OpenShiftException

getApplications

List<IApplication> getApplications()
                                   throws OpenShiftException
Throws:
OpenShiftException

getAvailableCartridgeNames

List<String> getAvailableCartridgeNames()
                                        throws OpenShiftException
Returns the list of cartridges that can be used to create a new application.

Returns:
the list of cartridges that can be used to create a new application.
Throws:
OpenShiftException

getApplicationByName

IApplication getApplicationByName(String name)
                                  throws OpenShiftException
Returns the application identified by the given name.

Parameters:
name -
Returns:
Throws:
OpenShiftException

hasApplicationByName

boolean hasApplicationByName(String name)
                             throws OpenShiftException
Returns true if the application identified by the given name exists in the domain.

Parameters:
name -
Returns:
Throws:
OpenShiftException

getApplicationsByCartridge

List<IApplication> getApplicationsByCartridge(IStandaloneCartridge cartridge)
                                              throws OpenShiftException
Throws:
OpenShiftException

hasApplicationByCartridge

boolean hasApplicationByCartridge(IStandaloneCartridge cartridge)
                                  throws OpenShiftException
Throws:
OpenShiftException

getAvailableGearProfiles

List<IGearProfile> getAvailableGearProfiles()
                                            throws OpenShiftException
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).

Returns:
Throws:
OpenShiftException

OpenShift Java Client 2.5.0.Final

Copyright © 2014 JBoss, a division of Red Hat, Inc.. All Rights Reserved.