Description

  • org.joget.commons.util.ResourceBundleUtil
  • Under wflow-core module
  • Utility class to retrieve plugin propertise value and i18n message 

Code Sample

import org.joget.commons.util.ResourceBundleUtil;

String label = ResourceBundleUtil.getMessage("general.method.label.ok");

Methods

getApplicationContext
public static org.springframework.context.ApplicationContext getApplicationContext()

Utility method to retrieve the ApplicationContext of the system

getMessage
public static java.lang.String getMessage(java.lang.String code)

Gets the i18n message based on code

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.Object[] args)

Gets the i18n message with arguments based on code 

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage)

Gets the i18n message with arguments based on code

Return default message if i18n message not found

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.String defaultMessage)

Gets the i18n message based on code

Return default message if i18n message not found

getMessage
public static java.lang.String getMessage(java.lang.String code, java.util.Locale locale)

Gets the i18n message based on code and locale

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.util.Locale locale)

Gets the i18n message with arguments based on code and locale

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.String defaultMessage, java.util.Locale locale)

Gets the i18n message based on code

Return default message if i18n message not found

getMessage
public static java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage, java.util.Locale locale)

Gets the i18n message with arguments based on code and locale

Return default message if i18n message not found

getMessageSource
public static org.springframework.context.support.MessageSourceAccessor getMessageSource()

Gets the message source

getResourceBundleMessageDao
public static org.joget.commons.spring.model.ResourceBundleMessageDao getResourceBundleMessageDao()

Method used by the system to get resource bundle message dao

getSetupApplicationContext
public static org.springframework.context.ApplicationContext getSetupApplicationContext()

Utility method to retrieve the Setup ApplicationContext of the system

POFileImport
public static void POFileImport(org.springframework.web.multipart.MultipartFile multipartFile, java.lang.String locale) throws java.io.IOException

Method used to import message from PO file

 

  • No labels