Class BrowserReport

java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.system.BrowserReport
All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, RemoteAddressBean, Cacheable

public class BrowserReport extends DatabaseBean implements RemoteAddressBean
A bean to store Reporting API payloads.
Since:
12.0
Version:
12.0
Author:
Luke
See Also:
  • Constructor Details

    • BrowserReport

      public BrowserReport(int build, String type)
      Creates the bean.
      Parameters:
      build - the build number
      type - the report type
  • Method Details

    • getType

      public String getType()
      Returns the report type.
      Returns:
      the type
    • getBuild

      public int getBuild()
      Returns the build numebr.
      Returns:
      the build
    • getCreatedOn

      public Instant getCreatedOn()
      Returns the creation date of this Report.
      Returns:
      the creation date/time
    • getDirective

      public String getDirective()
      Returns the triggered CSP directive.
      Returns:
      the directive name
    • getURL

      public String getURL()
      Returns the URL of the report violation.
      Returns:
      the URL
    • getHost

      public String getHost()
      Returns the blocked host name.
      Returns:
      the host name
    • getBody

      public String getBody()
      Returns the report body.
      Returns:
      the body JSON text
    • getRemoteAddr

      public String getRemoteAddr()
      Description copied from interface: RemoteAddressBean
      Returns the remote IP address.
      Specified by:
      getRemoteAddr in interface RemoteAddressBean
      Returns:
      an IPv4 or IPv6 address
    • getRemoteHost

      public String getRemoteHost()
      Description copied from interface: RemoteAddressBean
      Returns the remote host name.
      Specified by:
      getRemoteHost in interface RemoteAddressBean
      Returns:
      the host name, or address if unresolved
    • setCreatedOn

      public void setCreatedOn(Instant dt)
      Updates the creation date of this Report.
      Parameters:
      dt - the creation date/time
    • setHost

      public void setHost(String host)
      Updates the blocked host name.
      Parameters:
      host - the host name
    • setDirective

      public void setDirective(String d)
      Updates the triggered CSP directive.
      Parameters:
      d - the directive name
    • setURL

      public void setURL(String url)
      Updates the URL of the report violation.
      Parameters:
      url - the URL
    • setBody

      public void setBody(String body)
      Updates the report body.
      Parameters:
      body - the body JSON text
    • setRemoteAddress

      public void setRemoteAddress(String addr, String host)
      Updates the remote address that sumbitted this report.
      Parameters:
      addr - the remote IP address
      host - the remost host name