Record Class PageContext

java.lang.Object
java.lang.Record
com.shaft.capture.model.PageContext
Record Components:
url - sanitized URL
title - page title
logicalWindowId - stable logical window or tab identifier
framePath - logical frame path from the top-level document
viewportWidth - viewport width in CSS pixels
viewportHeight - viewport height in CSS pixels

public record PageContext(String url, String title, String logicalWindowId, List<String> framePath, int viewportWidth, int viewportHeight) extends Record
Sanitized page state at the time of an event.
  • Constructor Details

    • PageContext

      public PageContext(String url, String title, String logicalWindowId, List<String> framePath, int viewportWidth, int viewportHeight)
      Creates immutable page context.
  • 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.
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • logicalWindowId

      public String logicalWindowId()
      Returns the value of the logicalWindowId record component.
      Returns:
      the value of the logicalWindowId record component
    • framePath

      public List<String> framePath()
      Returns the value of the framePath record component.
      Returns:
      the value of the framePath record component
    • viewportWidth

      public int viewportWidth()
      Returns the value of the viewportWidth record component.
      Returns:
      the value of the viewportWidth record component
    • viewportHeight

      public int viewportHeight()
      Returns the value of the viewportHeight record component.
      Returns:
      the value of the viewportHeight record component