Package cn.dinodev.spring.commons
Enum Class Scope.DEFAULT
- All Implemented Interfaces:
Scope,Serializable,Comparable<Scope.DEFAULT>,Constable
- Enclosing interface:
Scope
默认的作用域枚举实现。
定义了四个基本的作用域级别,按照优先级从低到高排列:
- SYS: 系统级作用域,优先级最高
- TENANT: 租户级作用域
- PAGE: 页面级作用域
- USER: 用户级作用域,优先级最低
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface cn.dinodev.spring.commons.Scope
Scope.DEFAULT -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetName()scope 的名字intgetOrder()scope 顺序Scope[]higherScopes(boolean includeThis) 比自己优先级高的ScopesScope[]lowerScopes(boolean includeThis) 比自己优先级低的Scopesstatic Scope根据作用域名称获取对应的Scope实例。provider()获取作用域提供者函数。toString()static Scope.DEFAULTReturns the enum constant of this class with the specified name.static Scope.DEFAULT[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SYS
-
TENANT
-
PAGE
-
USER
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getName
Description copied from interface:Scopescope 的名字 -
getOrder
public int getOrder()Description copied from interface:Scopescope 顺序 -
lowerScopes
Description copied from interface:Scope比自己优先级低的Scopes- Specified by:
lowerScopesin interfaceScope- Parameters:
includeThis- 是否包含本Scope- Returns:
- 比自己小或等于自己排序的Scopes
-
higherScopes
Description copied from interface:Scope比自己优先级高的Scopes- Specified by:
higherScopesin interfaceScope- Parameters:
includeThis- 是否包含本Scope- Returns:
- 比自己大或等于自己排序的Scopes
-
toString
- Overrides:
toStringin classEnum<Scope.DEFAULT>
-
provider
获取作用域提供者函数。返回一个函数,该函数可以根据作用域名称字符串获取对应的Scope实例。
- Returns:
- 作用域提供者函数
-
of
根据作用域名称获取对应的Scope实例。将输入的名称转换为大写后进行匹配。
- Parameters:
name- 作用域名称- Returns:
- 对应的Scope实例
- Throws:
IllegalArgumentException- 如果找不到对应的作用域
-