public class ExportObject extends XMLRequest
Constructor and Description |
---|
ExportObject(IFolder[] folders,
java.io.File export,
boolean exportLinks)
Exports a list of UC4 Folders.
|
ExportObject(IFolder folder,
java.io.File export,
boolean exportLinks)
Exports a single folder structure.
|
ExportObject(UC4ObjectName[] names,
java.io.File export)
Exports a list of UC4 Objects.
|
ExportObject(UC4ObjectName[] names,
java.util.List<IFolder> folders,
java.io.File export,
boolean exportLinks)
Export given folder list and objects
|
ExportObject(UC4ObjectName name,
java.io.File export)
Exports a single Object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
Creates the XML Document for the request.
|
java.nio.ByteBuffer |
getBinaryContent()
Returns the file content as
ByteBuffer . |
java.lang.Exception |
getExportException()
Returns the
Exception that occured during the export or null
if the export was successful. |
ImportObject |
getImportRequest(IFolder folder,
boolean overwriteObject,
boolean keepFolderLinks)
Creates an ImportObject request from the export.
|
java.util.Iterator<DownloadBinary> |
getResourceList()
|
protected java.lang.String |
getSrc()
Returns the request source.
|
protected void |
handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session) |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
void |
setExportLinksEnabled(boolean exportLinksEnabled)
Sets the export links enabled.
|
boolean |
wasSuccessful()
Returns
true if the file was saved successfully. |
protected void |
writeExportXml(com.uc4.util.XMLDocument doc,
java.io.OutputStream out,
ConnectionAttributes session,
boolean isExportAsFile) |
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
public ExportObject(UC4ObjectName name, java.io.File export)
name
- Name of the UC4 Objectexport
- Export filepublic ExportObject(UC4ObjectName[] names, java.io.File export)
names
- UC4 Objects which should be exportedexport
- Export filepublic ExportObject(UC4ObjectName[] names, java.util.List<IFolder> folders, java.io.File export, boolean exportLinks)
names
- UC4 Objects which should be exportedfolders
- UC4 folder Objects which should be exportedexport
- Export fileexportLinks
- includes objects where the home folder is not the export folder but as an link insidepublic ExportObject(IFolder folder, java.io.File export, boolean exportLinks)
folder
- UC4 folder Object which should be exportedexport
- Export fileexportLinks
- includes objects where the home folder is not the export folder but as an link insidepublic ExportObject(IFolder[] folders, java.io.File export, boolean exportLinks)
folders
- UC4 Folders which should be exportedexport
- Export fileexportLinks
- includes objects where the home folder is not the export folder but as an link insidepublic ImportObject getImportRequest(IFolder folder, boolean overwriteObject, boolean keepFolderLinks)
folder
- Destination folderoverwriteObject
- flag to define if the object should be overwrittenkeepFolderLinks
- If true, existing folder links will be keptnull
if the output is saved in a file.protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)
XMLRequest
createRequest
in class XMLRequest
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the sessionprotected void handleContent(com.uc4.util.XMLDocument doc, ConnectionAttributes session)
handleContent
in class XMLRequest
protected void writeExportXml(com.uc4.util.XMLDocument doc, java.io.OutputStream out, ConnectionAttributes session, boolean isExportAsFile) throws java.io.IOException
java.io.IOException
public boolean wasSuccessful()
true
if the file was saved successfully.
If this method returns false
the method getExportException
can be used to get the exception which occured during the export.public java.lang.Exception getExportException()
Exception
that occured during the export or null
if the export was successful.public java.nio.ByteBuffer getBinaryContent()
ByteBuffer
.public void setExportLinksEnabled(boolean exportLinksEnabled)
exportLinksEnabled
- the new export links enabledprotected java.lang.String getSrc()
XMLRequest
getSrc
in class XMLRequest
protected boolean isAllowedInClientZero()
XMLRequest
XMLRequest
is allowed in client 0.
The default implementation returns false
, subclasses may override.isAllowedInClientZero
in class XMLRequest
true
if this request is allowed in client 0, false
otherwisepublic java.util.Iterator<DownloadBinary> getResourceList()
Iterator
with items of DownloadBinary
objects after invoking the ExportObject
instance.
Use this Iterator
to additionally download all related resource items of each STORE object containing within the export.Iterator
containing all resource items of each exported STORE object.