Enum Class WithheldFromApi.Reason
- All Implemented Interfaces:
Serializable, Comparable<WithheldFromApi.Reason>, Constable
- Enclosing class:
WithheldFromApi
- Author:
- paul
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe value depends on who is asking rather than on the entity — an authorization flag, an ownership check, a per-principal count.Not per-caller, but still should not leave the building: internal filesystem paths, raw instrument headers, submitter-local identifiers, internal free-text notes.The member cannot mean anything to a client, so publishing it would mislead rather than inform.Withheld by curation or editorial policy rather than by a technical hazard.Nothing is being withheld: this datum is already on the wire under another name, or is trivially derivable from what is.Real data that a client might legitimately want, withheld only because Gemma Web was once the consumer, and not yet traced far enough to expose safely. -
Method Summary
Modifier and TypeMethodDescriptionstatic WithheldFromApi.ReasonReturns the enum constant of this class with the specified name.static WithheldFromApi.Reason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CALLER_IDENTITY
The value depends on who is asking rather than on the entity — an authorization flag, an ownership check, a per-principal count.Serializing one onto a response cached by URL is the classic cross-user leak. The dataset endpoints do carry
@CacheControl(isPrivate = true, authorities = {"GROUP_USER"})alongside theirmaxAge, which is what keeps this safe today; that is a second, independent control, and this marker exists so correctness does not rest on it alone.Never remove one of these without replacing it with something stronger.
-
DISCLOSURE
Not per-caller, but still should not leave the building: internal filesystem paths, raw instrument headers, submitter-local identifiers, internal free-text notes. -
REDUNDANT
Nothing is being withheld: this datum is already on the wire under another name, or is trivially derivable from what is. A denormalized copy, a flattened convenience accessor beside the object it flattens, or a member whose content a separate projection already publishes.This is the one reason that asserts no hazard, so it is deliberately exempt from the suppression enforcement in
WithheldFromApiInventoryTest— a property of the same name serializing elsewhere confirms the claim rather than contradicting it. Do not reach for it when the member is merely useless; that isINTERNAL_ONLY, and the distinction is what decides whether the guard watches the member or ignores it.Safe to delete outright. Name the member or projection that carries the data in
WithheldFromApi.comment(), so the claim can be rechecked. -
INTERNAL_ONLY
The member cannot mean anything to a client, so publishing it would mislead rather than inform. Three shapes recur:- nothing populates it, so it would serialize a permanent
0/null/""that reads as data; - its shape is lossy — a category-keyed map that silently drops colliding entries, say — so the honest form of the same data is elsewhere;
- it lives on a value object nothing serves, or exists purely as scaffolding for an editor that is gone.
REDUNDANT, the suppression here is doing real work, so it is enforced: exposing one of these publishes a falsehood, not a duplicate."Nothing populates it" is a claim about today's code and can quietly stop being true. Say in
WithheldFromApi.comment()which shape applies and how it was established, and prefer deleting the member over annotating it — for a field nobody writes, this annotation is a placeholder for that deletion. - nothing populates it, so it would serialize a permanent
-
POLICY
Withheld by curation or editorial policy rather than by a technical hazard. The data is not dangerous; we have decided not to publish it. Say whose decision inWithheldFromApi.comment()so it can be revisited by the right person. -
UNTRIAGED
Real data that a client might legitimately want, withheld only because Gemma Web was once the consumer, and not yet traced far enough to expose safely.This is debt, not a verdict, and it is the one reason that should never be chosen for a new member — it exists to carry the residue of the
@GemmaWebOnlymigration. Retiring one means tracing where it is populated and whether null is meaningful, then un-hiding it with aNON_NULLguard and a serialization test — the processCharacteristicValueObject.originalValuewent through in3646111985.
-
-
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
-