Package overit.geocall.lang
Class LangHints
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,,String> SequencedMap<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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if there is a some content in the LangHintsvoidclear()Removes all of the entries from the LanghHints and empties the text stringbooleanChecks if the user can send the email that contains the hints.getText()Returns the text that the user can add as a message to the hints emailvoidSends an email that contains the hints to the address returned by the methodLang.getHintsMailAddress().voidSets the text that the user can add as a message to the hints emailMethods inherited from class java.util.LinkedHashMap
containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Field Details
-
_text
-
-
Constructor Details
-
LangHints
public LangHints()Creates an empty LangHints map with initial capacity set to 0
-
-
Method Details
-
getText
Returns the text that the user can add as a message to the hints email- Returns:
- The message text
-
setText
Sets the text that the user can add as a message to the hints email- Parameters:
text- The message text
-
editable
Checks if the user can send the email that contains the hints. TheIdentitymust have a not empty sender email (Identity.getEmail()) and a not empty recipient email (Lang.getHintsMailAddress())- Parameters:
id- TheIdentityof the user currently logged in the application- Returns:
trueif the user can send the email,falseotherwise
-
sendHintsEmail
Sends an email that contains the hints to the address returned by the methodLang.getHintsMailAddress().
This functionality is available only if the system has the correct setup for the collaborative managing of the translations: the user must have thefoundation.lang.hintsfunction, andeditable(overit.geocall.util.Identity)must returntrue.- Parameters:
id- TheIdentityof 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 -
anyContent
public boolean anyContent()Checks if there is a some content in the LangHints- Returns:
trueif the size of the map is greater than 0 or the text string is not empty,falseotherwise
-