public class DuplicateObject extends XMLRequest
| Constructor and Description |
|---|
DuplicateObject(UC4ObjectName name,
UC4ObjectName newName,
IFolder folder)
Creates a new
DuplicateObject request. |
DuplicateObject(UC4ObjectName name,
UC4ObjectName newName,
IFolder folder,
java.lang.String title)
Creates a new
DuplicateObject request. |
DuplicateObject(UC4Object object,
UC4ObjectName newName,
IFolder folder)
Creates a new
DuplicateObject request. |
| 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.lang.String |
getID()
Returns the ID (OH_IDNR) of the created object.
|
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.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotificationpublic DuplicateObject(UC4ObjectName name, UC4ObjectName newName, IFolder folder)
DuplicateObject request.name - Name of the UC4 Object which should be duplicatednewName - Name of the created copyfolder - Destination folderpublic DuplicateObject(UC4Object object, UC4ObjectName newName, IFolder folder)
DuplicateObject request.
This request closes the given UC4Object, duplicates its representation in the database and opens the duplicated object.
The given UC4Object will be replaced by the duplicated.
Be aware that changes made on the given UC4Object but not saved will not be duplicated. Therefore you have to save the duplicated object as well.object - UC4 Object which should be duplicatednewName - Name of the created copyfolder - Destination folderjava.lang.IllegalArgumentException - if object is nullpublic DuplicateObject(UC4ObjectName name, UC4ObjectName newName, IFolder folder, java.lang.String title)
DuplicateObject request.name - UC4 Object which should be duplicatednewName - Name of the created copyfolder - Destination foldertitle - Title for new objectprotected void createRequest(com.uc4.util.XMLDocument doc,
org.w3c.dom.Element request,
ConnectionAttributes sessionInfo)
XMLRequestcreateRequest in class XMLRequestdoc - Document, used to create new Elementsrequest - Request Element - classes append information to this request elementsessionInfo - Information about the sessionprotected java.lang.String getSrc()
XMLRequestgetSrc in class XMLRequestprotected void handleContent(com.uc4.util.XMLDocument doc,
ConnectionAttributes session)
handleContent in class XMLRequestpublic java.lang.String getID()
null if this request has not been sent or if the duplication failedprotected boolean isAllowedInClientZero()
XMLRequestXMLRequest is allowed in client 0.
The default implementation returns false, subclasses may override.isAllowedInClientZero in class XMLRequesttrue if this request is allowed in client 0, false otherwise