org.ogf.graap.wsag.api.sla
Class AbstractComputeJobTemplate

java.lang.Object
  extended by org.ogf.graap.wsag.api.types.WSAGXmlType
      extended by org.ogf.graap.wsag.api.types.TemplateType
          extended by org.ogf.graap.wsag.api.sla.AbstractComputeJobTemplate
All Implemented Interfaces:
AgreementTemplate
Direct Known Subclasses:
AdvanceReservationComputeJobTemplate, ComputeJobTemplate

public abstract class AbstractComputeJobTemplate
extends TemplateType

AbstractComputeJobTemplate The protocol of this class is as follows. First one must select an application using selectApplication(ApplicationType) or selectApplication(String, String). This service selection is instantly registered in the underlying template.

Subsequent modifications to the selected applications are possible by using functions such as getSelectedApplication() or getSelectedJobDefinition(). Modifications to the returned objects are not registered in the template until updateSelectedApplication() is executed.

Author:
Oliver Waeldrich

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ogf.graap.wsag.api.types.WSAGXmlType
WSAGXmlType.Wsag4jObservable
 
Constructor Summary
AbstractComputeJobTemplate(AgreementTemplateType template)
           
 
Method Summary
 ResourcesType getResourceDefinition()
           
 ApplicationType getSelectedApplication()
           
 JobDefinitionType getSelectedJobDefinition()
           
 ApplicationType[] listApplications()
           
 boolean selectApplication(ApplicationType application)
           
 boolean selectApplication(String name, String version)
           
 void updateSelectedApplication()
           
 
Methods inherited from class org.ogf.graap.wsag.api.types.TemplateType
getAgreementId, getContext, getCreationConstraints, getName, getTemplateId, getTerms, getXMLObject, setAgreementId, setContext, setCreationConstraints, setName, setTemplateId, setTerms, validate
 
Methods inherited from class org.ogf.graap.wsag.api.types.WSAGXmlType
addObserver, countObservers, deleteObserver, deleteObservers, getObservable, hasChanged, notifyObservers, notifyObservers, processTemplate, setChanged, setObservable, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractComputeJobTemplate

public AbstractComputeJobTemplate(AgreementTemplateType template)
Parameters:
template - the XML template object
Method Detail

getResourceDefinition

public ResourcesType getResourceDefinition()
Returns:
the resource definition
See Also:
ComputeResourcePattern.getResourceDefinition()

getSelectedApplication

public ApplicationType getSelectedApplication()
Returns:
the selected application
See Also:
ChoosableComputeApplicationPattern.getSelectedApplication()

listApplications

public ApplicationType[] listApplications()
Returns:
a list of all available application
See Also:
ChoosableComputeApplicationPattern.listApplications()

selectApplication

public boolean selectApplication(ApplicationType application)
Parameters:
application - the application to select
Returns:
true if the application was selected, otherwise false
See Also:
ChoosableComputeApplicationPattern.selectApplication(org.ggf.schemas.jsdl.x2005.x11.jsdl.ApplicationType)

selectApplication

public boolean selectApplication(String name,
                                 String version)
Parameters:
name - application name
version - application version
Returns:
true if the chosen application was selected, otherwise false
See Also:
ChoosableComputeApplicationPattern.selectApplication(java.lang.String, java.lang.String)

updateSelectedApplication

public void updateSelectedApplication()
See Also:
ChoosableComputeApplicationPattern.updateSelectedApplication()

getSelectedJobDefinition

public JobDefinitionType getSelectedJobDefinition()
Returns:
the job definition that contains the currently selected application
See Also:
ChoosableComputeApplicationPattern.getSelectedJobDefinition()


Copyright © 2008-2012. All Rights Reserved.