Package org.apache.juneau.console.views
Class JobLogChecks
java.lang.Object
org.apache.juneau.console.views.JobLogChecks
The shared shape checks of a job-log declaration, used by the console's page-level
job-log card and by a
JobLogRegion, so the two cannot drift.
Every check throws an IllegalArgumentException whose message names the offending key relative to the
job-log body (for example "submit.fields[0] type must be ..."); each caller prefixes its own context.
- Since:
- 10.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhere a job-log declaration lives. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternThe grammar ofsubmit.action; the page schema'sid.Thedetailkeys, in message order.A field's keys, in message order.The field types.static final PatternThe grammar ofoutput.from.Theoutputkeys, in message order.The page card'ssubmitkeys, in message order.A region'ssubmitkeys, in message order.static final PatternThe grammar of a field'ssource:row.<identifier>, nothing nested. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclearOnSubmit(Object clear) ChecksclearOnSubmit.static voidChecks a region'sdetailobject:{renderer, fields}.static voidfield(int i, Object f, JobLogChecks.Mode mode, boolean actionEnvelope) Checks one field.static voidChecksheight.static voidChecks anoutputobject.static voidsubmit(Map<?, ?> submit, JobLogChecks.Mode mode) Checks asubmitobject's keys, method, label, envelope, action, key URL and fields.
-
Field Details
-
SOURCE
The grammar of a field'ssource:row.<identifier>, nothing nested. -
OUTPUT_FROM
The grammar ofoutput.from. -
ACTION
The grammar ofsubmit.action; the page schema'sid. -
PAGE_SUBMIT_KEYS
The page card'ssubmitkeys, in message order. -
REGION_SUBMIT_KEYS
A region'ssubmitkeys, in message order. -
FIELD_KEYS
A field's keys, in message order. -
FIELD_TYPES
The field types. -
OUTPUT_KEYS
Theoutputkeys, in message order. -
DETAIL_KEYS
Thedetailkeys, in message order.
-
-
Method Details
-
submit
Checks asubmitobject's keys, method, label, envelope, action, key URL and fields.The page card checks its own
endpointfirst (it has the console's same-origin rule); a region'sendpointandkeyUrlare checked here as same-origin templates whose only token is{id}.- Parameters:
submit- Thesubmitobject.mode- Where the declaration lives.- Throws:
IllegalArgumentException- If a rule is broken.
-
field
Checks one field.- Parameters:
i- The field's index, for the message.f- The field.mode- Where the declaration lives;sourceneeds a row, so the page card rejects it.actionEnvelope- Whether the fields are nested underfields(no reserved names) or flat.- Throws:
IllegalArgumentException- If a rule is broken.
-
output
Checks anoutputobject.- Parameters:
o- Theoutputvalue.- Throws:
IllegalArgumentException- If a rule is broken.
-
detail
Checks a region'sdetailobject:{renderer, fields}.- Parameters:
o- Thedetailvalue.- Throws:
IllegalArgumentException- If a rule is broken.
-
height
Checksheight.- Parameters:
height- The value. Can benull .min- The smallest accepted height, in pixels.- Throws:
IllegalArgumentException- If it is set and not an integer of at leastmin.
-
clearOnSubmit
ChecksclearOnSubmit.- Parameters:
clear- The value. Can benull .- Throws:
IllegalArgumentException- If it is set and not a boolean.
-