package context;
import manager.ManagerInterface;
import manager.IllegalParameterException;
/**
* Created by IntelliJ IDEA.
* User: saturn
* Date: 2003-9-30
* Time: 13:38:50
* To change this template use Options | File Templates.
*/
public class Manager implements ManagerInterface {
//constant section
public static final String CONTEXT = "context";
//end
protected Manager() {
}
public static ManagerInterface getInstance() {
return new Manager();
}
protected final ContextImp context = new ContextImp();
public Context getContext() {
return context;
}
public Object getInstance(String name, Class type)
throws IllegalParameterException {
if (CONTEXT.equals(name) && (type.equals(Context.class))) {
return new ContextImp();
} else
throw new IllegalParameterException("IllegalParameterException");
}
}