/**
* Title: OpenUSS - Open Source University Support System
* My Piggy Bank Example
* Description: Enhydra Presentation Object
* Copyright: Copyright (c) 2003 by B. Lofi Dewanto, T. Menzel
* Company: University of Muenster, HTWK Leipzig
* @author B. Lofi Dewanto, T. Menzel
* @version 1.1
*/
package net.sourceforge.ejosa.piggybank.presentation.enhydra;
import java.util.*;
import org.openuss.presentation.enhydra.framework.*;
/**
* The base session object for foundation components.
*
* @author B. Lofi Dewanto, T. Menzel
* @version 1.1
*/
public class FoundationSessionData extends BaseSessionData {
/**
* Session key for foundation components.
*/
public static final String SESSION_KEY = "FoundationSessionData";
/**
* Data for the base session.
*/
// English and USA are the standard locale
protected Locale myLocale = new Locale("en", "US");
protected String userMessage = null;
/**
* Sets the locale.
*/
public void setLocale(Locale locale) {
this.myLocale = locale;
}
/**
* Gets the locale.
*/
public Locale getLocale() {
return this.myLocale;
}
/**
* Set the message.
* This should be used for a short use.
*/
public void setUserMessage(String msg) {
this.userMessage = msg;
}
/**
* Retrieve the most recent user message and then clear it so no
* other app tries to use it.
* This should be used for a short use.
*/
public String getAndClearUserMessage() {
String msg = this.userMessage;
this.userMessage = null;
return msg;
}
}
|