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
00028
00029 package org.openmobileis.common.context;
00030
00031 import java.util.*;
00032
00042 public class ApplicationContext {
00043
00044 private Hashtable contextMap = null;
00045
00046 private String[] applicationExecArguments;
00047 private Plateform plateform;
00048
00049 public ApplicationContext() {
00050 contextMap = new Hashtable(10);
00051 plateform = new DefaultPlateform();
00052 }
00053
00060 public void addObject(String objectName, Object object) {
00061 if ((objectName != null) && (object != null)) {
00062 contextMap.put(objectName, object);
00063 }
00064 }
00065
00071 public void removeObject(String objectName) {
00072 if (objectName != null) {
00073 contextMap.remove(objectName);
00074 }
00075 }
00076
00083 public Object getObject(String objectName) {
00084 if (objectName != null) {
00085 return contextMap.get(objectName);
00086 }
00087 return null;
00088 }
00089
00095 public String[] getApplicationExecParameters() {
00096 return applicationExecArguments;
00097 }
00098
00102 public void setApplicationExecArguments(String[] args) {
00103 applicationExecArguments = args;
00104 }
00105
00111 public Plateform getPlateform() {
00112 return plateform;
00113 }
00114
00115
00121 public void setPlateform(Plateform plateform) {
00122 this.plateform = plateform;
00123 }
00124
00125 }