unicorn commit: added a list of default messages

changeset:   1270:adad153fecf4
user:        Thomas Gambet <tgambet@w3.org>
date:        Fri Jun 18 15:06:52 2010 -0400
files:       src/org/w3c/unicorn/util/MessageList.java
description:
added a list of default messages


diff -r cd254e469518 -r adad153fecf4 src/org/w3c/unicorn/util/MessageList.java
--- a/src/org/w3c/unicorn/util/MessageList.java	Fri Jun 18 11:35:45 2010 -0400
+++ b/src/org/w3c/unicorn/util/MessageList.java	Fri Jun 18 15:06:52 2010 -0400
@@ -8,10 +8,17 @@
 
 	private static final long serialVersionUID = -720345110444544838L;
 	
+	private static ArrayList<Message> defaultMessages = new ArrayList<Message>();
+	
 	private ULocale locale;
 
 	public MessageList() {
-		this.locale = Language.getDefaultLocale();
+		this(Language.getDefaultLocale());
+	}
+	
+	public MessageList(ULocale lang) {
+		this.locale = lang;
+		this.addAll(defaultMessages);
 	}
 	
 	public boolean hasInfo() {
@@ -34,10 +41,6 @@
 				return true;
 		return false;
 	}
-	
-	public MessageList(ULocale lang) {
-		this.locale = lang;
-	}
 
 	public ULocale getLocale() {
 		return locale;
@@ -47,4 +50,12 @@
 		this.locale = locale;
 	}
 
+	public static ArrayList<Message> getDefaultMessages() {
+		return defaultMessages;
+	}
+
+	public static void setDefaultMessages(ArrayList<Message> defaultMessages) {
+		MessageList.defaultMessages = defaultMessages;
+	}
+
 }

Received on Friday, 18 June 2010 19:52:52 UTC