Class AiLinkBuilder
java.lang.Object
com.kingsrook.qqq.backend.core.actions.ai.output.AiLinkBuilder
Builds the in-app (same-origin) links the AI tool kernel returns, in the
route grammar of the QQQ Next UI - which addresses every table, process,
report and app by name directly under /app (not under the path of the app
that contains it):
table /app/{table}
filtered table /app/{table}?filter={base64 of the filter JSON}
record /app/{table}/{id}
process /app/{process}
report / app /app/{report} , /app/{app}
(the same grammar as the Next UI's recordSearchResultPath and
ProcessSummaryLines links, and its deserializeFilter accepts the base64
filter parameter.) Every path segment is URL-encoded.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringURL-encode a path segment (with spaces as %20, not +).static StringfilteredTableHref(String tableName, QQueryFilter filter) The link to a table's list screen, with a filter applied.static booleanisSafeAppPath(String path) Whether a path is a safe, same-origin in-app path: it starts with /app/, and contains only URL-safe (or percent-encoded) characters - so no scheme, no protocol-relative "//" host, no backslashes, no whitespace, no "..".static StringobjectHref(String name) The link to a table's list screen (or to a process, report or app).static StringrecordHref(String tableName, Serializable id) The link to a record's view screen.
-
Field Details
-
APP_PREFIX
- See Also:
-
-
Constructor Details
-
AiLinkBuilder
public AiLinkBuilder()
-
-
Method Details
-
objectHref
-
recordHref
The link to a record's view screen. -
filteredTableHref
The link to a table's list screen, with a filter applied. -
isSafeAppPath
Whether a path is a safe, same-origin in-app path: it starts with /app/, and contains only URL-safe (or percent-encoded) characters - so no scheme, no protocol-relative "//" host, no backslashes, no whitespace, no "..". -
encode
-