Class ItemImportController
java.lang.Object
com.hybris.datahub.core.rest.controllers.ItemImportController
A REST resource for uploading and executing IMPEX files.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidimportFromStream(String poolName, Long publicationId, String resultCallbackUrl, InputStream inputStream) Performs upload of an ImpEx file and import of the items containing in the file.protected byte[]inputStreamToByteArray(InputStream inputStream)
-
Constructor Details
-
ItemImportController
public ItemImportController()
-
-
Method Details
-
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") String poolName, @PathVariable("publicationId") Long publicationId, @RequestHeader("Result-Callback-URL") String resultCallbackUrl, InputStream inputStream) throws IOException Performs 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:
IOException
-
inputStreamToByteArray
- Throws:
IOException
-