Package com.uc4.communication.requests
Class RenameObject
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.RenameObject
Renames an existing UC4 Object.
-
Constructor Summary
ConstructorsConstructorDescriptionRenameObject
(IFolder oldName, UC4ObjectName newName) This constructor is used to rename folders.RenameObject
(IFolder oldName, UC4ObjectName newName, String title) This constructor is used to rename folders.RenameObject
(UC4ObjectName oldName, UC4ObjectName newName, IFolder folder) Deprecated.Use RenameObject(UC4ObjectName oldName, UC4ObjectName newName, IFolder folder, String title) insteadRenameObject
(UC4ObjectName oldName, UC4ObjectName newName, IFolder folder, String title) Constructs aRenameObject
. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
createRequest
(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.protected Element
protected String
getSrc()
Returns the request source.protected void
handleContent
(com.uc4.util.XMLDocument doc, ConnectionAttributes session) Sub classes extract the values from the XML document and provide public getter methods.protected boolean
protected boolean
This method is used internally.void
Method to rename the object forcefully.void
setRenameIfUsed
(boolean renameIfUsed) The parameterrenameIfUsed
can be set tofalse
to prevent objects from beeing renamend if they are used in other objects.Methods inherited from class com.uc4.communication.requests.XMLRequest
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleResponse, send, setMessageBox, showQuarantineNotification
-
Constructor Details
-
RenameObject
Deprecated.Use RenameObject(UC4ObjectName oldName, UC4ObjectName newName, IFolder folder, String title) insteadConstructs aRenameObject
. This constructor is used to rename UC4 Objects except folders. To rename a folder use the constructorRenameObject(IFolder oldName, UC4ObjectName newName)
.- Parameters:
oldName
- Name of the UC4 Object which should be renamed.newName
- New namefolder
- Folder containing the object
-
RenameObject
Constructs aRenameObject
. This constructor is used to rename UC4 Objects except folders. To rename a folder use the contructorRenameObject(IFolder oldName, UC4ObjectName newName)
.- Parameters:
oldName
- Name of the UC4 Object which should be renamed.newName
- New namefolder
- Folder containing the objecttitle
- New title of the object
-
RenameObject
This constructor is used to rename folders.- Parameters:
oldName
- Folder which should be renamednewName
- New name of the folder
-
RenameObject
This constructor is used to rename folders.- Parameters:
oldName
- Folder which should be renamednewName
- New name of the foldertitle
- New title of the folder
-
-
Method Details
-
setRenameIfUsed
public void setRenameIfUsed(boolean renameIfUsed) The parameterrenameIfUsed
can be set tofalse
to prevent objects from beeing renamend if they are used in other objects. The default behavior is to rename without searching for the use.- Parameters:
renameIfUsed
- If set to false a message box is returned if the object is used.
-
setForceRename
public void setForceRename()Method to rename the object forcefully. -
getSrc
Description copied from class:XMLRequest
Returns the request source. This method is used internally.- Specified by:
getSrc
in classXMLRequest
- Returns:
- Source
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Description copied from class:XMLRequest
Creates the XML Document for the request. This method is used internally.- Specified by:
createRequest
in classXMLRequest
- Parameters:
doc
- Document, used to create new Elementsrequest
- Request Element - classes append information to this request elementsessionInfo
- Information about the session
-
handleContent
Description copied from class:XMLRequest
Sub classes extract the values from the XML document and provide public getter methods.- Overrides:
handleContent
in classXMLRequest
- Parameters:
doc
- XML Documentsession
- Info about the user session
-
getReplaceRequest
-
ignoreMessageBox
protected boolean ignoreMessageBox()- Overrides:
ignoreMessageBox
in classXMLRequest
-
isAllowedInClientZero
protected boolean isAllowedInClientZero()Description copied from class:XMLRequest
This method is used internally. Tests if thisXMLRequest
is allowed in client 0. The default implementation returnsfalse
, subclasses may override.- Overrides:
isAllowedInClientZero
in classXMLRequest
- Returns:
true
if this request is allowed in client 0,false
otherwise
-