Class LangHints

All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>, SequencedMap<String,String>

public class LangHints extends LinkedHashMap<String,String>
This class implements the map that contains the hints that the user - if the system has the correct setup, and the user has this functionality enabled - can send to a defined mail address, to contribute to manage translations by suggesting missing, incorrect or incomplete situations directly on the applicative page.
See Also:
  • Field Details

    • _text

      protected String _text
  • Constructor Details

    • LangHints

      public LangHints()
      Creates an empty LangHints map with initial capacity set to 0
  • Method Details

    • getText

      public String getText()
      Returns the text that the user can add as a message to the hints email
      Returns:
      The message text
    • setText

      public void setText(String text)
      Sets the text that the user can add as a message to the hints email
      Parameters:
      text - The message text
    • editable

      public boolean editable(Identity id)
      Checks if the user can send the email that contains the hints. The Identity must have a not empty sender email (Identity.getEmail()) and a not empty recipient email (Lang.getHintsMailAddress())
      Parameters:
      id - The Identity of the user currently logged in the application
      Returns:
      true if the user can send the email, false otherwise
    • sendHintsEmail

      public void sendHintsEmail(Identity id) throws EmailException
      Sends an email that contains the hints to the address returned by the method Lang.getHintsMailAddress().
      This functionality is available only if the system has the correct setup for the collaborative managing of the translations: the user must have the foundation.lang.hints function, and editable(overit.geocall.util.Identity) must return true.
      Parameters:
      id - The Identity of the user currently logged in the application
      Throws:
      EmailException - Exception that can occurs sending the email
    • clear

      public void clear()
      Removes all of the entries from the LanghHints and empties the text string
      Specified by:
      clear in interface Map<String,String>
      Overrides:
      clear in class LinkedHashMap<String,String>
    • anyContent

      public boolean anyContent()
      Checks if there is a some content in the LangHints
      Returns:
      true if the size of the map is greater than 0 or the text string is not empty, false otherwise