All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jpattern.service.messageManager.MessageManagerService Maven / Gradle / Ivy

There is a newer version: 3.6.2
Show newest version
package com.jpattern.service.messageManager;

import java.util.Map;

/**
 * 
 * @author Francesco Cina'
 *
 * 04/nov/2009
 */
public class MessageManagerService implements IMessageManager {

	private static final long serialVersionUID = 1L;
	private String name;
	private Map messageMap;

	public MessageManagerService(String name, IMessageManagerConfig messageConfig) {
		this.name = name;
		this.messageMap = messageConfig.getMessageMap();
	}

	public String getMessage(String messageKey) {
		String returnedValue = "";
		
		if (messageMap.containsKey(messageKey)){
			returnedValue = (String) messageMap.get(messageKey);
		}
		
		return returnedValue;
	}
	
	public String getName() {
		return name;
	}

	@Override
	public void stopService() {
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy