org.ogf.graap.wsag.api.rest
Interface RestNegotiation

All Known Implementing Classes:
RestNegotiationFacade

@DataBinding(value=org.apache.cxf.xmlbeans.XmlBeansDataBinding.class)
public interface RestNegotiation

Interface definition of the RESTful agreement service.

Author:
owaeld

Method Summary
 void advertise(AdvertiseInputDocument offers)
          Advertises a set of negotiation offers.
 void destroy()
          Destroys the agreement REST resource.
 NegotiationPropertiesDocument getNegotiableTemplates()
          A negotiation instance supports zero or more templates that can be used to create negotiation offers.
 NegotiationPropertiesDocument getNegotiationContext()
          Returns the context of this negotiation process.
 NegotiationPropertiesDocument getNegotiationOffers()
          Returns a history of exchanged offers in this negotiation process.
 NegotiateOutputDocument negotiate(NegotiateInputDocument offers)
          Negotiates a set of agreement offers.
 void terminate(TerminateInputDocument reason)
          Terminates the agreement if permitted.
 

Method Detail

getNegotiationContext

NegotiationPropertiesDocument getNegotiationContext()
                                                    throws ResourceUnknownException,
                                                           ResourceUnavailableException
Returns the context of this negotiation process.

Returns:
the negotiation context
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getNegotiableTemplates

NegotiationPropertiesDocument getNegotiableTemplates()
                                                     throws ResourceUnknownException,
                                                            ResourceUnavailableException
A negotiation instance supports zero or more templates that can be used to create negotiation offers. In case of a negotiation process, these templates are a subset of the templates offered by an agreement factory. Only these templates are returned for which a proper negotiation strategy is implemented. in case of agreement re negotiation, a negotiation instance may return one ore more templates to bootstrap the negotiation process.

Returns:
the negotiable templates
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

getNegotiationOffers

NegotiationPropertiesDocument getNegotiationOffers()
                                                   throws ResourceUnknownException,
                                                          ResourceUnavailableException
Returns a history of exchanged offers in this negotiation process.

Returns:
the offers exchanged in this negotiation
Throws:
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

negotiate

NegotiateOutputDocument negotiate(NegotiateInputDocument offers)
                                  throws NegotiationException,
                                         ResourceUnknownException,
                                         ResourceUnavailableException
Negotiates a set of agreement offers.

Parameters:
offers - the offers to negotiate
Returns:
a set of counter offers
Throws:
NegotiationException - an error occured processing the negotiation request
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

advertise

void advertise(AdvertiseInputDocument offers)
               throws NegotiationException,
                      ResourceUnknownException,
                      ResourceUnavailableException
Advertises a set of negotiation offers.

Parameters:
offers - the offers to advertise
Throws:
NegotiationException - an error occured processing the negotiation request
ResourceUnknownException - the remote resource is unknown
ResourceUnavailableException - the remote resource is unavailable

terminate

void terminate(TerminateInputDocument reason)
               throws ResourceUnknownException,
                      ResourceUnavailableException
Terminates the agreement if permitted.

Parameters:
reason - the termination reason
Throws:
ResourceUnknownException - the referenced resource does not exist
ResourceUnavailableException - the referenced resource is not available

destroy

void destroy()
             throws ResourceUnknownException,
                    ResourceUnavailableException
Destroys the agreement REST resource.

Throws:
ResourceUnknownException - the referenced resource does not exist
ResourceUnavailableException - the referenced resource is not available


Copyright © 2008-2012. All Rights Reserved.