|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.negotiation.Template
public class Template
A wrapper class around the wsagreement.Template type. Allows for some more high-level access to the template fields.
A Template is a document that is presented by the service providers and mediators in AgentScape. It contains definitions of services that are offered, and the restrictions that apply to the range of values that can be set in these fields. To services that are defined in a template can be obtained by the methodsgetServiceNames(), getService(java.lang.String) and getServices().
The Service objects that are returned from these functions
describe the service, properties and restrictions of these services.
| Constructor Summary | |
|---|---|
Template(Template template)
Create a new Template, wrapping a wsagreement template. |
|
| Method Summary | |
|---|---|
boolean |
definesServiceName(java.lang.String serviceName)
A check to see if the template defines a specific SDT. |
Request |
generateRequest()
Create a Request based on this template. |
Request |
generateRequest(java.lang.Object initiator)
Create a Request based on this template. |
java.lang.String |
getName()
Obtain the template name. |
AgentScapeID |
getPublisher()
Obtain the AgentScapeID of the party that published this template. |
Service |
getService(java.lang.String serviceName)
Obtain the service definition of a service defined in this template. |
java.util.List<java.lang.String> |
getServiceNames()
List the names of all the services that are described in this template. |
java.util.List<Service> |
getServices()
Obtain a list of the services defined in this template. |
Template |
getTemplate()
Obtain the native form of the template. |
static void |
main(java.lang.String[] args)
Main method. |
static Template |
readTemplate(java.io.File file)
Read a template from a file. |
java.lang.String |
toString()
Get the XML marshalled document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Template(Template template)
| Method Detail |
|---|
public Template getTemplate()
Template
containing the native format of the template.public Request generateRequest()
Request based on this template. This copies the
template information from the Template to the Request. Initially,
no service properties are set in the Request.
public Request generateRequest(java.lang.Object initiator)
Request based on this template. This copies the
template information from the Template to the Request. This template
is empty except for the agreement initiator field that is set to the
value of initiator.
initiator - The party that initiated the request.
public java.lang.String getName()
public java.util.List<java.lang.String> getServiceNames()
getService(String)
to obtain the respective service with the associated name.
public boolean definesServiceName(java.lang.String serviceName)
true if the service is defined in the templatefalse if the service is not defined in the template
public Service getService(java.lang.String serviceName)
throws TemplateException
serviceName - The name of the type of service (as defined in
AgentScapeResources).
Service associated with serviceName.
TemplateExceptionpublic java.util.List<Service> getServices()
public AgentScapeID getPublisher()
public java.lang.String toString()
toString in class java.lang.Objectpublic static Template readTemplate(java.io.File file)
toString()).
file - The file containing the template in XML format.
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||