OpenShift Java Client 2.5.0.Final

com.openshift.internal.client
Class AbstractOpenShiftResource

java.lang.Object
  extended by com.openshift.internal.client.AbstractOpenShiftResource
All Implemented Interfaces:
IOpenShiftResource
Direct Known Subclasses:
APIResource, ApplicationResource, DomainResource, EmbeddedCartridgeResource, EnvironmentVariableResource, GearGroupResource, SSHKeyResource, UserResource

public abstract class AbstractOpenShiftResource
extends Object
implements IOpenShiftResource

The Class AbstractOpenShiftResource.

Author:
Xavier Coulon, Andre Dietisheim, Syed Iqbal

Nested Class Summary
protected static class AbstractOpenShiftResource.Parameters
           
protected  class AbstractOpenShiftResource.ServiceRequest
           
 
Constructor Summary
protected AbstractOpenShiftResource(IRestService service)
          Instantiates a new abstract open shift resource.
protected AbstractOpenShiftResource(IRestService service, Map<String,Link> links, Messages messages)
          Instantiates a new abstract open shift resource.
 
Method Summary
 String getCreationLog()
          Returns the log that was created when the resource was created.
protected  Link getLink(String linkName)
          Gets the link for the given name.
 Messages getMessages()
          Returns all the (creation log) messages.
 boolean hasCreationLog()
          Returns true if there is log about the creation of this resource.
protected  void setLinks(Map<String,Link> links)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.openshift.client.IOpenShiftResource
refresh
 

Constructor Detail

AbstractOpenShiftResource

protected AbstractOpenShiftResource(IRestService service)
Instantiates a new abstract open shift resource.

Parameters:
service - the service

AbstractOpenShiftResource

protected AbstractOpenShiftResource(IRestService service,
                                    Map<String,Link> links,
                                    Messages messages)
Instantiates a new abstract open shift resource.

Parameters:
service - the service
links - the links
Method Detail

setLinks

protected void setLinks(Map<String,Link> links)

getLink

protected Link getLink(String linkName)
                throws OpenShiftException
Gets the link for the given name. Throws OpenShiftRequestException if no link with this name exists within this resource.

This method is protected for testing purposes only.

Parameters:
linkName - the name of the link that shall get retrieved
Returns:
the link with the given name
Throws:
OpenShiftException - thrown if no link with the given name exists

hasCreationLog

public boolean hasCreationLog()
Description copied from interface: IOpenShiftResource
Returns true if there is log about the creation of this resource. Creation logs are only available at creation time. So resources that were retrieved while they already existed wont have a creation log.

Specified by:
hasCreationLog in interface IOpenShiftResource
Returns:
true if there's cretion log for this resource

getCreationLog

public String getCreationLog()
Description copied from interface: IOpenShiftResource
Returns the log that was created when the resource was created.

Specified by:
getCreationLog in interface IOpenShiftResource
Returns:
the log which reported the creation of this resource

getMessages

public Messages getMessages()
Description copied from interface: IOpenShiftResource
Returns all the (creation log) messages. These messages only exist at creation time. Existing cartridges, that were added in a prior session dont have any messages any more.

Specified by:
getMessages in interface IOpenShiftResource
Returns:
all messages by field
See Also:
IOpenShiftResource.getCreationLog()

OpenShift Java Client 2.5.0.Final

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