Enum Class MvcScope

java.lang.Object
java.lang.Enum<MvcScope>
com.jk.web.mvc.MvcScope
All Implemented Interfaces:
Serializable, Comparable<MvcScope>, Constable

public enum MvcScope extends Enum<MvcScope>
This enum represents different scopes for Model-View-Controller (MVC) models.
Version:
1.0
Author:
Dr. Jalal H. Kiswani
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Represents the application scope, where the model instance is available for the entire application's life-cycle.
    Represents the request scope, where the model instance is available for the duration of a single HTTP request.
    Represents the session scope, where the model instance is available for the duration of a user session.
    Represents the view scope, where the model instance is available for the duration of a view rendering.
  • Method Summary

    Modifier and Type
    Method
    Description
    static MvcScope
    Returns the enum constant of this class with the specified name.
    static MvcScope[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • REQUEST

      public static final MvcScope REQUEST
      Represents the request scope, where the model instance is available for the duration of a single HTTP request.
    • VIEW

      public static final MvcScope VIEW
      Represents the view scope, where the model instance is available for the duration of a view rendering.
    • SESSION

      public static final MvcScope SESSION
      Represents the session scope, where the model instance is available for the duration of a user session.
    • APPLICATIONS

      public static final MvcScope APPLICATIONS
      Represents the application scope, where the model instance is available for the entire application's life-cycle.
  • Method Details

    • values

      public static MvcScope[] 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 MvcScope 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