Class QInstance
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.QInstance
Container for all meta-data in a running instance of a QQQ application.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TopLevelMetaDataInterface metaData) voidaddApp(QAppMetaData app) voidaddAutomationProvider(QAutomationProviderMetaData automationProvider) voidaddBackend(QBackendMetaData backend) voidaddJoin(QJoinMetaData join) voidaddMessagingProvider(QMessagingProviderMetaData messagingProvider) voidaddPossibleValueSource(QPossibleValueSource possibleValueSource) voidaddProcess(QProcessMetaData process) voidaddQBit(QBitMetaData qBitMetaData) voidaddQueue(QQueueMetaData queue) voidaddQueueProvider(QQueueProviderMetaData queueProvider) voidaddReport(QReportMetaData report) voidaddSchedulableType(SchedulableType schedulableType) voidaddScheduler(QSchedulerMetaData scheduler) voidaddSecurityKeyType(QSecurityKeyType securityKeyType) addSupplementalCustomizer(SupplementalCustomizerType type, QCodeReference customizer) Fluent adder to supplementalCustomizersvoidaddTable(QTableMetaData table) voidaddWidget(QWidgetMetaDataInterface widget) Find an authentication provider for a specific scope.getApps()Getter for appsGetter for authenticationgetAutomationProvider(String name) Getter for automationProvidersgetBackend(String name) getBackendForTable(String tableName) Get the backend for a given table nameGetter for backendsGetter for brandingGetter for defaultAuditRulesGetter for defaultPermissionRulesGetter for defaultTimeZoneIdGetter for deploymentModeGetter for environmentValuesbooleanGetter for hasBeenValidatedGetter for helpContentgetJoins()Getter for joinsgetMessagingProvider(String name) Getter for messagingProvidersGetter for metaDataActionCustomizerDeprecated.getPossibleValueSource(String name) Getter for possibleValueSourcesgetProcess(String name) Getter for processesgetProcessesForTable(String tableName) Get the list of processes associated with a given table namegetProcessPath(String processName) Get the full path to a process - note - this will be regardless of whether or not the active session/user has access to the process.getProcessStep(String processName, String functionName) getQBits()Getter for qBitsgetQueueProvider(String name) Getter for queueProvidersGetter for queuesGetter for reportsgetSchedulableType(String name) Getter for schedulableTypesgetScheduler(String name) Getter for schedulersGet all registered scoped authentication providers.getSecurityKeyType(String name) Getter for securityKeyTypesGetter for a supplemental customizer based on typeGetter for supplementalCustomizersGetter for supplementalMetaDataGetter for supplementalMetaDataGetter for tableCustomizersgetTableCustomizers(TableCustomizers tableCustomizer) Getter for tableCustomizersgetTablePath(String tableName) Get the full path to a table - note - this will be regardless of whether or not the active session/user has access to the table.Getter for tablesbooleancheck if the instance is currently running validation.Getter for widgetsvoidregisterAuthenticationProvider(AuthScope scope, QAuthenticationMetaData authMetaData) Register an authentication provider for a specific scope.voidremoveHelpContent(String slot, Set<HelpRole> roles) remove a helpContent for a slot based on its set of rolesvoidsetApps(Map<String, QAppMetaData> apps) Setter for appssetAuthentication(QAuthenticationMetaData authentication) Deprecated.voidsetAutomationProviders(Map<String, QAutomationProviderMetaData> automationProviders) Setter for automationProvidersvoidsetBackends(Map<String, QBackendMetaData> backends) Setter for backendsvoidsetBranding(QBrandingMetaData branding) Setter for brandingvoidsetDefaultAuditRules(QAuditRules defaultAuditRules) Setter for defaultAuditRulesvoidsetDefaultPermissionRules(QPermissionRules defaultPermissionRules) Setter for defaultPermissionRulesvoidsetDefaultTimeZoneId(String defaultTimeZoneId) Setter for defaultTimeZoneIdvoidsetDeploymentMode(String deploymentMode) Setter for deploymentModevoidsetEnvironmentValues(Map<String, String> environmentValues) Setter for environmentValuesvoidIf pass a QInstanceValidationKey (which can only be instantiated by the validator), then the validationState will be set to COMPLETE.voidsetHelpContent(Map<String, List<QHelpContent>> helpContent) Setter for helpContentvoidsetJoinGraph(QInstanceValidationKey key, JoinGraph joinGraph) Only the validation (and enrichment) code should set the instance's joinGraph so, we take a package-only-constructable validation key as a param along with the joinGraph - and we throw IllegalArgumentException if a non-null key is given.voidsetJoins(Map<String, QJoinMetaData> joins) Setter for joinsvoidsetMessagingProviders(Map<String, QMessagingProviderMetaData> messagingProviders) Setter for messagingProvidersvoidsetMetaDataActionCustomizer(QCodeReference metaDataActionCustomizer) Setter for metaDataActionCustomizervoidsetMetaDataFilter(QCodeReference metaDataFilter) Deprecated.voidsetPossibleValueSources(Map<String, QPossibleValueSource> possibleValueSources) Setter for possibleValueSourcesvoidsetProcesses(Map<String, QProcessMetaData> processes) Setter for processesvoidsetQBits(Map<String, QBitMetaData> qBits) Setter for qBitsvoidsetQueueProviders(Map<String, QQueueProviderMetaData> queueProviders) Setter for queueProvidersvoidsetQueues(Map<String, QQueueMetaData> queues) Setter for queuesvoidsetReports(Map<String, QReportMetaData> reports) Setter for reportsvoidsetSchedulableTypes(Map<String, SchedulableType> schedulableTypes) Setter for schedulableTypesvoidsetSchedulers(Map<String, QSchedulerMetaData> schedulers) Setter for schedulersvoidsetSecurityKeyTypes(Map<String, QSecurityKeyType> securityKeyTypes) Setter for securityKeyTypesvoidsetSupplementalCustomizers(Map<SupplementalCustomizerType, QCodeReference> supplementalCustomizers) Setter for supplementalCustomizersvoidsetSupplementalMetaData(Map<String, QSupplementalInstanceMetaData> supplementalMetaData) Setter for supplementalMetaDatavoidsetTableCustomizers(ListingHash<String, QCodeReference> tableCustomizers) Setter for tableCustomizersvoidsetTables(Map<String, QTableMetaData> tables) Setter for tablesvoidIf pass a QInstanceValidationKey (which can only be instantiated by the validator), then the validationState set to RUNNING.voidsetWidgets(Map<String, QWidgetMetaDataInterface> widgets) Setter for widgetswithDefaultAuditRules(QAuditRules defaultAuditRules) Fluent setter for defaultAuditRuleswithDefaultPermissionRules(QPermissionRules defaultPermissionRules) Fluent setter for defaultPermissionRuleswithDefaultTimeZoneId(String defaultTimeZoneId) Fluent setter for defaultTimeZoneIdwithDeploymentMode(String deploymentMode) Fluent setter for deploymentModewithHelpContent(String slot, QHelpContent helpContent) Fluent setter for adding 1 helpContent (for a slot)withHelpContent(Map<String, List<QHelpContent>> helpContent) Fluent setter for helpContentwithInstanceDefaultAuthentication(QAuthenticationMetaData authMetaData) Fluent setter for instance default authentication.withMetaDataActionCustomizer(QCodeReference metaDataActionCustomizer) Fluent setter for metaDataActionCustomizerwithMetaDataFilter(QCodeReference metaDataFilter) Deprecated.withQBits(Map<String, QBitMetaData> qBits) Fluent setter for qBitswithSupplementalCustomizers(Map<SupplementalCustomizerType, QCodeReference> supplementalCustomizers) Fluent setter for supplementalCustomizerswithSupplementalMetaData(QSupplementalInstanceMetaData supplementalMetaData) Fluent setter for supplementalMetaDatawithSupplementalMetaData(Map<String, QSupplementalInstanceMetaData> supplementalMetaData) Fluent setter for supplementalMetaDatawithTableCustomizer(TableCustomizers tableCustomizer, QCodeReference customizer) withTableCustomizer(String role, QCodeReference customizer) withTableCustomizers(ListingHash<String, QCodeReference> tableCustomizers) Fluent setter for tableCustomizers
-
Field Details
-
helpContent
-
-
Constructor Details
-
QInstance
public QInstance()
-
-
Method Details
-
getBackendForTable
Get the backend for a given table name -
getProcessesForTable
Get the list of processes associated with a given table name -
getTablePath
Get the full path to a table - note - this will be regardless of whether or not the active session/user has access to the table. You may want to also call PermissionsHelper.getPermissionCheckResult to confirm if user has permission.- Throws:
QException
-
getProcessPath
Get the full path to a process - note - this will be regardless of whether or not the active session/user has access to the process. You may want to also call PermissionsHelper.getPermissionCheckResult to confirm if user has permission.- Throws:
QException
-
addBackend
-
getBackend
-
getBackends
Getter for backends -
setBackends
Setter for backends -
addTable
-
getTable
-
getTables
Getter for tables -
setTables
Setter for tables -
addJoin
-
getJoin
-
getJoins
Getter for joins -
setJoins
Setter for joins -
addPossibleValueSource
-
getPossibleValueSource
-
getPossibleValueSources
Getter for possibleValueSources -
setPossibleValueSources
Setter for possibleValueSources -
getProcessStep
-
addProcess
-
getProcess
-
getProcesses
Getter for processes -
setProcesses
Setter for processes -
addApp
-
getApp
-
getApps
Getter for apps -
setApps
Setter for apps -
addReport
-
getReport
-
getReports
Getter for reports -
setReports
Setter for reports -
getSupplementalCustomizer
Getter for a supplemental customizer based on type- See Also:
-
getSupplementalCustomizers
Getter for supplementalCustomizers- See Also:
-
setSupplementalCustomizers
public void setSupplementalCustomizers(Map<SupplementalCustomizerType, QCodeReference> supplementalCustomizers) Setter for supplementalCustomizers- See Also:
-
addSupplementalCustomizer
public QInstance addSupplementalCustomizer(SupplementalCustomizerType type, QCodeReference customizer) Fluent adder to supplementalCustomizers- See Also:
-
withSupplementalCustomizers
public QInstance withSupplementalCustomizers(Map<SupplementalCustomizerType, QCodeReference> supplementalCustomizers) Fluent setter for supplementalCustomizers- Parameters:
supplementalCustomizers- Map of supplemental customizer types to QCodeReference instances, allowing customizers to be applied to various QQQ components, e.g. RunAdHocScriptCustomizers- Returns:
- this
-
addSecurityKeyType
-
getSecurityKeyType
-
getSecurityKeyTypes
Getter for securityKeyTypes -
setSecurityKeyTypes
Setter for securityKeyTypes -
addAutomationProvider
-
getAutomationProvider
-
getAutomationProviders
Getter for automationProviders -
setAutomationProviders
Setter for automationProviders -
addMessagingProvider
-
getMessagingProvider
-
getMessagingProviders
Getter for messagingProviders -
setMessagingProviders
Setter for messagingProviders -
getHasBeenValidated
public boolean getHasBeenValidated()Getter for hasBeenValidated -
setHasBeenValidated
If pass a QInstanceValidationKey (which can only be instantiated by the validator), then the validationState will be set to COMPLETE. Else, if passed a null, the validationState will be reset to PENDING. e.g., to re-trigger validation (can be useful in tests). -
setValidationIsRunning
If pass a QInstanceValidationKey (which can only be instantiated by the validator), then the validationState set to RUNNING. -
getValidationIsRunning
public boolean getValidationIsRunning()check if the instance is currently running validation. -
getBranding
Getter for branding -
setBranding
Setter for branding -
getAuthentication
Getter for authentication -
setAuthentication
@Deprecated(since="Use registerAuthenticationProvider(AuthScope.instanceDefault(), authMetaData) instead") public QInstance setAuthentication(QAuthenticationMetaData authentication) Deprecated.UseregisterAuthenticationProvider(AuthScope, QAuthenticationMetaData)withAuthScope.instanceDefault()instead, or usewithInstanceDefaultAuthentication(QAuthenticationMetaData)for fluent chaining. This method automatically registers the provider under the instance default scope.Setter for authentication -
withInstanceDefaultAuthentication
Fluent setter for instance default authentication.This is a convenience method that registers the authentication provider under the instance default scope. Equivalent to calling:
registerAuthenticationProvider(AuthScope.instanceDefault(), authMetaData)- Parameters:
authMetaData- The authentication metadata to register as instance default- Returns:
- This QInstance for method chaining
-
registerAuthenticationProvider
Register an authentication provider for a specific scope.Scopes allow different authentication providers to be registered for different parts of the application (instance default, specific APIs, or route providers). The resolver will check scopes in order of specificity when resolving authentication for a request.
- Parameters:
scope- The scope to register the provider for (must not be null)authMetaData- The authentication metadata to register (must not be null)
-
findAuthenticationProvider
Find an authentication provider for a specific scope.- Parameters:
scope- The scope to look up (must not be null)- Returns:
- Optional containing the authentication metadata if found, empty otherwise
-
getScopedAuthenticationProviders
Get all registered scoped authentication providers.- Returns:
- Unmodifiable map of all scoped authentication providers
-
getWidgets
Getter for widgets -
setWidgets
Setter for widgets -
addWidget
-
getWidget
-
addQueueProvider
-
getQueueProvider
-
getQueueProviders
Getter for queueProviders -
setQueueProviders
Setter for queueProviders -
addQueue
-
getQueue
-
getQueues
Getter for queues -
setQueues
Setter for queues -
getEnvironmentValues
-
setEnvironmentValues
-
getDefaultPermissionRules
Getter for defaultPermissionRules -
setDefaultPermissionRules
Setter for defaultPermissionRules -
withDefaultPermissionRules
Fluent setter for defaultPermissionRules -
setDefaultTimeZoneId
Setter for defaultTimeZoneId -
withDefaultTimeZoneId
-
getDefaultTimeZoneId
Getter for defaultTimeZoneId -
getAllowedSecurityKeyNames
-
getDefaultAuditRules
Getter for defaultAuditRules -
setDefaultAuditRules
Setter for defaultAuditRules -
withDefaultAuditRules
Fluent setter for defaultAuditRules -
getSupplementalMetaData
Getter for supplementalMetaData -
getSupplementalMetaData
Getter for supplementalMetaData -
setSupplementalMetaData
Setter for supplementalMetaData -
withSupplementalMetaData
public QInstance withSupplementalMetaData(Map<String, QSupplementalInstanceMetaData> supplementalMetaData) Fluent setter for supplementalMetaData -
withSupplementalMetaData
Fluent setter for supplementalMetaData -
getJoinGraph
-
setJoinGraph
public void setJoinGraph(QInstanceValidationKey key, JoinGraph joinGraph) throws IllegalArgumentException Only the validation (and enrichment) code should set the instance's joinGraph so, we take a package-only-constructable validation key as a param along with the joinGraph - and we throw IllegalArgumentException if a non-null key is given.- Throws:
IllegalArgumentException
-
getDeploymentMode
Getter for deploymentMode -
setDeploymentMode
Setter for deploymentMode -
withDeploymentMode
-
add
-
addScheduler
-
getScheduler
-
getSchedulers
Getter for schedulers -
setSchedulers
Setter for schedulers -
addSchedulableType
-
getSchedulableType
-
getSchedulableTypes
Getter for schedulableTypes -
setSchedulableTypes
Setter for schedulableTypes -
getHelpContent
Getter for helpContent -
setHelpContent
Setter for helpContent -
withHelpContent
Fluent setter for helpContent -
withHelpContent
Fluent setter for adding 1 helpContent (for a slot) -
removeHelpContent
-
getMetaDataFilter
Deprecated.Getter for metaDataFilter -
setMetaDataFilter
@Deprecated(since="migrated to metaDataCustomizer") public void setMetaDataFilter(QCodeReference metaDataFilter) Deprecated.Setter for metaDataFilter -
withMetaDataFilter
@Deprecated(since="migrated to metaDataCustomizer") public QInstance withMetaDataFilter(QCodeReference metaDataFilter) Deprecated.Fluent setter for metaDataFilter -
addQBit
-
getQBits
Getter for qBits -
setQBits
Setter for qBits -
withQBits
Fluent setter for qBits -
getMetaDataActionCustomizer
Getter for metaDataActionCustomizer -
setMetaDataActionCustomizer
Setter for metaDataActionCustomizer -
withMetaDataActionCustomizer
Fluent setter for metaDataActionCustomizer -
getTableCustomizers
Getter for tableCustomizers -
setTableCustomizers
Setter for tableCustomizers -
withTableCustomizers
Fluent setter for tableCustomizers -
withTableCustomizer
-
withTableCustomizer
-
getTableCustomizers
Getter for tableCustomizers
-
registerAuthenticationProvider(AuthScope, QAuthenticationMetaData)withAuthScope.instanceDefault()instead, or usewithInstanceDefaultAuthentication(QAuthenticationMetaData)for fluent chaining.