Class ItemImportController
- java.lang.Object
-
- com.hybris.datahub.core.rest.controllers.ItemImportController
-
@Controller @RequestMapping("/import/") public class ItemImportController extends java.lang.ObjectA REST resource for uploading and executing IMPEX files.
-
-
Constructor Summary
Constructors Constructor Description ItemImportController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidimportFromStream(java.lang.String poolName, java.lang.Long publicationId, java.lang.String resultCallbackUrl, java.io.InputStream inputStream)Performs upload of an ImpEx file and import of the items containing in the file.protected byte[]inputStreamToByteArray(java.io.InputStream inputStream)
-
-
-
Method Detail
-
importFromStream
@RequestMapping(value="/pools/{poolName}/publications/{publicationId}", method=PUT, consumes="application/octet-stream", produces={"application/json","application/xml"}) @ResponseStatus(OK) public void importFromStream(@PathVariable("poolName") java.lang.String poolName, @PathVariable("publicationId") java.lang.Long publicationId, @RequestHeader("Result-Callback-URL") java.lang.String resultCallbackUrl, java.io.InputStream inputStream) throws java.io.IOExceptionPerforms upload of an ImpEx file and import of the items containing in the file.- Parameters:
poolName- pool whose items are being importedpublicationId- the publicationIdresultCallbackUrl- the callback URL to use when returning theItemImportResultinputStream- input stream to the impex script- Throws:
java.io.IOException
-
inputStreamToByteArray
protected byte[] inputStreamToByteArray(java.io.InputStream inputStream) throws java.io.IOException- Throws:
java.io.IOException
-
-