Package com.uc4.api

Class MessageBox


  • public class MessageBox
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      MessageBox​(int nr, java.lang.String insert, com.uc4.translate.Message translator)
      Constructs a MessageBox.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getInsert()
      Returns the insert of this message.
      int getNumber()
      Returns the number of this message.
      java.lang.String getText()
      Returns the translated message text.
      char getType()
      Returns the type of the message.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MessageBox

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

      • getInsert

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

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

        public java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object