Class ChangeSet

java.lang.Object
org.apache.felix.prefs.ChangeSet

public class ChangeSet extends Object
This class keeps track of the changes to a preferences node.
  • Field Details

    • hasChanges

      protected boolean hasChanges
      Do we have changes at all?
    • changedProperties

      protected final Set<String> changedProperties
      A set of changed/added properties.
    • removedProperties

      protected final Set<String> removedProperties
      A set of removed properties.
    • addedChildren

      protected final Set<String> addedChildren
      A set of added children.
    • removedChildren

      protected final Set<String> removedChildren
      A set of removed children.
  • Constructor Details

    • ChangeSet

      public ChangeSet()
  • Method Details

    • hasChanges

      public boolean hasChanges()
      Do we have changes?
      Returns:
      True if there are any changes.
    • propertyChanged

      public void propertyChanged(String name)
      Inform that a property has been added/changed.
      Parameters:
      name - The name of the property.
    • propertyRemoved

      public void propertyRemoved(String name)
      Inform that a property has removed.
      Parameters:
      name - The name of the property.
    • childAdded

      public void childAdded(String name)
      Inform that a child has been added.
      Parameters:
      name - The name of the child.
    • childRemoved

      public void childRemoved(String name)
      Inform that a child has been removed.
      Parameters:
      name - The name of the child.
    • clear

      public void clear()
      Reset state to unchanged.
    • importChanges

      public void importChanges(ChangeSet other)
      Import the changes from the other change set.
      Parameters:
      other -
    • getChangedProperties

      public Collection<String> getChangedProperties()
      Return a collection with the changed property names.
      Returns:
      A collection.
    • getRemovedProperties

      public Collection<String> getRemovedProperties()
      Return a collection with the removed property names.
      Returns:
      A collection.
    • getAddedChildren

      public Collection<String> getAddedChildren()
      Return a collection with the added children names.
      Returns:
      A collection.
    • getRemovedChildren

      public Collection<String> getRemovedChildren()
      Return a collection with the removed children names.
      Returns:
      A collection.