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

org.faktorips.runtime.AssociationChangedEvent Maven / Gradle / Ivy

Go to download

Runtime library for Faktor-IPS. When using the JAXB support use either faktorips-runtime-jakarta-xml or faktorips-runtime-javax-xml as dependency. When using CSV to read tables, add the optional dependencies to opencsv, commons-lang3 and commons-text. If you want to run Faktor-IPS tests as JUnit tests, you need to provide either junit (JUnit 4) or junit-jupiter-api (JUnit 5).

There is a newer version: 25.7.0.a20250225-01
Show newest version
/*******************************************************************************
 * Copyright (c) Faktor Zehn AG. 
 * 
 * This source code is available under the terms of the AGPL Affero General Public License version
 * 3.
 * 
 * Please see LICENSE.txt for full license terms, including the additional permissions and
 * restrictions as well as the possibility of alternative license terms.
 *******************************************************************************/

package org.faktorips.runtime;

import java.beans.PropertyChangeEvent;

/**
 * Extension of {@link PropertyChangeEvent} for explicitly modeling properties as associations and
 * firing events when association targets are added or removed from the association.
 * 
 * @author Daniel Hohenberger
 */
public class AssociationChangedEvent extends PropertyChangeEvent {

    private static final long serialVersionUID = 7545458044844395021L;

    private final Object addedAssociationTarget;
    private final Object removedAssociationTarget;

    public AssociationChangedEvent(Object source, String associationName, Object removedAssociationTarget,
            Object addedAssociationTarget) {

        super(source, associationName, null, null);
        this.addedAssociationTarget = addedAssociationTarget;
        this.removedAssociationTarget = removedAssociationTarget;
    }

    public Object getAddedAssociationTarget() {
        return addedAssociationTarget;
    }

    public Object getRemovedAssociationTarget() {
        return removedAssociationTarget;
    }

    public String getAssociationName() {
        return getPropertyName();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy