Record Class SurfaceAvailabilityContext

java.lang.Object
java.lang.Record
org.praxisplatform.uischema.surface.SurfaceAvailabilityContext

public record SurfaceAvailabilityContext(String resourceKey, String resourcePath, Object resourceId, String tenant, Locale locale, Principal principal, Set<String> authorities, ResourceStateSnapshot resourceState) extends Record
Contexto canonico de avaliacao de disponibilidade de surfaces.

O contexto representa sinais compartilhados do request/catalogo atual: identidade do recurso, `resourceId` concreto quando houver, tenancy, locale, principal, authorities e snapshot opcional do estado do recurso.

  • Constructor Details

    • SurfaceAvailabilityContext

      public SurfaceAvailabilityContext(String resourceKey, String resourcePath, Object resourceId, String tenant, Locale locale, Principal principal, Set<String> authorities, ResourceStateSnapshot resourceState)
      Creates an instance of a SurfaceAvailabilityContext record class.
      Parameters:
      resourceKey - the value for the resourceKey record component
      resourcePath - the value for the resourcePath record component
      resourceId - the value for the resourceId record component
      tenant - the value for the tenant record component
      locale - the value for the locale record component
      principal - the value for the principal record component
      authorities - the value for the authorities record component
      resourceState - the value for the resourceState 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • resourceKey

      public String resourceKey()
      Returns the value of the resourceKey record component.
      Returns:
      the value of the resourceKey record component
    • resourcePath

      public String resourcePath()
      Returns the value of the resourcePath record component.
      Returns:
      the value of the resourcePath record component
    • resourceId

      public Object resourceId()
      Returns the value of the resourceId record component.
      Returns:
      the value of the resourceId record component
    • tenant

      public String tenant()
      Returns the value of the tenant record component.
      Returns:
      the value of the tenant record component
    • locale

      public Locale locale()
      Returns the value of the locale record component.
      Returns:
      the value of the locale record component
    • principal

      public Principal principal()
      Returns the value of the principal record component.
      Returns:
      the value of the principal record component
    • authorities

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

      public ResourceStateSnapshot resourceState()
      Returns the value of the resourceState record component.
      Returns:
      the value of the resourceState record component