if (this.functionality == null) { return null; }
    public Module getSelectedModule() {        if (this.functionality instanceof Module) {             return (Module) this.functionality;        }        else {            return this.functionality.getModule();        }    }