OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class EmbeddedCartridgeResource

java.lang.Object
  extended by com.openshift.internal.client.AbstractOpenShiftResource
      extended by com.openshift.internal.client.EmbeddedCartridgeResource
All Implemented Interfaces:
ICartridge, IEmbeddableCartridge, IEmbeddedCartridge, IOpenShiftResource

public class EmbeddedCartridgeResource
extends AbstractOpenShiftResource
implements IEmbeddedCartridge

A cartridge that is embedded into an application.

Author:
André Dietisheim

Nested Class Summary
 
Nested classes/interfaces inherited from class com.openshift.internal.client.AbstractOpenShiftResource
AbstractOpenShiftResource.Parameters, AbstractOpenShiftResource.ServiceRequest
 
Field Summary
 
Fields inherited from interface com.openshift.client.cartridge.IEmbeddableCartridge
NAME_10GEN_MMS_AGENT, NAME_CRON, NAME_HAPROXY, NAME_JENKINS_CLIENT, NAME_METRICS, NAME_MONGODB, NAME_MYSQL, NAME_PHPMYADMIN, NAME_POSTGRESQL, NAME_ROCKMONGO, NAME_SWITCHYARD
 
Fields inherited from interface com.openshift.client.cartridge.ICartridge
NAME_VERSION_DELIMITER
 
Constructor Summary
protected EmbeddedCartridgeResource(CartridgeResourceDTO dto, ApplicationResource application)
           
 
Method Summary
 void destroy()
          Destroys this cartridge (and removes it from the list of existing cartridges)
 boolean equals(Object obj)
          TODO: implement fully correct #equals and #hashcode.
 IApplication getApplication()
          Returns the application this cartridge is embedded into.
 String getDescription()
          Returns a description for this cartridge
 String getDisplayName()
          Returns a (human readable, nice) display name for this cartridge
 String getName()
          Returns the name of this cartridge
 CartridgeResourceProperties getProperties()
          Returns the properties for this embedded cartridge
protected  CartridgeType getType()
           
 URL getUrl()
          The url at which this cartridge may be reached
 int hashCode()
           
 boolean isDownloadable()
          Returns true if this is a downloadable cartridge whose code may be downloaded at the url returned by ICartridge.getUrl() (cartridge code will get downloaded upon creation).
 void refresh()
          Refreshes the content of this embedded cartridge.
 String toString()
           
protected  void update(CartridgeResourceDTO dto)
           
 
Methods inherited from class com.openshift.internal.client.AbstractOpenShiftResource
getCreationLog, getLink, getMessages, hasCreationLog, setLinks
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.openshift.client.IOpenShiftResource
getCreationLog, getMessages, hasCreationLog
 

Constructor Detail

EmbeddedCartridgeResource

protected EmbeddedCartridgeResource(CartridgeResourceDTO dto,
                                    ApplicationResource application)
Method Detail

getName

public String getName()
Description copied from interface: ICartridge
Returns the name of this cartridge

Specified by:
getName in interface ICartridge
Returns:
the name

getDisplayName

public String getDisplayName()
Description copied from interface: ICartridge
Returns a (human readable, nice) display name for this cartridge

Specified by:
getDisplayName in interface ICartridge
Returns:
the display name

getDescription

public String getDescription()
Description copied from interface: ICartridge
Returns a description for this cartridge

Specified by:
getDescription in interface ICartridge
Returns:
the description

getType

protected CartridgeType getType()

getUrl

public URL getUrl()
Description copied from interface: IEmbeddedCartridge
The url at which this cartridge may be reached

Specified by:
getUrl in interface ICartridge
Specified by:
getUrl in interface IEmbeddedCartridge
Returns:
the url for this cartridge
See Also:
ICartridge.isDownloadable()

isDownloadable

public boolean isDownloadable()
Description copied from interface: ICartridge
Returns true if this is a downloadable cartridge whose code may be downloaded at the url returned by ICartridge.getUrl() (cartridge code will get downloaded upon creation). Examples:

Specified by:
isDownloadable in interface ICartridge
Returns:
true if this is a downloadable cartridge
See Also:
ICartridge.getUrl()

getApplication

public IApplication getApplication()
Description copied from interface: IEmbeddedCartridge
Returns the application this cartridge is embedded into.

Specified by:
getApplication in interface IEmbeddedCartridge
Returns:
application this is embedded into

update

protected void update(CartridgeResourceDTO dto)

refresh

public void refresh()
             throws OpenShiftException
Refreshes the content of this embedded cartridge. Causes all embedded cartridges of the same application to get updated.

Specified by:
refresh in interface IOpenShiftResource
Throws:
OpenShiftException
See Also:
update(CartridgeResourceDTO), ApplicationResource.refreshEmbeddedCartridges()

destroy

public void destroy()
             throws OpenShiftException
Description copied from interface: IEmbeddedCartridge
Destroys this cartridge (and removes it from the list of existing cartridges)

Specified by:
destroy in interface IEmbeddedCartridge
Throws:
OpenShiftException

getProperties

public CartridgeResourceProperties getProperties()
Description copied from interface: IEmbeddedCartridge
Returns the properties for this embedded cartridge

Specified by:
getProperties in interface IEmbeddedCartridge
Returns:
the resource properties

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
TODO: implement fully correct #equals and #hashcode. The current implementation only ensures that EmbeddedCartridgeResource may be compared to EmbeddableCartridge.

Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

OpenShift Java Client 2.5.0.Final

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