public class ImportObject extends XMLRequest
Keep in mind that the size of the XML file must not exceed 30000 KB. Values below this limit may also be defined in the UC4 Variable UC_SYSTEM_SETTINGS.
The importing and exporting functionality is not suitable for mass transports! Use the UC4 Transport Case instead for this purpose.
Constructor and Description |
---|
ImportObject(ByteBuffer byteBuffer,
IFolder folder,
boolean overwriteObject,
boolean keepFolderLinks)
Creates a request to import UC4 Objects.
|
ImportObject(File exportFile,
IFolder folder,
boolean overwriteObject,
boolean keepFolderLinks)
Creates a request to import UC4 Objects.
|
Modifier and Type | Method and Description |
---|---|
void |
addImportedBinary(String resname,
ByteBuffer buffer)
When importing via ByteBuffer, add additional files to this request
|
Document |
exportDocument()
Returns an XML DOM which represents the exported object if this instance was created using the
ExportObject.getImportRequest() method. |
String |
getImportMessages()
Returns import messages.
|
Iterator<UploadBinary> |
getResourceList()
|
getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send, showQuarantineNotification
public ImportObject(File exportFile, IFolder folder, boolean overwriteObject, boolean keepFolderLinks) throws SAXException, IOException
exportFile
- File (XML) containing the objectsfolder
- Folder in which the objects should be createdoverwriteObject
- If true an existing object with this name will be replacedkeepFolderLinks
- If true, existing folder links will be keptIOException
- In case of an I/O ErrorSAXException
- In case of an invalid file contentpublic ImportObject(ByteBuffer byteBuffer, IFolder folder, boolean overwriteObject, boolean keepFolderLinks) throws SAXException, IOException
byteBuffer
- ByteBuffer (XML) containing the objectsfolder
- Folder in which the objects should be createdoverwriteObject
- If true an existing object with this name will be replacedkeepFolderLinks
- If true, existing folder links will be keptIOException
- In case of an I/O ErrorSAXException
- In case of an invalid file contentpublic Document exportDocument()
ExportObject.getImportRequest()
method.public String getImportMessages()
public Iterator<UploadBinary> getResourceList()
Iterator
with items of UploadBinary
objects after invoking the ImportObject
instance.
Use this Iterator
to additionally upload all related resource items of each STORE object containing within the import.Iterator
containing all resource items of each imported STORE object.public void addImportedBinary(String resname, ByteBuffer buffer)
resname
- Resource namebuffer
- ContentCopyright © 2021. All rights reserved.