Class BeanChanges

java.lang.Object
com.tccc.kos.commons.core.service.config.BeanChanges

public class BeanChanges extends Object
Class that tracks changes to values for a single bean during the configure/update process.
Since:
1.0
Version:
2022-09-01
  • Method Details

    • getChanges

      public List<BeanChanges.AttrChange> getChanges()
      Return the changed bean properties by attribute name. These are effective changes, after merging all scopes.
    • get

      public BeanChanges.AttrChange get(String attr)
      Return the AttrChange for the specified attribute.
      Parameters:
      attr - the bean attribute
    • contains

      public boolean contains(String attr)
      Return true if there is a AttrPair 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

      public Object getBean()
      Return the bean that changed. This is typically a ConfigBean .
    • getPath

      public String 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

      public List<BeanChanges.AttrChange> getScopedChanges()
      Return the list of scoped changes.
    • getErrors

      public List<BeanChanges.Error> getErrors()
      Return any errors captured while setting bean attributes.
    • containsAnyKey

      public boolean containsAnyKey(String... keys)
      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

      public void setBean(Object bean)