Record Class Model

java.lang.Object
java.lang.Record
io.micronaut.controlpanel.ui.Model
Record Components:
categories - The available categories.
applicationName - The application name.
activeEnvironments - The active environments.
contentView - The content view.
canRefresh - Whether the host application can be refreshed.
canStop - Whether the host application can be stopped.
ext - Any additional data to be passed to the view.

public record Model(List<ControlPanel.Category> categories, String applicationName, Set<String> activeEnvironments, io.micronaut.controlpanel.ui.Model.ContentView contentView, boolean canRefresh, boolean canStop, Map<String,Object> ext) extends Record
Model to be passed to the view for rendering.
  • Constructor Details

    • Model

      public Model(List<ControlPanel.Category> categories, String applicationName, Set<String> activeEnvironments, io.micronaut.controlpanel.ui.Model.ContentView contentView, boolean canRefresh, boolean canStop, Map<String,Object> ext)
      Creates an instance of a Model record class.
      Parameters:
      categories - the value for the categories record component
      applicationName - the value for the applicationName record component
      activeEnvironments - the value for the activeEnvironments record component
      contentView - the value for the contentView record component
      canRefresh - the value for the canRefresh record component
      canStop - the value for the canStop record component
      ext - the value for the ext record component
  • Method Details

    • 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.
    • categories

      public List<ControlPanel.Category> categories()
      Returns the value of the categories record component.
      Returns:
      the value of the categories record component
    • applicationName

      public String applicationName()
      Returns the value of the applicationName record component.
      Returns:
      the value of the applicationName record component
    • activeEnvironments

      public Set<String> activeEnvironments()
      Returns the value of the activeEnvironments record component.
      Returns:
      the value of the activeEnvironments record component
    • contentView

      public io.micronaut.controlpanel.ui.Model.ContentView contentView()
      Returns the value of the contentView record component.
      Returns:
      the value of the contentView record component
    • canRefresh

      public boolean canRefresh()
      Returns the value of the canRefresh record component.
      Returns:
      the value of the canRefresh record component
    • canStop

      public boolean canStop()
      Returns the value of the canStop record component.
      Returns:
      the value of the canStop record component
    • ext

      public Map<String,Object> ext()
      Returns the value of the ext record component.
      Returns:
      the value of the ext record component