/**
 * @(#)RWebMessages.java
 * Copyright 2001 Nomura Research Institute, LTD. All rights reserved.
 * @author  Intelligent Technology Inc.
 * @version 1.00 2002/08/29
 */
package jp.co.nri.rid.web;

import jp.co.nri.rid.error.RidMessage;

/**
 * RWebRoboTamer用のWebMessages。RidMessageからメッセージを取得する。
 */
public class RWebMessages extends WebMessages{
	private String[] code = { "W5101" ,"W5201" ,"W5202" ,"W5203" ,"W5204" ,"W5301" ,"W5302" ,"W5303" };
	private RidMessage messages;
	
	public RWebMessages(){ messages = new RidMessage(); }
	
	public void add(int ix ,String option){ super.add(messages.Warning(code[ix] ,option)); }
	
	public String toString(){
		StringBuffer buf = new StringBuffer();
		for(int i=size()-1;0<=i;i--){
			buf.append(elementData[i]);
			buf.append("\n");
		}
		return 0 < buf.length() ? buf.toString() : null;
	}
}
