Package com.uc4.api

Class MessageBox

java.lang.Object
com.uc4.api.MessageBox

public class MessageBox extends Object
This class a represents a message box. A message box can be sent from the server as reply to a request. This class contains methods to get information about the message text.
  • Constructor Details

    • MessageBox

      public MessageBox(int nr, String insert, com.uc4.translate.Message translator)
      Constructs a MessageBox.
      Parameters:
      nr - Message number
      insert - Message insert
      translator - translator
  • Method Details

    • getInsert

      public String getInsert()
      Returns the insert of this message.
      Returns:
      insert
    • getNumber

      public int getNumber()
      Returns the number of this message.
      Returns:
      number
    • getText

      public String getText()
      Returns the translated message text. The messgage is translated using the logon language.
      Returns:
      text
    • getType

      public char getType()
      Returns the type of the message.
      Return valueDescription
      IInfo message. An info message means that there was no error.
      EError message, if a message box with "E" is returned the request was not executed successfully.
      AAbort, same meaning as E (error).
      WWarning. In this case the response can be empty or truncated. A search which returns too many rows is one case where a message box with type "W" is returned in addition to the data.
      QQuestion. In many cases this can be solved by re-sending the API request with different parameters. Example: Opening an object which has already been opened by another user returns U4006501 Object '?' is being edited by user '?' since '?'. \Do you want to open it for read only? To open the object read only (= reply yes) the OpenObject request should be sent with the read only flag set.
      CCaption, this type is used for labels and menu items. It is normally not used in message boxes.
      Returns:
      type A,E,I,W,Q,C
    • toString

      public String toString()
      Overrides:
      toString in class Object