net.sf.sail.webapp.dao.sds.impl
Class SdsOfferingCreateCommandHttpRestImpl

java.lang.Object
  extended by net.sf.sail.webapp.dao.sds.impl.AbstractHttpRestCommand
      extended by net.sf.sail.webapp.dao.sds.impl.SdsOfferingCreateCommandHttpRestImpl
All Implemented Interfaces:
SdsCommand<SdsOffering,HttpPostRequest>, SdsOfferingCreateCommand

public class SdsOfferingCreateCommandHttpRestImpl
extends AbstractHttpRestCommand
implements SdsOfferingCreateCommand

Implementation of SdsOfferingCreateCommand which creates a user in the Sail Data Service (uses Http REST). This class is thread-safe.

Version:
$Id$
Author:
Laurel Williams

Field Summary
 
Fields inherited from class net.sf.sail.webapp.dao.sds.impl.AbstractHttpRestCommand
EMPTY_STRING_MAP, logger, REQUEST_HEADERS_ACCEPT, REQUEST_HEADERS_CONTENT, transport
 
Constructor Summary
SdsOfferingCreateCommandHttpRestImpl()
           
 
Method Summary
 SdsOffering execute(HttpPostRequest httpRequest)
          Executes the commmand based on data contructed via the generateRequest method.
 HttpPostRequest generateRequest()
          Puts together the request data and the sds object data required to execute the commmand.
 void setSdsOffering(SdsOffering sdsOffering)
           
 
Methods inherited from class net.sf.sail.webapp.dao.sds.impl.AbstractHttpRestCommand
convertXMLInputStreamToString, convertXmlInputStreamToXmlDocument, setTransport
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SdsOfferingCreateCommandHttpRestImpl

public SdsOfferingCreateCommandHttpRestImpl()
Method Detail

setSdsOffering

public void setSdsOffering(SdsOffering sdsOffering)
Specified by:
setSdsOffering in interface SdsOfferingCreateCommand
See Also:
SdsJnlpCreateCommand.setSdsJnlp(net.sf.sail.webapp.domain.sds.SdsJnlp)

generateRequest

public HttpPostRequest generateRequest()
Description copied from interface: SdsCommand
Puts together the request data and the sds object data required to execute the commmand.

Specified by:
generateRequest in interface SdsCommand<SdsOffering,HttpPostRequest>
Returns:
The AbstractHttpRequest constructed from the sds object.
See Also:
SdsCommand.generateRequest()

execute

public SdsOffering execute(HttpPostRequest httpRequest)
Description copied from interface: SdsCommand
Executes the commmand based on data contructed via the generateRequest method.

Specified by:
execute in interface SdsCommand<SdsOffering,HttpPostRequest>
Returns:
The data retrieved from sds.
See Also:
net.sf.sail.webapp.dao.sds.SdsCommand#execute()


Copyright © 2012. All Rights Reserved.