- All Implemented Interfaces:
Serializable,Comparable<UploadPack.RequestPolicy>,java.lang.constant.Constable
- Enclosing class:
- UploadPack
Policy the server uses to validate client requests
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClient may only ask for objects the server advertised a reference for.Client may ask for any SHA-1 in the repository, implies REACHABLE_COMMIT_TIP.Client may ask for any commit reachable from a reference advertised by the server.Client may ask for any commit reachable from any reference, even if that reference wasn't advertised, implies REACHABLE_COMMIT and TIP.Client may ask for objects that are the tip of any reference, even if not advertised. -
Method Summary
Modifier and TypeMethodDescriptionbooleanimplies(UploadPack.RequestPolicy implied) Check if the current policy implies another, based on its bitmask.static UploadPack.RequestPolicyReturns the enum constant of this class with the specified name.static UploadPack.RequestPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ADVERTISED
Client may only ask for objects the server advertised a reference for. -
REACHABLE_COMMIT
Client may ask for any commit reachable from a reference advertised by the server. -
TIP
Client may ask for objects that are the tip of any reference, even if not advertised.This may happen, for example, when a custom
RefFilteris set.- Since:
- 3.1
-
REACHABLE_COMMIT_TIP
Client may ask for any commit reachable from any reference, even if that reference wasn't advertised, implies REACHABLE_COMMIT and TIP.- Since:
- 3.1
-
ANY
Client may ask for any SHA-1 in the repository, implies REACHABLE_COMMIT_TIP.
-
-
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
-
implies
Check if the current policy implies another, based on its bitmask.- Parameters:
implied- the implied policy based on its bitmask.- Returns:
- true if the policy is implied.
- Since:
- 6.10.1
-