public enum CapabilityScope extends java.lang.Enum<CapabilityScope>
RequiresCapability
.Enum Constant and Description |
---|
CONTEXT
Scope is assumed based on the context.
|
CORE
Scope is the core server.
|
PLUGIN
Scope is only the plugin.
|
Modifier and Type | Method and Description |
---|---|
static CapabilityScope |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CapabilityScope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CapabilityScope CONTEXT
When @RequiresCapability
is used within a plugin the scope of the capability is
assumed to be that plugin.
If @RequiresCapability
is used within the core Gerrit Code Review server (and thus
is outside of a plugin) the scope is the core server and will use com.google.gerrit.common.data.GlobalCapability
.
public static final CapabilityScope PLUGIN
public static final CapabilityScope CORE
public static CapabilityScope[] values()
for (CapabilityScope c : CapabilityScope.values()) System.out.println(c);
public static CapabilityScope valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null