00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 package org.openmobileis.modules.profiles.embedded;
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.modules.profiles.embedded.core.DependProfileModule;
00035 import org.openmobileis.modules.profiles.embedded.core.DependProfileRubric;
00036
00048 public class ProfileModule implements OpenMISSerializable {
00049 static final long serialVersionUID = 5521257935120563452L;
00050
00051 private String name;
00052 private String version;
00053 private Hashtable properties;
00054 private Array rubrics;
00055 private Array dependModuleList;
00056
00057 public ProfileModule() {
00058 this.properties = new Hashtable();
00059 this.rubrics = new Array();
00060 dependModuleList = new Array();
00061 }
00062
00063 public void addDependProfilModule(DependProfileModule moduleName) {
00064 dependModuleList.add(moduleName);
00065 }
00066
00067 public Array getDependModuleList() {
00068 return dependModuleList;
00069 }
00070
00071 public void setName(String name) {
00072 this.name = name;
00073 }
00074
00075 public String getName() {
00076 return this.name;
00077 }
00078
00079 public void setVersion(String version) {
00080 this.version = version;
00081 }
00082
00083 public String getVersion() {
00084 return this.version;
00085 }
00086
00087 public void addProperty(String name, String value) {
00088 properties.put(name, value);
00089 }
00090
00091 public String getProperty(String name) {
00092 return (String)this.properties.get(name);
00093 }
00094
00095 public String[] getAllPropertiesNames() {
00096 Enumeration enumkeys = this.properties.keys();
00097 Array keys = new Array();
00098 while (enumkeys.hasMoreElements()) {
00099 keys.add((String)enumkeys.nextElement());
00100 }
00101 String[] result = new String[keys.size()];
00102 keys.toArray(result);
00103 return result;
00104 }
00105
00106 public void addModuleRubric(DependProfileRubric rubric) {
00107 this.rubrics.add(rubric);
00108 }
00109
00110 public Array getModuleRubric() {
00111 return this.rubrics;
00112 }
00113
00114 }