Class UiShowViewContext

java.lang.Object
io.jmix.flowui.accesscontext.UiShowViewContext
All Implemented Interfaces:
AccessContext

public class UiShowViewContext extends Object implements AccessContext
Defines an authorization point for showing View. Determines whether a specific UI view can be displayed based on access permissions.
  • Field Details

    • viewId

      protected final String viewId
    • permitted

      protected boolean permitted
  • Constructor Details

    • UiShowViewContext

      public UiShowViewContext(String viewId)
  • Method Details

    • getViewId

      public String getViewId()
      Retrieves the identifier of the View associated with this context.
      Returns:
      the view identifier
    • setDenied

      public void setDenied()
      Denies access for the associated View by setting the permission state to false. This method is used to explicitly restrict access within the current context.
    • isPermitted

      public boolean isPermitted()
      Checks whether access is permitted within the current context.
      Returns:
      true if access is permitted, false otherwise
    • explainConstraints

      @Nullable public String explainConstraints()
      Description copied from interface: AccessContext
      Returns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions. Null if the current context does not impose any constraints.
      Specified by:
      explainConstraints in interface AccessContext