Interface ILocalizedStrings


public interface ILocalizedStrings

Provides localized task and case names and descriptions.

Example:


 String taskName = ivy.task.names().current();
 
Since:
9.4
API:
This is a public API.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the name or description for the current session's content locale.
    void
    current(String value)
    Sets the name or description for the current session's content locale to the given value.
    void
    expandAndSet(String template)
    Expands the macros in the given template and then sets the expanded value for each locale.
    get(Locale locale)
    Gets the name or description in the given locale.
    All locales for which task or case names or descriptions are created and stored.
    void
    set(Locale locale, String value)
    Sets the name or description in the given locale to the given value.
  • Method Details

    • locales

      Iterable<Locale> locales()

      All locales for which task or case names or descriptions are created and stored.

      Example:
      Get name of a task in all supported languages

      
       ILocalizedStrings names = ivy.task.names();
       for (Locale locale : names.locales) {
         ivy.log.info("Task name in locale: " + names.get(locale));
       }
       
      Returns:
      iterable with all locales
      API:
      This public API is available in Java.
    • get

      String get(Locale locale)

      Gets the name or description in the given locale.

      Example:

      
       String germanName = ivy.task.names().get(Locale.GERMAN);
       
      Parameters:
      locale - locale to get
      Returns:
      name or description in the given locale
      Throws:
      IllegalArgumentException - if given locale is null or is not supported
      See Also:
      API:
      This public API is available in Java.
    • set

      void set(Locale locale, String value)

      Sets the name or description in the given locale to the given value.

      Example:

      
       ivy.task.names().set(Locale.GERMAN, "Anfrage des Kunden Axon Ivy");
       
      Parameters:
      locale - locale to set
      Throws:
      IllegalArgumentException - if given locale is null or is not supported or given value is null
      See Also:
      API:
      This public API is available in Java.
    • expandAndSet

      void expandAndSet(String template)

      Expands the macros in the given template and then sets the expanded value for each locale.

      Note: Only <%=ivy.cms.co(...)%> macros are supported. If you want to include process data then use string concatenation instead of <%=in. ...%> macros.

      If the given template do not contain any macros the same value (the template) is set for all locales.

      Example:

      
       ivy.task.names().expandAndSet("<%=ivy.cms.co(\"\task\name\")%> " + in.person.name);
       
      Parameters:
      template - the template with macros to expand
      Throws:
      IllegalArgumentException - if the given macro is null
      See Also:
      API:
      This public API is available in Java.
    • current

      String current()

      Gets the name or description for the current session's content locale.

      Example:

      
       String taskName = ivy.task.names().current();
       
      See Also:
      API:
      This public API is available in Java.
    • current

      void current(String value)

      Sets the name or description for the current session's content locale to the given value.

      Example:

      
       ivy.task.names().current("Anfrage des Kunden Axon Ivy");
       
      Throws:
      IllegalArgumentException - if given value is null
      See Also:
      API:
      This public API is available in Java.