Enum Class HttpAccess
- All Implemented Interfaces:
Serializable, Comparable<HttpAccess>, Constable
THE HTTP access kind of a service operation's parameter: where in the request its value comes from. The six
constants are exactly the words of the grammar's
httpAccess rule, in its order, and each constant's NAME is
the text the lexer reads, the text stored on the parameter (the HTTP_ACCESS squirrel), the text carried in the IR
(ServiceRouteDetails.ParamBinding) and the text the run time reports in a bad-request response - so
the front end, the IR and the back end switch on this type and a rename can no longer compile clean and break
route binding (F14, 2026-10-20: it was seven string compares in phase 2, one in phase 7 and bare
case "PATH" literals in the JVM back end).
HttpAccessTest ties every constant to a lexer token and every token to a constant.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe request body - cannot be qualified.The HTTPContext - cannot be qualified.A header value; the source is its name.A variable of the URI path ({id}); the source is its name.A query-string value; the source is its name.The whole HTTPRequest - cannot be qualified. -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<HttpAccess> The access kind stored on this parameter, or empty if none has been stored yet.static voiddefaultOnto(ISymbol param) THE defaulting of a service parameter that declares no access: it is a PATH parameter bound to the placeholder of its own name.booleanTrue for the kinds that name a value to extract (PATH, QUERY, HEADER) and so need a source name; the others cannot be qualified.static HttpAccessThe access kind of this parameter: what was stored, else PATH - the kind an unqualified service parameter is assumed to be (seedefaultOnto(ISymbol)), so a check that runs without having asked for the default first still gets the answer the default would have given.static Optional<HttpAccess> The access kind a text names, or empty when it is not one of the six words.voidStore this access kind on the parameter, as the one writer of theHTTP_ACCESSsquirrel.static HttpAccessReturns the enum constant of this class with the specified name.static HttpAccess[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PATH
A variable of the URI path ({id}); the source is its name. -
HEADER
A header value; the source is its name. -
QUERY
A query-string value; the source is its name. -
REQUEST
The whole HTTPRequest - cannot be qualified. -
CONTENT
The request body - cannot be qualified. -
CONTEXT
The HTTPContext - cannot be qualified.
-
-
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
-
needsSource
public boolean needsSource()True for the kinds that name a value to extract (PATH, QUERY, HEADER) and so need a source name; the others cannot be qualified. -
parse
The access kind a text names, or empty when it is not one of the six words. -
accessOf
The access kind stored on this parameter, or empty if none has been stored yet. -
of
The access kind of this parameter: what was stored, else PATH - the kind an unqualified service parameter is assumed to be (seedefaultOnto(ISymbol)), so a check that runs without having asked for the default first still gets the answer the default would have given. -
putOn
Store this access kind on the parameter, as the one writer of theHTTP_ACCESSsquirrel. -
defaultOnto
THE defaulting of a service parameter that declares no access: it is a PATH parameter bound to the placeholder of its own name. That is an assumption - the checks that follow test the path really has it. A PATH parameter that declares no source takes its own name as the source.
-