public class CreateObject extends XMLRequest
Constructor and Description |
---|
CreateObject(UC4ObjectName name,
Template template,
IFolder folder)
Creates an UC4 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.
|
IFolder |
getFolder()
Returns the
IFolder where the object should be created. |
UC4ObjectName |
getName()
Returns the name of the object.
|
protected java.lang.String |
getSrc()
Returns the request source.
|
Template |
getTemplate()
Returns the template which is used to create the object in UC4.
|
java.lang.String |
getTitle()
Returns the title of the FOLD object, never
null . |
protected boolean |
isAllowedInClientZero()
This method is used internally.
|
void |
setMessageBox(MessageBox box)
Used in
XMLRequestSet to move the Message Box from a child request to the XMLRequestSet object. |
void |
setTitle(java.lang.String title)
With this method the title of a new folder can be set.
|
assertClientZero, assertServerVersion, checkClient, checkID, checkLnr, checkNull, checkSelStatisticsPrivilege, checkSystemOverviewPrivilege, checkUC4ObjectEmptyName, checkUC4ObjectName, createNATFor, createNATRequest, emptyAttributes, getAllMessageBoxes, getMessageBox, getRequestID, handleContent, handleResponse, ignoreMessageBox, send, showQuarantineNotification
public CreateObject(UC4ObjectName name, Template template, IFolder folder)
If a client (type CLNT) should be created, the name of the new object should not be client number.
For example C0123 for client 123. After the CLNT object has been created it can be renamed to the client number using the
RenameObject
class.
name
- Name of the new Objecttemplate
- Template
If the required Template constant is not defined in the com.uc4.api.Template
class the request TemplateList
can be used to get a Template object.folder
- Folder where the object should be storedpublic IFolder getFolder()
IFolder
where the object should be created.
This is the instance supplied in the CreateObject
contructor.IFolder
where the object should be created.public java.lang.String getTitle()
null
.public void setTitle(java.lang.String title)
title
- Title of the new Object (only supported for type FOLD).public UC4ObjectName getName()
UC4ObjectName
or a subclass.public Template getTemplate()
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 sessionprotected 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 void setMessageBox(MessageBox box)
XMLRequest
XMLRequestSet
to move the Message Box from a child request to the XMLRequestSet
object.setMessageBox
in class XMLRequest
box
- Message Box