Record Class ScreenAccess

java.lang.Object
java.lang.Record
com.easydesk.web.screen.ScreenAccess
Record Components:
screenName - 검사한 화면 이름 (Screen Attribute 의 Option 이름)
registered - Screen Option 과 그 Artifact 가 DB 에 등록되어 있는지
requiredPermissions - 화면 Artifact 에 설정된 Permission 이름들 (미등록 화면은 [LoggedIn])
groupName - 권한을 확인한 Group 이름. Group 까지 가지 않고 결정됐으면 null
decision - 결과
reason - 결정 이유 (로그/디버그용)

public record ScreenAccess(String screenName, boolean registered, List<String> requiredPermissions, String groupName, ScreenAccess.Decision decision, String reason) extends Record
화면 접근 검사 결과. Torque OM 객체를 그대로 들고 다니지 않고 화면/로그에 필요한 값만 담는다 (Controller -> Template 데이터 전달 컨벤션과 같은 이유).
  • Constructor Details

    • ScreenAccess

      public ScreenAccess(String screenName, boolean registered, List<String> requiredPermissions, String groupName, ScreenAccess.Decision decision, String reason)
      Creates an instance of a ScreenAccess record class.
      Parameters:
      screenName - the value for the screenName record component
      registered - the value for the registered record component
      requiredPermissions - the value for the requiredPermissions record component
      groupName - the value for the groupName record component
      decision - the value for the decision record component
      reason - the value for the reason record component
  • Method Details

    • isAllowed

      public boolean isAllowed()
    • 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.
    • screenName

      public String screenName()
      Returns the value of the screenName record component.
      Returns:
      the value of the screenName record component
    • registered

      public boolean registered()
      Returns the value of the registered record component.
      Returns:
      the value of the registered record component
    • requiredPermissions

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

      public String groupName()
      Returns the value of the groupName record component.
      Returns:
      the value of the groupName record component
    • decision

      public ScreenAccess.Decision decision()
      Returns the value of the decision record component.
      Returns:
      the value of the decision record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component