public interface CdsRuntimeConfigurer
Modifier and Type | Method and Description |
---|---|
CdsRuntimeConfigurer |
cdsModel()
Sets the default CDS model on the
CdsRuntime of this CdsRuntimeConfigurer |
CdsRuntimeConfigurer |
cdsModel(com.sap.cds.reflect.CdsModel model)
|
CdsRuntimeConfigurer |
cdsModel(String csnPath)
Sets the CDS model from the specified CSN file path on the
CdsRuntime of this CdsRuntimeConfigurer |
CdsRuntime |
complete()
Completes the
CdsRuntimeConfigurer to prevent any further modifications of the CdsRuntime |
CdsRuntimeConfigurer |
configuration(CdsRuntimeConfiguration configuration)
Adds a given
CdsRuntimeConfiguration to the CdsRuntimeConfigurer . |
static CdsRuntimeConfigurer |
create()
Creates a new
CdsRuntimeConfigurer . |
<T> CdsRuntimeConfigurer |
eventHandler(Class<T> handlerClass,
Supplier<T> handlerFactory)
Registers an event handler class with the
CdsRuntime , given a factory to create instances of the event handler |
CdsRuntimeConfigurer |
eventHandler(Object handler)
Registers an event handler instance with the
CdsRuntime . |
CdsRuntimeConfigurer |
eventHandlerConfigurations()
Applies all event handler configuration modules to the
CdsRuntime of this CdsRuntimeConfigurer |
CdsRuntime |
getCdsRuntime()
The
CdsRuntime that is configured by this CdsRuntimeConfigurer . |
CdsRuntimeConfigurer |
packageScan(String packageName)
Scans the given package for event handler classes and registers them on the
CdsRuntime |
CdsRuntimeConfigurer |
service(Service service)
|
CdsRuntimeConfigurer |
serviceConfigurations()
Applies all service configuration modules to the
CdsRuntime of this CdsRuntimeConfigurer |
static CdsRuntimeConfigurer create()
CdsRuntimeConfigurer
.
In addition it automatically adds all CdsRuntimeConfiguration
modules
registered through ServiceLoader
mechanisms.CdsRuntimeConfigurer
CdsRuntime getCdsRuntime()
CdsRuntime
that is configured by this CdsRuntimeConfigurer
.
It can be retrieved at any time, although it might get enriched by subsequent calls to this CdsRuntimeConfigurer
.CdsRuntime
CdsRuntimeConfigurer cdsModel()
CdsRuntime
of this CdsRuntimeConfigurer
CdsRuntimeConfigurer
CdsRuntimeConfigurer cdsModel(String csnPath)
CdsRuntime
of this CdsRuntimeConfigurer
csnPath
- the CSN file pathCdsRuntimeConfigurer
CdsRuntimeConfigurer cdsModel(com.sap.cds.reflect.CdsModel model)
model
- the CdsModel
CdsRuntimeConfigurer
CdsRuntimeConfigurer configuration(CdsRuntimeConfiguration configuration)
CdsRuntimeConfiguration
to the CdsRuntimeConfigurer
.
This configuration will be applied in parts, when the respective bulk operations are triggered,
for example serviceConfigurations()
or eventHandlerConfigurations()
configuration
- the CdsRuntimeConfiguration
CdsRuntimeConfigurer
CdsRuntimeConfigurer serviceConfigurations()
CdsRuntime
of this CdsRuntimeConfigurer
CdsRuntimeConfigurer
CdsRuntimeConfigurer service(Service service)
service
- the Service
CdsRuntimeConfigurer
CdsRuntimeConfigurer eventHandlerConfigurations()
CdsRuntime
of this CdsRuntimeConfigurer
CdsRuntimeConfigurer
CdsRuntimeConfigurer eventHandler(Object handler)
CdsRuntime
.handler
- the event handler instanceCdsRuntimeConfigurer
<T> CdsRuntimeConfigurer eventHandler(Class<T> handlerClass, Supplier<T> handlerFactory)
CdsRuntime
, given a factory to create instances of the event handlerT
- the event handler typehandlerClass
- the event handler classhandlerFactory
- the supplier for instances of the event handlerCdsRuntimeConfigurer
CdsRuntimeConfigurer packageScan(String packageName) throws IOException
CdsRuntime
packageName
- the name of the packageCdsRuntimeConfigurer
IOException
- if the classes of the package can't be loaded from the classpathCdsRuntime complete()
CdsRuntimeConfigurer
to prevent any further modifications of the CdsRuntime
CdsRuntime
in its final stateCopyright © 2020. All rights reserved.