blob: 1e0bf7c34665fd491187fdd4a46fffbd7a24518f [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2004-2008 Andras Schmidt, Andras Balogh, Istvan Rath and Daniel Varro
* 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:
* Andras Schmidt, Andras Balogh, Istvan Rath - initial API and implementation
*******************************************************************************/
package org.eclipse.viatra2.core.notification;
import java.util.Collection;
import org.eclipse.viatra2.core.ICoreNotificationListener;
import org.eclipse.viatra2.core.IModelElement;
/**
* This is an interface of a notification object. A notification object is sent,
* whenever the modelspace changes. It contains string constants which identify
* the various notification types supported by the Viatra Core, as well as some
* utility getter functions.
*
* @author Andras Schmidt
*
* Modified on 2006.08.08 by Istvan Rath: - added transaction-specific
* ID's (TA prefix) - cleaned up javadoc
* Modified on 2011.06.10 by Ábel Hegedüs: - changed to use enum
*/
public interface ICoreNotificationObject {
/**
* Converts this notification to a human readable string representation.
*/
public String toString();
/**
* Get the type of this action. The returned string constant will always be
* one of the types defined in the interface.
*/
public String getActionType();
/**
* Get the type of this action.
*
* @return type defined by the interface
*/
public NotificationType getActionTypeEnum();
/**
* Get the objects receiving this notification instance.
*/
public Collection<ICoreNotificationListener> getListeners();
/**
* Get a collection of model elements which were involved in the
* modification which this notification object is signalling.
*/
public Collection<IModelElement> getNotifiedObjects();
}