Enum Class AccessMode

java.lang.Object
java.lang.Enum<AccessMode>
com.jbstrap.ui.enums.AccessMode
All Implemented Interfaces:
Serializable, Comparable<AccessMode>, Constable

public enum AccessMode extends Enum<AccessMode>
Component access modes. These modes are the same as the access modes added to the components by using an annotation, but these are less relevant than the annotations.
Since:
4.0
Author:
JBStrap
  • Enum Constant Details

    • PUBLIC

      public static final AccessMode PUBLIC

      Marks a page, UI or component as public.

      If a page, UI or component is marked as public, every user can see it, even if they are not logged in to the application. By default, every UI and page is marked Private. Pages displayed to users who are not logged in must be marked with this annotation. Such pages and UIs are usually the application entry point (JBStrapParamType.ENTRY_POINT), or the login page (JBStrapParamType.LOGIN_PAGE). But other pages can be annotated, thus allowing the application to have a public section (that can be accessed without logging in) and a private section (that requires the user to log in).

      Since:
      4.0
    • PRIVATE

      public static final AccessMode PRIVATE

      Sets Private visibility on a page, UI, or component

      Pages that are set to private only appear if the user is logged in, and they have a role assigned, that has access the Page,Component or UI. The component can appear, if the user's current role isn't listed in the annotation as a denied role, and role is added to the allowed roles through code.

      If no denied or allowed role is specified, the default visibility will be enabled, meaning that the page, UI, or component will be visible to any logged in user.

      Since:
      4.0
  • Method Details

    • values

      public static AccessMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AccessMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromName

      public static AccessMode fromName(String name)
      Parameters:
      name - The access mode unique name
      Returns:
      The access mode corresponding to the specified name or null, if not found