Class BmChangeEvent


  • public final class BmChangeEvent
    extends BmSubEvent
    Sub-event representing object changes. Note that all the collections and maps returned by the methods of this class are for read-access only. In case of a modification attempt the behaviour is not defined.
    See Also:
    BmEvent, BmSubEvent
    • Constructor Summary

      Constructors 
      Constructor Description
      BmChangeEvent​(IBmObject object, Map<org.eclipse.emf.ecore.EStructuralFeature,​List<org.eclipse.emf.common.notify.Notification>> notifications, Map<org.eclipse.emf.ecore.EStructuralFeature,​Object> oldValues, boolean propertiesChanged, boolean binaryAttachmentsChanged)
      Constructs a new instance with the specified parameters.
      BmChangeEvent​(IBmObject object, Map<org.eclipse.emf.ecore.EStructuralFeature,​List<org.eclipse.emf.common.notify.Notification>> notifications, Map<org.eclipse.emf.ecore.EStructuralFeature,​Object> oldValues, boolean propertiesChanged, boolean binaryAttachmentsChanged, boolean fqnChanged, String oldFqn)
      Constructs a new instance with the specified parameters.
    • Constructor Detail

      • BmChangeEvent

        public BmChangeEvent​(IBmObject object,
                             Map<org.eclipse.emf.ecore.EStructuralFeature,​List<org.eclipse.emf.common.notify.Notification>> notifications,
                             Map<org.eclipse.emf.ecore.EStructuralFeature,​Object> oldValues,
                             boolean propertiesChanged,
                             boolean binaryAttachmentsChanged)
        Constructs a new instance with the specified parameters.
        Parameters:
        object - The object the changes are applied to. May not be null.
        notifications - A map where keys are the modified features and values are the lists of the corresponding notifications. May not be null.
        oldValues - A map where keys are the modified features and values are the values the features had prior to the modifications. May not be null.
        propertiesChanged - A flag showing whether properties have been changed.
        binaryAttachmentsChanged - A flag showing whether binary attachments have been changed.
      • BmChangeEvent

        public BmChangeEvent​(IBmObject object,
                             Map<org.eclipse.emf.ecore.EStructuralFeature,​List<org.eclipse.emf.common.notify.Notification>> notifications,
                             Map<org.eclipse.emf.ecore.EStructuralFeature,​Object> oldValues,
                             boolean propertiesChanged,
                             boolean binaryAttachmentsChanged,
                             boolean fqnChanged,
                             String oldFqn)
        Constructs a new instance with the specified parameters.
        Parameters:
        object - The object the changes are applied to. May not be null.
        notifications - A map where keys are the modified features and values are the lists of the corresponding notifications. May not be null.
        oldValues - A map where keys are the modified features and values are the values the features had prior to the modifications. May not be null.
        propertiesChanged - A flag showing whether properties have been changed.
        binaryAttachmentsChanged - A flag showing whether binary attachments have been changed.
        fqnChanged - A flag showing whether FQN has been changed.
        oldFqn - The old FQN. May be null.
        Since:
        2.1
    • Method Detail

      • getFeatures

        public Collection<org.eclipse.emf.ecore.EStructuralFeature> getFeatures()
        Gets the changed features.
        Returns:
        a collection of the changed features, never null.
      • getNotifications

        public Map<org.eclipse.emf.ecore.EStructuralFeature,​List<org.eclipse.emf.common.notify.Notification>> getNotifications()
        Gets all the notifications.
        Returns:
        A map where keys are the modified features and values are the lists of the corresponding notifications. May not be null.
      • getNotifications

        public List<org.eclipse.emf.common.notify.Notification> getNotifications​(org.eclipse.emf.ecore.EStructuralFeature feature)
        Gets notifications by the specified features.
        Parameters:
        feature - The feature. May not be null.
        Returns:
        a list of the notifications describing the modifications applied to the specified feature, never null.
      • getObject

        public org.eclipse.emf.ecore.EObject getObject()
        Gets the object the changes are applied to.
        Returns:
        the object, never null.
      • getOldValues

        public Map<org.eclipse.emf.ecore.EStructuralFeature,​Object> getOldValues()
        Gets all the old values.
        Returns:
        A map where keys are the modified features and values are the values the features had prior to the modifications.
      • isPropertiesChanged

        public boolean isPropertiesChanged()
        Checks if properties have been changed.
        Returns:
        true if properties have been changed, false otherwise.
      • isBinaryAttachmentsChanged

        public boolean isBinaryAttachmentsChanged()
        Checks if binary attachments have been changed.
        Returns:
        true if binary attachments have been changed, false otherwise.
      • isFqnChanged

        public boolean isFqnChanged()
        Checks if FQN has been changed.
        Returns:
        true if FQN has been changed, false otherwise.
        Since:
        2.1
      • getOldFqn

        public String getOldFqn()
        Gets old FQN.
        Returns:
        the old FQN, may be null. If FQN has not been changed the result is not defined.
        Since:
        2.1