Record Class WidgetCodeResult

java.lang.Object
java.lang.Record
io.meeds.ide.mcp.model.WidgetCodeResult
Record Components:
applicationId - the window's storage id on the draft
widgetId - the widget the window renders, the draft's own copy
html - the widget's HTML
css - the widget's CSS
js - the widget's JavaScript
draftCreated - whether this call created the user's draft, whose ids differ from the published layout's

public record WidgetCodeResult(String applicationId, long widgetId, String html, String css, String js, boolean draftCreated) extends Record
What update_widget_code answers: the window on the user's draft, the widget it now renders and its code
  • Constructor Details

    • WidgetCodeResult

      public WidgetCodeResult(String applicationId, long widgetId, String html, String css, String js, boolean draftCreated)
      Creates an instance of a WidgetCodeResult record class.
      Parameters:
      applicationId - the value for the applicationId record component
      widgetId - the value for the widgetId record component
      html - the value for the html record component
      css - the value for the css record component
      js - the value for the js record component
      draftCreated - the value for the draftCreated 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 the compare method from their corresponding wrapper classes.
      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.
    • applicationId

      public String applicationId()
      Returns the value of the applicationId record component.
      Returns:
      the value of the applicationId record component
    • widgetId

      public long widgetId()
      Returns the value of the widgetId record component.
      Returns:
      the value of the widgetId record component
    • html

      public String html()
      Returns the value of the html record component.
      Returns:
      the value of the html record component
    • css

      public String css()
      Returns the value of the css record component.
      Returns:
      the value of the css record component
    • js

      public String js()
      Returns the value of the js record component.
      Returns:
      the value of the js record component
    • draftCreated

      public boolean draftCreated()
      Returns the value of the draftCreated record component.
      Returns:
      the value of the draftCreated record component