View Javadoc
1 /* 2 * DefaultConsoleManager.java 3 * 4 * Created on February 10, 2003, 9:18 AM 5 */ 6 7 package com.mlw.fps.model.business.bo.stubs; 8 9 import java.util.ArrayList; 10 import java.util.List; 11 12 import com.mlw.fps.model.business.bean.SystemProperties; 13 import com.mlw.fps.model.business.dao.DAOFactory; 14 import com.mlw.fps.model.business.dao.StartUp; 15 import com.mlw.fps.model.business.vo.SupportedGame; 16 import com.mlw.fps.model.manager.ConsoleManager; 17 18 /*** 19 * 20 * @author Matthew Wilson 21 */ 22 public class FlatFileConsoleStub implements ConsoleManager 23 { 24 private static boolean initialized= false; 25 26 /*** Creates a new instance of DefaultConsoleManager 27 */ 28 public FlatFileConsoleStub() 29 { 30 } 31 32 public boolean initialized() 33 { 34 if (initialized) return true; 35 if (SystemProperties.getProperty("game") == null) 36 { 37 return false; 38 } 39 40 StartUp dao= (StartUp)DAOFactory.getDAO(StartUp.class.getName()); 41 if (dao == null || dao.isInitialized()) 42 { 43 initialized= true; 44 } 45 else 46 { 47 System.out.println("initializiung the dao..."); 48 initialized= dao.init(); 49 } 50 51 return initialized; 52 } 53 54 public void setProperty(String key, String value) 55 { 56 } 57 58 public List getSupportedGames() 59 { 60 ArrayList gameList= new ArrayList(); 61 gameList.add(new SupportedGame("dod", "Day of Defeat")); 62 gameList.add(new SupportedGame("cstrike", "Counter-Strike")); 63 64 return gameList; 65 } 66 }

This page was automatically generated by Maven