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 Details

    • 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 Object
      template - 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 stored
  • Method Details

    • getFolder

      public IFolder getFolder()
      Returns the IFolder where the object should be created. This is the instance supplied in the CreateObject contructor.
      Returns:
      IFolder where the object should be created.
    • getTitle

      public String getTitle()
      Returns the title of the FOLD object, never null.
      Returns:
      Folder title
    • setTitle

      public void setTitle(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 an UC4ObjectName 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 String getSrc()
      Description copied from class: XMLRequest
      Returns the request source. This method is used internally.
      Specified by:
      getSrc in class XMLRequest
      Returns:
      Source
    • createRequest

      protected void createRequest(com.uc4.util.XMLDocument doc, 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 class XMLRequest
      Parameters:
      doc - Document, used to create new Elements
      request - Request Element - classes append information to this request element
      sessionInfo - Information about the session
    • isAllowedInClientZero

      protected boolean isAllowedInClientZero()
      Description copied from class: XMLRequest
      This method is used internally. Tests if this XMLRequest is allowed in client 0. The default implementation returns false, subclasses may override.
      Overrides:
      isAllowedInClientZero in class XMLRequest
      Returns:
      true if this request is allowed in client 0, false otherwise
    • setMessageBox

      public void setMessageBox(MessageBox box)
      Description copied from class: XMLRequest
      Used in XMLRequestSet to move the Message Box from a child request to the XMLRequestSet object.
      Overrides:
      setMessageBox in class XMLRequest
      Parameters:
      box - Message Box