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

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