Package com.axelor.ai.governance.access
Class Projection
java.lang.Object
com.axelor.ai.governance.access.Projection
The one way the AI reads a record: what it asks for, refused when the user may not read it, and
what comes along unasked — a name field, a relation's name — withheld with a marker.
A withheld value is listed under HIDDEN on the map that would have held it, so the
agent knows something is there and does not take the gap for "no data". $ cannot start a
field name, so the key never collides with one.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidreadable(ModelRef model, Collection<String> names) The names amongnamesthe user may read, for a message that lists a model's fields.readDenial(ModelRef model, Collection<String> fields) The refusal for asked-for fields the user may not read, naming every one of them; null when all are readable.A record'sid,versionand the asked-for fields, whichreadDenial(com.axelor.ai.governance.access.ModelRef, java.util.Collection<java.lang.String>)has cleared; with none asked, its name field, withheld when unreadable.record(MetaJsonRecord record, MetaJsonModel jsonModel, List<String> fields) The same for a custom model's record.A related record, as the agent sees it:{id, <name field>}; the name withheld when the user may not read it;{id}alone when they may not read the related record — its model, or the row, which a permission's condition may exclude — the id being the parent's own column.Form values as the user may read them: what a form holds, loaded or edited, or what a run of it changed.
-
Field Details
-
HIDDEN
- See Also:
-
-
Constructor Details
-
Projection
-
-
Method Details
-
readDenial
The refusal for asked-for fields the user may not read, naming every one of them; null when all are readable. Names the model does not have are the caller's to refuse first: a typo is not a denial. -
readable
The names amongnamesthe user may read, for a message that lists a model's fields. -
record
A record'sid,versionand the asked-for fields, whichreadDenial(com.axelor.ai.governance.access.ModelRef, java.util.Collection<java.lang.String>)has cleared; with none asked, its name field, withheld when unreadable. Relations are flattened (relation(com.axelor.db.Model)), collections item by item. -
record
public Map<String,Object> record(MetaJsonRecord record, MetaJsonModel jsonModel, List<String> fields) The same for a custom model's record. -
relation
A related record, as the agent sees it:{id, <name field>}; the name withheld when the user may not read it;{id}alone when they may not read the related record — its model, or the row, which a permission's condition may exclude — the id being the parent's own column. -
screen
Form values as the user may read them: what a form holds, loaded or edited, or what a run of it changed. A field they may not read is left out, its display keys (status$value) with it, and listed underHIDDEN. A relation's values are screened against the model it points at, and are the id alone when the user may not read that model. A key that names no field of the model — a dummy, a bookkeeping key — is kept: it stores nothing, and nothing restricts it. -
hide
-