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 voidcreateRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)Creates the XML Document for the request.IFoldergetFolder()Returns theIFolderwhere the object should be created.UC4ObjectNamegetName()Returns the name of the object.protected java.lang.StringgetSrc()Returns the request source.TemplategetTemplate()Returns the template which is used to create the object in UC4.java.lang.StringgetTitle()Returns the title of the FOLD object, nevernull.protected booleanisAllowedInClientZero()This method is used internally.voidsetMessageBox(MessageBox box)Used inXMLRequestSetto move the Message Box from a child request to theXMLRequestSetobject.voidsetTitle(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
RenameObjectclass.- Parameters:
name- Name of the new Objecttemplate- Template If the required Template constant is not defined in thecom.uc4.api.Templateclass the requestTemplateListcan be used to get a Template object.folder- Folder where the object should be stored
-
-
Method Detail
-
getFolder
public IFolder getFolder()
Returns theIFolderwhere the object should be created. This is the instance supplied in theCreateObjectcontructor.- Returns:
IFolderwhere 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 anUC4ObjectNameor 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:XMLRequestReturns the request source. This method is used internally.- Specified by:
getSrcin classXMLRequest- Returns:
- Source
-
createRequest
protected void createRequest(com.uc4.util.XMLDocument doc, org.w3c.dom.Element request, ConnectionAttributes sessionInfo)Description copied from class:XMLRequestCreates the XML Document for the request. This method is used internally.- Specified by:
createRequestin 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:XMLRequestThis method is used internally. Tests if thisXMLRequestis allowed in client 0. The default implementation returnsfalse, subclasses may override.- Overrides:
isAllowedInClientZeroin classXMLRequest- Returns:
trueif this request is allowed in client 0,falseotherwise
-
setMessageBox
public void setMessageBox(MessageBox box)
Description copied from class:XMLRequestUsed inXMLRequestSetto move the Message Box from a child request to theXMLRequestSetobject.- Overrides:
setMessageBoxin classXMLRequest- Parameters:
box- Message Box
-
-