Interface DeveloperPanelProviderInterface
- All Known Implementing Classes:
EsbDeveloperPanelProvider,RecordSecurityDeveloperPanelProvider
public interface DeveloperPanelProviderInterface
Contributes a panel to a record's developer view.
Any module or qbit can provide one: implement this interface, and register
the class in the instance with
DeveloperPanelsMetaData.ofOrWithNew(qInstance).withProvider(new QCodeReference(MyProvider.class))
(e.g., from a MetaDataProducer or a qbit's produce method).
For each request, isAvailable(com.kingsrook.qqq.backend.core.model.developer.DeveloperPanelContext) is asked first; only when it returns
true is build(com.kingsrook.qqq.backend.core.model.developer.DeveloperPanelContext) called. Providers must only reveal what the current
user (QContext.getQSession()) is allowed to see - the record in the context
was already read under the user's table permissions and record security
locks, but anything else a provider reads (other tables, processes,
external systems) must check its own permissions. A provider that throws
gets a panel with an error message; the other panels are unaffected.-
Method Summary
Modifier and TypeMethodDescriptionbuild(DeveloperPanelContext context) Build the panel's content.default StringgetIcon()Optional icon-name hint for the frontend (a Material icon name).getId()Stable identifier of the panel, unique in the instance (e.g., "esb").default IntegergetOrder()Sort order among panels (lower first).getTitle()Heading of the panel.booleanisAvailable(DeveloperPanelContext context) Whether this provider has anything to show for the context's table (and record) for the current user - e.g., the module is installed and active for the table, and the user may use it.
-
Method Details
-
getId
String getId()Stable identifier of the panel, unique in the instance (e.g., "esb"). -
getTitle
String getTitle()Heading of the panel. -
getOrder
Sort order among panels (lower first). Built-in panels use 100-199; qbits default to 500. -
getIcon
Optional icon-name hint for the frontend (a Material icon name). -
isAvailable
Whether this provider has anything to show for the context's table (and record) for the current user - e.g., the module is installed and active for the table, and the user may use it.- Throws:
QException
-
build
Build the panel's content. The id, title, order and icon are filled in from this provider when the returned panel leaves them null.- Throws:
QException
-