ProfileModule.java

00001 /*
00002  * OpenMobileIS - a free Java(TM) Framework for mobile applications Java(TM)
00003  * Copyright (C) 2004-2006 Philippe Delrieu
00004  * All rights reserved.
00005  * Contact: pdelrieu@openmobileis.org
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
00020  * USA
00021  *
00022  *  
00023  *  Modifications :
00024  *  2006 Creation P.Delrieu
00025  * 
00026  */
00027 package org.openmobileis.module.core;
00028 
00029 import java.util.Enumeration;
00030 import java.util.Hashtable;
00031 
00032 import org.openmobileis.common.util.OpenMISSerializable;
00033 import org.openmobileis.common.util.collection.Array;
00034 
00046 public class ProfileModule  implements OpenMISSerializable {
00047   static final long serialVersionUID = 5521257935120563452L;
00048         
00049         private String name;
00050         private String version;
00051     private String terminalType;
00052         private Hashtable properties;
00053     private String serverjar;
00054     private String terminaljar;
00055         private Array rubrics;
00056     private Array dependModuleList;
00057         
00058         public ProfileModule() {
00059                 this.properties = new Hashtable();
00060                 this.rubrics = new Array();
00061     dependModuleList = new Array();
00062         }
00063   
00064   public void addDependProfilModule(DependProfileModule moduleName) {
00065     dependModuleList.add(moduleName);
00066   }
00067   
00068   public Array getDependModuleList()  {
00069     return dependModuleList;
00070   }
00071   
00072         public void setName(String name) {
00073                 this.name = name;
00074         }
00075         
00076         public String getName() {
00077                 return this.name;
00078         }
00079         
00080         public void setVersion(String version) {
00081                 this.version = version;
00082         }
00083         
00084         public String getVersion() {
00085                 return this.version;
00086         }
00087         
00088         public void addProperty(String name, String value) {
00089                 properties.put(name, value);
00090         }
00091         
00092         public String getProperty(String name) {
00093                 return (String)this.properties.get(name);
00094         }
00095         
00096         public String[] getAllPropertiesNames() {
00097                 Enumeration enumkeys = this.properties.keys();
00098                 Array keys = new Array();
00099                 while (enumkeys.hasMoreElements()) {
00100                         keys.add((String)enumkeys.nextElement());
00101                 }
00102                 String[] result = new String[keys.size()];
00103                 keys.toArray(result);
00104                 return result;
00105         }
00106         
00107         public void addModuleRubric(ProfileModuleRubric rubric) {
00108                 this.rubrics.add(rubric);
00109         }
00110         
00111         public Array getModuleRubrics() {
00112                 return this.rubrics;
00113         }
00114 
00115   public String getServerjar() {
00116     return serverjar;
00117   }
00118 
00119   public void setServerjar(String serverjar) {
00120     this.serverjar = serverjar;
00121   }
00122 
00123   public String getTerminaljar() {
00124     return terminaljar;
00125   }
00126 
00127   public void setTerminaljar(String terminaljar) {
00128     this.terminaljar = terminaljar;
00129   }
00130 
00131   public String getTerminalType() {
00132     return terminalType;
00133   }
00134 
00135   public void setTerminalType(String terminalType) {
00136     this.terminalType = terminalType;
00137   }
00138 
00139 }

Generated on Mon Dec 4 11:03:29 2006 for OpenMobileIS by  doxygen 1.5.1-p1