View Javadoc

1   /*
2    * AI Soccer Project - network gaming environment for AI warriors.
3    * Copyright (C) 2001-2004  Marcin Werla, Pawel Widera
4    *
5    * This program is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU General Public License
7    * as published by the Free Software Foundation; either version 2
8    * of the License, or (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, you can find it here:
17   * http://www.gnu.org/licenses/gpl.html
18   */
19  
20  package snifos.application;
21  
22  import java.util.ArrayList;
23  import java.util.Collection;
24  import java.util.Properties;
25  
26  
27  /***
28   * This class describes application information
29   * read from server configuration file.
30   * @version $Id: ApplicationInfo.java,v 1.2 2004/05/08 21:55:29 mwerla Exp $
31   */
32  public class ApplicationInfo {
33      private String className;
34      private Properties typicalConfiguration;
35      private Collection uniqueConfigurations = new ArrayList();
36  
37      /***
38       * Returns name of the main application class name.
39       * @see Application
40       * @return Name of the main application class name.
41       */
42      public String getClassName() {
43          return className;
44      }
45  
46      /***
47       * Sets name of the main application class name.
48       * @param className Name of the main application class to set.
49       */
50      public void setClassName(String className) {
51          this.className = className;
52      }
53  
54      /***
55       * Returns typical configuration of this application type.
56       * @return Typical configuration of this application type.
57       */
58      public Properties getTypicalConfiguration() {
59          return typicalConfiguration;
60      }
61  
62      /***
63       * Sets typical configuration of this application type.
64       * @param typicalConfiguration typical
65       * configuration of this application type to set.
66       */
67      public void setTypicalConfiguration(Properties typicalConfiguration) {
68          this.typicalConfiguration = typicalConfiguration;
69      }
70  
71      /***
72       * Returns Collection of Properties objects. Each object represents
73       * one specific configuration for this application type.
74       * @return Collection of Properties objects, where each object represents
75       * one specific configuration for this application type.
76       */
77      public Collection getUniqueConfigurations() {
78          return uniqueConfigurations;
79      }
80  
81      /***
82       * Adds single specific configuration for this application type.
83       * @param uniqueConfiguration Specific configuration for
84       * this application type.
85       */
86      public void addUniqueConfiguration(Properties uniqueConfiguration) {
87          this.uniqueConfigurations.add(uniqueConfiguration);
88      }
89  }