at.spardat.xma.security.ContextChangeEvent Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
/*
* Created on 29.10.2003
*
*
*
*/
package at.spardat.xma.security;
import java.util.EventObject;
/**
* EventObject used to notify a user change. It is delivered to all {@link ContextChangeListener}
* registered at the {@link LoginModuleWithContextChange} of the application after the user, the
* mandant, the environment or the locale has changed. Which of these changes can actually happen
* depends on the LoginModule.
*
* @author s2877
*/
public class ContextChangeEvent extends EventObject {
private XMAContext oldContext;
private XMAContext newContext;
/**
* Creates the event object.
*
* @param source the LoginModule sending the event
* @param oldContext the XMAContext before the user change
* @param newContext the XMContext after the user change
*/
public ContextChangeEvent(Object source,XMAContext oldContext,XMAContext newContext) {
super(source);
this.oldContext=oldContext;
this.newContext=newContext;
}
/**
* Get the XMAContext before the user change
* @return the XMAContext before the user change
*/
public XMAContext getNewContext() {
return newContext;
}
/**
* Get the XMAContext after the user change
* @return the XMAContext after the user change
*/
public XMAContext getOldContext() {
return oldContext;
}
}