Package org.apache.felix.prefs
Class ChangeSet
java.lang.Object
org.apache.felix.prefs.ChangeSet
This class keeps track of the changes to a preferences node.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA set of added children.A set of changed/added properties.protected booleanDo we have changes at all?A set of removed children.A set of removed properties. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchildAdded(String name) Inform that a child has been added.voidchildRemoved(String name) Inform that a child has been removed.voidclear()Reset state to unchanged.Return a collection with the added children names.Return a collection with the changed property names.Return a collection with the removed children names.Return a collection with the removed property names.booleanDo we have changes?voidimportChanges(ChangeSet other) Import the changes from the other change set.voidpropertyChanged(String name) Inform that a property has been added/changed.voidpropertyRemoved(String name) Inform that a property has removed.
-
Field Details
-
hasChanges
protected boolean hasChangesDo we have changes at all? -
changedProperties
A set of changed/added properties. -
removedProperties
A set of removed properties. -
addedChildren
A set of added children. -
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
Inform that a property has been added/changed.- Parameters:
name- The name of the property.
-
propertyRemoved
Inform that a property has removed.- Parameters:
name- The name of the property.
-
childAdded
Inform that a child has been added.- Parameters:
name- The name of the child.
-
childRemoved
Inform that a child has been removed.- Parameters:
name- The name of the child.
-
clear
public void clear()Reset state to unchanged. -
importChanges
Import the changes from the other change set.- Parameters:
other-
-
getChangedProperties
Return a collection with the changed property names.- Returns:
- A collection.
-
getRemovedProperties
Return a collection with the removed property names.- Returns:
- A collection.
-
getAddedChildren
Return a collection with the added children names.- Returns:
- A collection.
-
getRemovedChildren
Return a collection with the removed children names.- Returns:
- A collection.
-