Record Class BundleStatus
java.lang.Object
java.lang.Record
io.wcm.tooling.commons.packmgr.httpaction.BundleStatus
- Record Components:
statusLine- Status Line from JSON stringtotal- Total bundlesactive- Active bundlesactiveFragment- Active fragment bundlesresolved- Resolved bundlesinstalled- Installed bundlesignored- Ignored bundlesbundleSymbolicNames- 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 Summary
ConstructorsConstructorDescriptionBundleStatus(String statusLine, int total, int active, int activeFragment, int resolved, int installed, int ignored, Set<String> bundleSymbolicNames) Creates an instance of aBundleStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintactive()Returns the value of theactiverecord component.intReturns the value of theactiveFragmentrecord component.Returns the value of thebundleSymbolicNamesrecord component.booleancontainsBundle(String symbolicName) final booleanIndicates whether some other object is "equal to" this one.getMatchingBundle(Pattern symbolicNamePattern) Checks if a bundle with the given pattern exists in the bundle list.final inthashCode()Returns a hash code value for this object.intignored()Returns the value of theignoredrecord component.intReturns the value of theinstalledrecord component.booleanintresolved()Returns the value of theresolvedrecord component.Returns the value of thestatusLinerecord component.final StringtoString()Returns a string representation of this record class.inttotal()Returns the value of thetotalrecord component.
-
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 aBundleStatusrecord class.- Parameters:
statusLine- the value for thestatusLinerecord componenttotal- the value for thetotalrecord componentactive- the value for theactiverecord componentactiveFragment- the value for theactiveFragmentrecord componentresolved- the value for theresolvedrecord componentinstalled- the value for theinstalledrecord componentignored- the value for theignoredrecord componentbundleSymbolicNames- the value for thebundleSymbolicNamesrecord component
-
-
Method Details
-
getStatusLineCompact
- Returns:
- Compact version of status line.
-
isAllBundlesRunning
public boolean isAllBundlesRunning()- Returns:
- true if no bundles are in "installed" or "resolved" state.
-
containsBundle
- Parameters:
symbolicName- Bundle symbolic name- Returns:
- true if the given bundle is contained in the bundle list
-
getMatchingBundle
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
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
statusLine
Returns the value of thestatusLinerecord component.- Returns:
- the value of the
statusLinerecord component
-
total
public int total()Returns the value of thetotalrecord component.- Returns:
- the value of the
totalrecord component
-
active
public int active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
activeFragment
public int activeFragment()Returns the value of theactiveFragmentrecord component.- Returns:
- the value of the
activeFragmentrecord component
-
resolved
public int resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-
installed
public int installed()Returns the value of theinstalledrecord component.- Returns:
- the value of the
installedrecord component
-
ignored
public int ignored()Returns the value of theignoredrecord component.- Returns:
- the value of the
ignoredrecord component
-
bundleSymbolicNames
Returns the value of thebundleSymbolicNamesrecord component.- Returns:
- the value of the
bundleSymbolicNamesrecord component
-