Blame | Last modification | View Log | RSS feed
package com.erggroup.buildtool.abt;import java.util.Vector;import org.apache.log4j.Logger;import org.apache.tools.ant.Task;public class ABTData extends Task{// static fields// public// protected// private// fields// public// protected// private// Systemprivate static final Logger mLogger = Logger.getLogger(ABTData.class);public static Vector<Machine> machineCollection = new Vector<Machine>();public static Vector<Owner> ownerCollection = new Vector<Owner>();private void Log(String message1, String message2){Log( message1 + message2, info );}private static final char debug = 0;private static final char info = 1;private static final char warn = 2;private static final char error = 3;private static final char fatal = 4;private void Log(String message, char facility){if ( facility == debug){mLogger.debug(message);}elseif ( facility == info){mLogger.info(message);}elseif ( facility == warn){mLogger.warn(message);}elseif ( facility == error){mLogger.error(message);}else{mLogger.fatal(message);}log( message );}/*** Init all data when the task is invoked**/public void init(){machineCollection.removeAllElements();ownerCollection.removeAllElements();}public void execute(){}//---------------------------------------------------------------------------// Extend the <ABTData> task with new elements//// <machine name="auperasbm07" machtype="solits10_x86" machclass="Solaris" buildfilter="" />// <owner email="buildadm@vixtechnology.com"/>//public Machine createMachine(){Machine machine = new Machine();machineCollection.add(machine);return machine;}public Owner createOwner(){Owner owner = new Owner();ownerCollection.add(owner);return owner;}}