Class ChangeImpl
- java.lang.Object
-
- org.glassfish.hk2.configuration.hub.internal.ChangeImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.glassfish.hk2.configuration.hub.api.Change
Change.ChangeCategory
-
-
Field Summary
Fields Modifier and Type Field Description private Change.ChangeCategorychangeCategoryprivate TypechangeTypeprivate java.lang.StringinstanceKeyprivate InstanceinstanceValueprivate InstanceoriginalInstanceValueprivate java.util.List<java.beans.PropertyChangeEvent>propertyChanges
-
Constructor Summary
Constructors Constructor Description ChangeImpl(Change.ChangeCategory changeCategory, Type changeType, java.lang.String instanceKey, Instance instanceValue, Instance originalInstanceValue, java.util.List<java.beans.PropertyChangeEvent> propertyChanges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Change.ChangeCategorygetChangeCategory()Gets the category of change this Change object representsTypegetChangeType()Gets the type of the change for all change categories.java.lang.StringgetInstanceKey()Returns the key of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCEInstancegetInstanceValue()Returns the value of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE.java.util.List<java.beans.PropertyChangeEvent>getModifiedProperties()Returns a list of properties that were changed if the change category is MODIFY_INSTANCE.InstancegetOriginalInstanceValue()Returns the original Instance for the category MODIFY_INSTANCEjava.lang.StringtoString()
-
-
-
Field Detail
-
changeCategory
private final Change.ChangeCategory changeCategory
-
changeType
private final Type changeType
-
instanceKey
private final java.lang.String instanceKey
-
instanceValue
private final Instance instanceValue
-
originalInstanceValue
private final Instance originalInstanceValue
-
propertyChanges
private final java.util.List<java.beans.PropertyChangeEvent> propertyChanges
-
-
Constructor Detail
-
ChangeImpl
ChangeImpl(Change.ChangeCategory changeCategory, Type changeType, java.lang.String instanceKey, Instance instanceValue, Instance originalInstanceValue, java.util.List<java.beans.PropertyChangeEvent> propertyChanges)
-
-
Method Detail
-
getChangeCategory
public Change.ChangeCategory getChangeCategory()
Description copied from interface:ChangeGets the category of change this Change object represents- Specified by:
getChangeCategoryin interfaceChange- Returns:
- REMOVE_TYPE
- ADD_TYPE
- ADD_INSTANCE
- REMOVE_INSTANCE
- MODIFY_INSTANCE
-
getChangeType
public Type getChangeType()
Description copied from interface:ChangeGets the type of the change for all change categories. In the case of ADD_TYPE the value returned will include all instances added, but there will also be an ADD_INSTANCE change sent for each instance of this type that was added. In the case of REMOVE_TYPE the value return will include all instances still in the type at the time of removal, but there will also be a REMOVE_INSTANCE change sent for each instance that was in the type at the time of type removal- Specified by:
getChangeTypein interfaceChange- Returns:
- The type of the change. Will not be null
-
getInstanceKey
public java.lang.String getInstanceKey()
Description copied from interface:ChangeReturns the key of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE- Specified by:
getInstanceKeyin interfaceChange- Returns:
- The key of the instance that was added, removed or modified. Returns null for change category REMOVE_TYPE or ADD_TYPE
-
getInstanceValue
public Instance getInstanceValue()
Description copied from interface:ChangeReturns the value of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE. In the MODIFY_INSTANCE case this will return the new Instance value- Specified by:
getInstanceValuein interfaceChange- Returns:
- The value of the instance that was added, removed or modified. Returns null for change category REMOVE_TYPE or ADD_TYPE
-
getOriginalInstanceValue
public Instance getOriginalInstanceValue()
Description copied from interface:ChangeReturns the original Instance for the category MODIFY_INSTANCE- Specified by:
getOriginalInstanceValuein interfaceChange- Returns:
- The original Instance for this key if the category is MODIFY_INSTANCE. Returns null for all other category of change
-
getModifiedProperties
public java.util.List<java.beans.PropertyChangeEvent> getModifiedProperties()
Description copied from interface:ChangeReturns a list of properties that were changed if the change category is MODIFY_INSTANCE.- Specified by:
getModifiedPropertiesin interfaceChange- Returns:
- A non-null and non-empty list of modified properties that were changed in the instance for change category MODIFY_INSTANCE. Returns null for all other change categories
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-