All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.talk2object.plum.interaction.application.PlumApplicationContextUtils Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.interaction.application;

import com.talk2object.common.ApplicationContextUtils;
import com.talk2object.plum.interaction.session.SessionManager;
import com.talk2object.plum.interaction.viewgeneneration.ViewFactory;
import com.talk2object.plum.repository.biz.TransactionExecutor;

public class PlumApplicationContextUtils {

	public static final String KEY_VIEW_FACTORY = "ViewFactory";
	public static final String KEY_SESSION_MANAGER = "SessionManager";
	public static final String KEY_PLUM = "plum";

	private static Object get(String key) {
		return ApplicationContextUtils.getApplicationContext().get(key);
	}

	private static void set(String key, Object value) {
		ApplicationContextUtils.getApplicationContext().set(key, value);
	}

	public static ViewFactory getViewFactory() {
		return (ViewFactory) get(KEY_VIEW_FACTORY);
	}

	public static void setViewFactory(ViewFactory viewFactory) {
		set(KEY_VIEW_FACTORY, viewFactory);
	}

	public static SessionManager getSessionManager() {
		return (SessionManager) get(KEY_SESSION_MANAGER);
	}

	public static void setSessionManager(SessionManager sessionManager) {
		set(KEY_SESSION_MANAGER, sessionManager);
	}

	public static Plum getPlum() {
		return (Plum) get(KEY_PLUM);
	}

	public static void setPlum(Plum plum) {
		set(KEY_PLUM, plum);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy