Class BeanChanges
java.lang.Object
com.tccc.kos.commons.core.service.config.BeanChanges
Class that tracks changes to values for a single bean during the configure/update process.
- Since:
- 1.0
- Version:
- 2022-09-01
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Return true if there is aAttrPair
for the specified attribute.boolean
containsAnyKey
(String... keys) Return true if the changes contains any of the specified keys.Return theAttrChange
for the specified attribute.getBean()
Return the bean that changed.Return the changed bean properties by attribute name.Return any errors captured while setting bean attributes.getPath()
Return the path of the bean that changed, if applicable.Return the list of scoped changes.boolean
Returns true after the very first time the bean is configured.boolean
isEmpty()
Returns true if no changes and no errors.void
-
Method Details
-
getChanges
Return the changed bean properties by attribute name. These are effective changes, after merging all scopes. -
get
Return theAttrChange
for the specified attribute.- Parameters:
attr
- the bean attribute
-
contains
Return true if there is aAttrPair
for the specified attribute. This does not return true if there is an error for the attribute.- Parameters:
attr
- the bean attribute to check
-
getBean
Return the bean that changed. This is typically aConfigBean
. -
getPath
Return the path of the bean that changed, if applicable. -
isConfigured
public boolean isConfigured()Returns true after the very first time the bean is configured. This can be used to determine if this is the first time the bean is being configured. -
getScopedChanges
Return the list of scoped changes. -
getErrors
Return any errors captured while setting bean attributes. -
containsAnyKey
Return true if the changes contains any of the specified keys.- Parameters:
keys
- the keys to check
-
isEmpty
public boolean isEmpty()Returns true if no changes and no errors. -
setBean
-