ProfileModuleRubric.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 import org.openmobileis.module.profiles.terminal.ProfileRubricSynchroListener;
00035 
00047 public class ProfileModuleRubric  implements OpenMISSerializable {
00048   static final long serialVersionUID = 5521257935120563452L;
00049 
00050   private String name;
00051 
00052   private Hashtable properties;
00053 
00054   private String loaderClass;
00055 
00056   private Array synchroListenerList;
00057 
00058   private String[] dependsList;
00059 
00060   public ProfileModuleRubric() {
00061     this.properties = new Hashtable();
00062     synchroListenerList = new Array();
00063     dependsList = new String[0];
00064   }
00065 
00066   public void setName(String name) {
00067     this.name = name;
00068   }
00069 
00070   public String getName() {
00071     return this.name;
00072   }
00073 
00074   public void addSynchroListener(ProfileRubricSynchroListener synchrolistener) {
00075     synchroListenerList.add(synchrolistener);
00076   }
00077 
00078   public Array getSynchroListenerList() {
00079     return synchroListenerList;
00080   }
00081 
00082   public void addProperty(String name, String value) {
00083     properties.put(name, value);
00084   }
00085 
00086   public String getProperty(String name) {
00087     return (String) this.properties.get(name);
00088   }
00089 
00090   public String[] getAllPropertiesNames() {
00091     Enumeration enumkeys = this.properties.keys();
00092     Array keys = new Array();
00093     while (enumkeys.hasMoreElements()) {
00094       keys.add((String) enumkeys.nextElement());
00095     }
00096     String[] result = new String[keys.size()];
00097     keys.toArray(result);
00098     return result;
00099   }
00100 
00101   public String getLoaderClass() {
00102     return loaderClass;
00103   }
00104 
00105   public void setLoaderClass(String loader) {
00106     this.loaderClass = loader;
00107   }
00108 
00109   public String[] getDependsList() {
00110     return dependsList;
00111   }
00112 
00113   public void setDependsList(String[] dependsList) {
00114     this.dependsList = dependsList;
00115   }
00116 
00117 }

Generated on Mon Jan 14 17:29:49 2008 for OpenMobileIS by  doxygen 1.5.4