Package com.uc4.communication.requests
Class CreateObject
java.lang.Object
com.uc4.communication.requests.XMLRequest
com.uc4.communication.requests.CreateObject
Creates a new UC4 Object.
-
Constructor Summary
ConstructorsConstructorDescriptionCreateObject(UC4ObjectName name, Template template, IFolder folder) Creates an UC4 Object. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateRequest(com.uc4.util.XMLDocument doc, Element request, ConnectionAttributes sessionInfo) Creates the XML Document for the request.Returns theIFolderwhere the object should be created.getName()Returns the name of the object.protected StringgetSrc()Returns the request source.Returns the template which is used to create the object in UC4.getTitle()Returns the title of the FOLD object, nevernull.protected booleanThis method is used internally.voidsetMessageBox(MessageBox box) Used inXMLRequestSetto move the Message Box from a child request to theXMLRequestSetobject.voidWith 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 Details
-
CreateObject
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 Details
-
getFolder
Returns theIFolderwhere the object should be created. This is the instance supplied in theCreateObjectcontructor.- Returns:
IFolderwhere the object should be created.
-
getTitle
Returns the title of the FOLD object, nevernull.- Returns:
- Folder title
-
setTitle
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
Returns the name of the object. The returned name is anUC4ObjectNameor a subclass.- Returns:
- UC4ObjectName containg the name of the object
-
getTemplate
Returns the template which is used to create the object in UC4.- Returns:
- Template used to create the object
-
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, 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
Description copied from class:XMLRequestUsed inXMLRequestSetto move the Message Box from a child request to theXMLRequestSetobject.- Overrides:
setMessageBoxin classXMLRequest- Parameters:
box- Message Box
-