View Javadoc

1   package br.com.ibnetwork.guara.message.impl;
2   
3   import java.text.MessageFormat;
4   
5   import br.com.ibnetwork.guara.message.SystemMessage;
6   import br.com.ibnetwork.xingu.utils.ArrayUtils;
7   
8   
9   public class SystemMessageDefaultImpl 
10  	implements SystemMessage
11  {
12  	private String id;
13  	
14  	private String text;
15  	
16  	private String type;
17  
18  	public SystemMessageDefaultImpl(String id, String text,String type)
19  	{
20  		this.id = id;
21  		this.text = text;	
22  		this.type = type;
23  	}
24  
25      public String getId()
26      {
27          return id;
28      }
29  
30  	public String getType()
31  	{
32  		return type;
33  	}
34  
35      public String getText(Object[] arguments)
36      {
37          arguments = ArrayUtils.replaceNulls(arguments,"");
38  		String result = MessageFormat.format(text,arguments);
39  		return result;
40      }
41  
42      public String getText()
43      {
44          return text;
45      }
46  }