Package com.axelor.ai.governance.access
Class PermissionObjects
java.lang.Object
com.axelor.ai.governance.access.PermissionObjects
What an agent's permission or a restriction names: a model's full name, a package (
com.axelor.sale.db.*, no sub-packages), a custom model's name, or * for every model.-
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe object as a permission names it, from a name a person or an agent wrote: an entity's simple name becomes its full name.static booleancoversCustomModels(String object) Whether it names custom models, whose records share one entity and so take no condition.static booleancoversManyModels(String object) Whether the object names many models — every one, or a package's — rather than one.static booleanWhether the object names the model: as*, by its package, or exactly.static voidrequireField(String object, String field) Refuses a field the named model does not have, and a name no model answers to: one removed after it was named.
-
Method Details
-
canonical
The object as a permission names it, from a name a person or an agent wrote: an entity's simple name becomes its full name.- Throws:
IllegalArgumentException- when it names nothing, or several entities share the simple name
-
requireField
Refuses a field the named model does not have, and a name no model answers to: one removed after it was named. -
names
Whether the object names the model: as*, by its package, or exactly. -
coversManyModels
Whether the object names many models — every one, or a package's — rather than one. -
coversCustomModels
Whether it names custom models, whose records share one entity and so take no condition.
-