|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ogf.graap.wsag.api.pattern.AbstractPattern org.ogf.graap.wsag.api.pattern.ChoosableComputeApplicationPattern
public class ChoosableComputeApplicationPattern
ChoosableComputeApplicationPattern The term compositor contains a set of compute applications, where the client must choose on application out of the set.
The protocol of this pattern 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 term compositor.
Subsequent modifications to the selected applications are possible by using functions such as
getSelectedApplication()
or getSelectedJobDefinition()
. These modifications are not
registered in the term compositor until updateSelectedApplication()
is executed.
<wsag:Template wsag:TemplateId="1"
xmlns:wsag="http://schemas.ggf.org/graap/2007/03/ws-agreement">
<wsag:Name>ComputeApplicationTemplate</wsag:Name>
<wsag:Context>
<wsag:ServiceProvider>AgreementResponder</wsag:ServiceProvider>
<wsag:TemplateId>1</wsag:TemplateId>
<wsag:TemplateName>ComputeApplicationTemplate</wsag:TemplateName>
</wsag:Context>
<wsag:Terms>
<wsag:All>
<wsag:ServiceDescriptionTerm wsag:Name="SDT_1"
wsag:ServiceName="SERVICE_1">
(Put your service description terms here ...)
</wsag:ServiceDescriptionTerm>
...
<wsag:ExactlyOne>
<wsag:ServiceDescriptionTerm wsag:Name="APPLICATION_SDT"
wsag:ServiceName="CHANGE_ME">
<jsdl:JobDefinition xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl">
<jsdl:JobDescription>
<jsdl:Application>
<jsdl:ApplicationName>MyApp</jsdl:ApplicationName>
<jsdl:ApplicationVersion></jsdl:ApplicationVersion>
<jsdl:Description>Description</jsdl:Description>
</jsdl:Application>
</jsdl:JobDescription>
</jsdl:JobDefinition>
</wsag:ServiceDescriptionTerm>
<wsag:ServiceDescriptionTerm wsag:Name="APPLICATION_SDT"
wsag:ServiceName="CHANGE_ME">
<jsdl:JobDefinition xmlns:jsdl="http://schemas.ggf.org/jsdl/2005/11/jsdl">
<jsdl:JobDescription>
<jsdl:Application>
<jsdl:ApplicationName></jsdl:ApplicationName>
<jsdl:ApplicationVersion></jsdl:ApplicationVersion>
<jsdl:Description>Description</jsdl:Description>
</jsdl:Application>
</jsdl:JobDescription>
</jsdl:JobDefinition>
</wsag:ServiceDescriptionTerm>
</wsag:ExactlyOne>
</wsag:All>
</wsag:Terms>
<wsag:CreationConstraints />
</wsag:Template>
Constructor Summary | |
---|---|
ChoosableComputeApplicationPattern(TermCompositorType termCompositor)
Instantiates the pattern for the given term compositor. |
Method Summary | |
---|---|
String |
getAppliationDescXPath()
|
String |
getAppliationXPath()
|
ApplicationType |
getSelectedApplication()
|
JobDefinitionType |
getSelectedJobDefinition()
|
ApplicationType[] |
listApplications()
Lists all applications in the term compositor. |
boolean |
selectApplication(ApplicationType application)
Selects the application in the term compositor. |
boolean |
selectApplication(String name,
String version)
Selects the application wit the given name and version in the term compositor. |
void |
setAppliationDescXPath(String appliationDescXPath)
|
void |
setAppliationXPath(String appliationXPath)
|
void |
updateSelectedApplication()
Updates the selected application in the term compositor. |
Methods inherited from class org.ogf.graap.wsag.api.pattern.AbstractPattern |
---|
getTermCompositor |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChoosableComputeApplicationPattern(TermCompositorType termCompositor)
termCompositor
- the term compositorMethod Detail |
---|
public JobDefinitionType getSelectedJobDefinition()
public ApplicationType getSelectedApplication()
public boolean selectApplication(ApplicationType application)
application
- the application to select
public boolean selectApplication(String name, String version)
name
- the application nameversion
- the application version
public void updateSelectedApplication()
public ApplicationType[] listApplications()
public void setAppliationDescXPath(String appliationDescXPath)
appliationDescXPath
- the appliationDescXPath to setpublic String getAppliationDescXPath()
public void setAppliationXPath(String appliationXPath)
appliationXPath
- the appliationXPath to setpublic String getAppliationXPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |