Class BooksBinderFactory
java.lang.Object
io.github.qubitpi.athena.application.AbstractBinderFactory
io.github.qubitpi.athena.example.books.application.BooksBinderFactory
- All Implemented Interfaces:
BinderFactory
Book specialization of the Abstract Binder Factory, applying Book app configuration objects.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
BooksBinderFactory.DerbyDataSourceProvider
injects a connected local Derby instance.static class
BooksBinderFactory.MySQLDataSourceProvider
injects a connected local MySQL instance. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
afterBinding
(org.glassfish.hk2.utilities.binding.AbstractBinder abstractBinder) Allows additional app-specific binding.Registers file data storage.Registers GraphQL service that provides file metadata read/write API.protected graphql.schema.DataFetcher<MetaData>
Similar toAbstractBinderFactory.buildQueryDataFetcher()
, this method binds an object responsible for executing the mutation and returning some sensible output values ofMetaData
.protected graphql.schema.DataFetcher<MetaData>
Registers an object responsible for retrieving, from metadata database, a data value back for a given graphql field, i.e.protected @NotNull DataSource
Returns a connected local SQL DB instance.Methods inherited from class io.github.qubitpi.athena.application.AbstractBinderFactory
afterRegistration, buildBinder, buildFileIdGenerator, buildJsonDocumentParser
-
Constructor Details
-
BooksBinderFactory
public BooksBinderFactory()
-
-
Method Details
-
buildFileStore
Description copied from class:AbstractBinderFactory
Registers file data storage.- Specified by:
buildFileStore
in classAbstractBinderFactory
- Returns:
- a service for persisting and fetching files
-
buildMetaStore
Description copied from class:AbstractBinderFactory
Registers GraphQL service that provides file metadata read/write API.- Specified by:
buildMetaStore
in classAbstractBinderFactory
- Returns:
- a service for persisting
-
buildQueryDataFetcher
Description copied from class:AbstractBinderFactory
Registers an object responsible for retrieving, from metadata database, a data value back for a given graphql field, i.e.MetaData
object; the graphql engine uses this data fetcher to resolve/fetch aMetaData
into a runtime object that will be sent back as part of the overall graphqlExecutionResult
- Specified by:
buildQueryDataFetcher
in classAbstractBinderFactory
- Returns:
- a native GraphQL
DataFetcher
instance
-
buildMutationDataFetcher
Description copied from class:AbstractBinderFactory
Similar toAbstractBinderFactory.buildQueryDataFetcher()
, this method binds an object responsible for executing the mutation and returning some sensible output values ofMetaData
.- Specified by:
buildMutationDataFetcher
in classAbstractBinderFactory
- Returns:
- a native GraphQL
DataFetcher
instance - See Also:
-
afterBinding
protected void afterBinding(org.glassfish.hk2.utilities.binding.AbstractBinder abstractBinder) Description copied from class:AbstractBinderFactory
Allows additional app-specific binding.- Overrides:
afterBinding
in classAbstractBinderFactory
- Parameters:
abstractBinder
- Binder to use for binding
-
getDataSource
Returns a connected local SQL DB instance.- Returns:
- a new connected SQL database instance
-