Package com.uc4.communication.requests
Class CreateObject
- java.lang.Object
-
- com.uc4.communication.requests.XMLRequest
-
- com.uc4.communication.requests.CreateObject
-
public class CreateObject extends XMLRequest
Creates a new UC4 Object.
-
-
Constructor Summary
Constructors Constructor Description CreateObject(UC4ObjectName name, Template template, IFolder folder)
Creates an UC4 Object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 theIFolder
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, nevernull
.protected boolean
isAllowedInClientZero()
This method is used internally.void
setMessageBox(MessageBox box)
Used inXMLRequestSet
to move the Message Box from a child request to theXMLRequestSet
object.void
setTitle(java.lang.String title)
With this method the title of a new folder can be set.-
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, handleContent, handleResponse, ignoreMessageBox, send, showQuarantineNotification
-
-
-
-
Constructor Detail
-
CreateObject
public CreateObject(UC4ObjectName name, Template template, IFolder folder)
Creates an UC4 Object.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.- Parameters:
name
- Name of the new Objecttemplate
- Template If the required Template constant is not defined in thecom.uc4.api.Template
class the requestTemplateList
can be used to get a Template object.folder
- Folder where the object should be stored
-
-
Method Detail
-
getFolder
public IFolder getFolder()
Returns theIFolder
where the object should be created. This is the instance supplied in theCreateObject
contructor.- Returns:
IFolder
where the object should be created.
-
getTitle
public java.lang.String getTitle()
Returns the title of the FOLD object, nevernull
.- Returns:
- Folder title
-
setTitle
public void setTitle(java.lang.String title)
With this method the title of a new folder can be set.- Parameters:
title
- Title of the new Object (only supported for type FOLD).
-
getName
public UC4ObjectName getName()
Returns the name of the object. The returned name is anUC4ObjectName
or a subclass.- Returns:
- UC4ObjectName containg the name of the object
-
getTemplate
public Template getTemplate()
Returns the template which is used to create the object in UC4.- Returns:
- Template used to create the object
-
getSrc
protected java.lang.String 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, org.w3c.dom.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
-
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
-
setMessageBox
public void setMessageBox(MessageBox box)
Description copied from class:XMLRequest
Used inXMLRequestSet
to move the Message Box from a child request to theXMLRequestSet
object.- Overrides:
setMessageBox
in classXMLRequest
- Parameters:
box
- Message Box
-
-