Record Class BundleStatus

java.lang.Object
java.lang.Record
io.wcm.tooling.commons.packmgr.httpaction.BundleStatus
Record Components:
statusLine - Status Line from JSON string
total - Total bundles
active - Active bundles
activeFragment - Active fragment bundles
resolved - Resolved bundles
installed - Installed bundles
ignored - Ignored bundles
bundleSymbolicNames - Bundle symbolic names

public record BundleStatus(String statusLine, int total, int active, int activeFragment, int resolved, int installed, int ignored, Set<String> bundleSymbolicNames) extends Record
Wrapper for Status summary from Web Console Bundles Status info JSON.
  • Constructor Details

    • BundleStatus

      public BundleStatus(String statusLine, int total, int active, int activeFragment, int resolved, int installed, int ignored, Set<String> bundleSymbolicNames)
      Creates an instance of a BundleStatus record class.
      Parameters:
      statusLine - the value for the statusLine record component
      total - the value for the total record component
      active - the value for the active record component
      activeFragment - the value for the activeFragment record component
      resolved - the value for the resolved record component
      installed - the value for the installed record component
      ignored - the value for the ignored record component
      bundleSymbolicNames - the value for the bundleSymbolicNames record component
  • Method Details

    • getStatusLineCompact

      public String getStatusLineCompact()
      Returns:
      Compact version of status line.
    • isAllBundlesRunning

      public boolean isAllBundlesRunning()
      Returns:
      true if no bundles are in "installed" or "resolved" state.
    • containsBundle

      public boolean containsBundle(String symbolicName)
      Parameters:
      symbolicName - Bundle symbolic name
      Returns:
      true if the given bundle is contained in the bundle list
    • getMatchingBundle

      public String getMatchingBundle(Pattern symbolicNamePattern)
      Checks if a bundle with the given pattern exists in the bundle list.
      Parameters:
      symbolicNamePattern - Bundle symbolic name pattern
      Returns:
      Bundle name if a bundle was found, null otherwise
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • statusLine

      public String statusLine()
      Returns the value of the statusLine record component.
      Returns:
      the value of the statusLine record component
    • total

      public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • active

      public int active()
      Returns the value of the active record component.
      Returns:
      the value of the active record component
    • activeFragment

      public int activeFragment()
      Returns the value of the activeFragment record component.
      Returns:
      the value of the activeFragment record component
    • resolved

      public int resolved()
      Returns the value of the resolved record component.
      Returns:
      the value of the resolved record component
    • installed

      public int installed()
      Returns the value of the installed record component.
      Returns:
      the value of the installed record component
    • ignored

      public int ignored()
      Returns the value of the ignored record component.
      Returns:
      the value of the ignored record component
    • bundleSymbolicNames

      public Set<String> bundleSymbolicNames()
      Returns the value of the bundleSymbolicNames record component.
      Returns:
      the value of the bundleSymbolicNames record component