public class DeepRename extends XMLRequest
Modifier and Type | Class and Description |
---|---|
static class |
DeepRename.AbortIfNameExistsMode
AbortIfNameExistsMode.
|
static class |
DeepRename.IncludeFolderNamesMode
ChangeFolderNameMode.
|
Constructor and Description |
---|
DeepRename()
Constructs a
DeepRename 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.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
void |
setAbortIfNameExists(DeepRename.AbortIfNameExistsMode nameExistsMode)
Sets the mode for abortIfNameExists.
|
void |
setCleanPattern(java.lang.String cleanPattern)
Sets the new name.
|
void |
setIncludeFolderNames(DeepRename.IncludeFolderNamesMode includeFolderNamesMode)
Sets the mode for includeFolderNames.
|
void |
setNamePattern(java.lang.String namePattern)
Sets the name pattern of the object to rename.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleContent, handleResponse, ignoreMessageBox, send, setMessageBox, showQuarantineNotification
protected java.lang.String getSrc()
XMLRequest
getSrc
in class XMLRequest
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 sessionpublic void setNamePattern(java.lang.String namePattern)
namePattern
- wildcard with exactly one '*': like "BEGIN.*.END"
new object names will be created like "BEGIN.NAME.END
pattern must contain a '*', strings before/after the '*' are optionalpublic void setCleanPattern(java.lang.String cleanPattern)
cleanPattern
- wildcard with exactly one '*': like "BEFORE.*.AFTER"
old object names are used to create new object names using parameter namePattern, however,
cleanPatter is used to remove leading and/or trailing characters.
in this example, prefix/postfix "BEFORE." / ".AFTER" is removed from the begin / end of old names and
"BEGIN_" / "_END" is used as new prefix / postfix to create the new name,
e.g., old name "BEFORE.NAME.AFTER" is converted to new name "BEGIN.NAME.END"
pattern must contain a '*', strings before/after the '*' are optionalpublic void setAbortIfNameExists(DeepRename.AbortIfNameExistsMode nameExistsMode)
nameExistsMode
- One of the AbortIfNameExistsMode
defined in this classpublic void setIncludeFolderNames(DeepRename.IncludeFolderNamesMode includeFolderNamesMode)
includeFolderNamesMode
- One of the IncludeFolderNamesMode
defined in this classprotected 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
otherwise