package com.eactive.eai.rms.common.spring;

import java.util.Locale;

import org.springframework.context.MessageSource;
import org.springframework.context.support.MessageSourceAccessor;

public class LocaleMessage extends MessageSourceAccessor {
	public LocaleMessage(MessageSource messageSource) {
		super(messageSource);
	}

	public LocaleMessage(MessageSource messageSource, Locale defaultLocale) {
		super(messageSource, defaultLocale);
	}

	public String getString(String key) {
		return super.getMessage(key, "No Element Found");
	}

	public String getString(String key, String... args) {
		return super.getMessage(key, args, "No Element Found");
	}

	public String getDefaultString(String key, String defaultString) {
		return super.getMessage(key, defaultString);
	}

	public String getDefaultString(String key, String defaultString, String... args) {
		return super.getMessage(key, args, defaultString);
	}

	public Locale getLocale() {
		return super.getDefaultLocale();
	}
}
