at.spardat.xma.session.ExternalEvent 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
*******************************************************************************/
/*
* @(#) $Id: ExternalEvent.java 2089 2007-11-28 13:56:13Z s3460 $
*
*
*
*
*
*/
package at.spardat.xma.session;
import java.util.Properties;
/**
* @author s3460
* @since version_number
*/
public class ExternalEvent {
private static final String EVENT_NAME = "at.spardat.xma.evenName";
private Properties properties;
private String eventName;
/**
* @param properties
*/
public ExternalEvent(Properties properties) {
super();
this.properties = properties;
if(this.properties != null){
eventName = getProperty(EVENT_NAME);
this.properties.remove(EVENT_NAME);
}
}
/**
* @return Returns all external event properties.
*/
public Properties getProperties() {
return properties;
}
/**
*
* @param name
* @return the named property transmitted from xma caller
* @since version_number
* @author s3460
*/
public String getProperty(String name){
return properties != null ? properties.getProperty(name) : null;
}
/**
*
* @param name
* @param defaultValue
* @return the named property transmitted from xma caller
* @since version_number
* @author s3460
*/
public String getProperty(String name, String defaultValue){
return properties != null ? properties.getProperty(name,defaultValue) : null;
}
/**
* @return Returns the eventName (name of the component in URL used to start XMA).
*/
public String getEventName() {
return eventName;
}
}