Class ServerModule
- java.lang.Object
-
- org.apache.cayenne.configuration.server.ServerModule
-
- All Implemented Interfaces:
org.apache.cayenne.di.Module
public class ServerModule extends Object implements org.apache.cayenne.di.Module
A DI module containing all Cayenne server runtime configuration.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description ServerModule()Creates a newServerModule.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidconfigure(org.apache.cayenne.di.Binder binder)static org.apache.cayenne.di.ListBuilder<DbAdapterDetector>contributeAdapterDetectors(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder forDbAdapterDetector's that allows downstream modules to "contribute" their own adapter detectors.static org.apache.cayenne.di.ListBuilder<ExtendedType>contributeDefaultTypes(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder for default adapter-agnosticExtendedType's that allows downstream modules to "contribute" their own types.static org.apache.cayenne.di.ListBuilder<DataChannelFilter>contributeDomainFilters(org.apache.cayenne.di.Binder binder)Deprecated.since 4.1 usecontributeDomainQueryFilters(Binder)andcontributeDomainSyncFilters(Binder)static org.apache.cayenne.di.ListBuilder<Object>contributeDomainListeners(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder for lifecycle events listeners.static org.apache.cayenne.di.ListBuilder<DataChannelQueryFilter>contributeDomainQueryFilters(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder forDataChannelQueryFilter's that allows downstream modules to "contribute" their own DataDomain query filtersstatic org.apache.cayenne.di.ListBuilder<DataChannelSyncFilter>contributeDomainSyncFilters(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder forDataChannelSyncFilter's that allows downstream modules to "contribute" their own DataDomain sync filtersstatic org.apache.cayenne.di.MapBuilder<PkGenerator>contributePkGenerators(org.apache.cayenne.di.Binder binder)Provides access to a DI map builder forPkGenerator's that allows downstream modules to "contribute" their own pk generators.static org.apache.cayenne.di.ListBuilder<String>contributeProjectLocations(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder for String locations that allows downstream modules to "contribute" their own Cayenne project locations.static org.apache.cayenne.di.MapBuilder<String>contributeProperties(org.apache.cayenne.di.Binder binder)Provides access to a DI map builder for runtime properties that allows downstream modules to "contribute" their own properties.static org.apache.cayenne.di.ListBuilder<ExtendedTypeFactory>contributeTypeFactories(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder forExtendedTypeFactory's that allows downstream modules to "contribute" their own factories.static org.apache.cayenne.di.ListBuilder<ExtendedType>contributeUserTypes(org.apache.cayenne.di.Binder binder)Provides access to a DI collection builder forExtendedType's that allows downstream modules to "contribute" their own types.static org.apache.cayenne.di.ListBuilder<ValueObjectType>contributeValueObjectTypes(org.apache.cayenne.di.Binder binder)static voidsetSnapshotCacheSize(org.apache.cayenne.di.Binder binder, int size)Sets max size of snapshot cache, in pre 4.0 version this was set in the Modeler.static voiduseExternalTransactions(org.apache.cayenne.di.Binder binder, boolean useExternal)Sets transaction management to either external or internal transactions.
-
-
-
Constructor Detail
-
ServerModule
public ServerModule()
Creates a newServerModule.- Since:
- 4.0
-
-
Method Detail
-
useExternalTransactions
public static void useExternalTransactions(org.apache.cayenne.di.Binder binder, boolean useExternal)Sets transaction management to either external or internal transactions. Default is internally-managed transactions.- Parameters:
binder- DI binder passed to the module during injector startup.useExternal- whether external (true) or internal (false) transaction management should be used.- Since:
- 4.0
-
setSnapshotCacheSize
public static void setSnapshotCacheSize(org.apache.cayenne.di.Binder binder, int size)Sets max size of snapshot cache, in pre 4.0 version this was set in the Modeler.- Parameters:
binder- DI binder passed to the module during injector startup.size- max size of snapshot cache- Since:
- 4.0
-
contributeProjectLocations
public static org.apache.cayenne.di.ListBuilder<String> contributeProjectLocations(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder for String locations that allows downstream modules to "contribute" their own Cayenne project locations.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for String locations.
- Since:
- 4.0
-
contributeDomainFilters
@Deprecated public static org.apache.cayenne.di.ListBuilder<DataChannelFilter> contributeDomainFilters(org.apache.cayenne.di.Binder binder)
Deprecated.since 4.1 usecontributeDomainQueryFilters(Binder)andcontributeDomainSyncFilters(Binder)Provides access to a DI collection builder forDataChannelFilter's that allows downstream modules to "contribute" their own DataDomain filters- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DataChannelFilter.
- Since:
- 4.0
-
contributeDomainQueryFilters
public static org.apache.cayenne.di.ListBuilder<DataChannelQueryFilter> contributeDomainQueryFilters(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder forDataChannelQueryFilter's that allows downstream modules to "contribute" their own DataDomain query filters- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DataChannelQueryFilter.
- Since:
- 4.1
-
contributeDomainSyncFilters
public static org.apache.cayenne.di.ListBuilder<DataChannelSyncFilter> contributeDomainSyncFilters(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder forDataChannelSyncFilter's that allows downstream modules to "contribute" their own DataDomain sync filters- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DataChannelSyncFilter.
- Since:
- 4.1
-
contributeDomainListeners
public static org.apache.cayenne.di.ListBuilder<Object> contributeDomainListeners(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder for lifecycle events listeners.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for listener Objects.
- Since:
- 4.0
-
contributeAdapterDetectors
public static org.apache.cayenne.di.ListBuilder<DbAdapterDetector> contributeAdapterDetectors(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder forDbAdapterDetector's that allows downstream modules to "contribute" their own adapter detectors.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for DbAdapterDetectors.
- Since:
- 4.0
-
contributePkGenerators
public static org.apache.cayenne.di.MapBuilder<PkGenerator> contributePkGenerators(org.apache.cayenne.di.Binder binder)
Provides access to a DI map builder forPkGenerator's that allows downstream modules to "contribute" their own pk generators.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- MapBuilder for properties.
- Since:
- 4.1
-
contributeProperties
public static org.apache.cayenne.di.MapBuilder<String> contributeProperties(org.apache.cayenne.di.Binder binder)
Provides access to a DI map builder for runtime properties that allows downstream modules to "contribute" their own properties.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- MapBuilder for properties.
- Since:
- 4.0
-
contributeTypeFactories
public static org.apache.cayenne.di.ListBuilder<ExtendedTypeFactory> contributeTypeFactories(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder forExtendedTypeFactory's that allows downstream modules to "contribute" their own factories.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeDefaultTypes
public static org.apache.cayenne.di.ListBuilder<ExtendedType> contributeDefaultTypes(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder for default adapter-agnosticExtendedType's that allows downstream modules to "contribute" their own types. "Default" types are loaded before adapter-provided or "user" types, so they may be overridden by those.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeUserTypes
public static org.apache.cayenne.di.ListBuilder<ExtendedType> contributeUserTypes(org.apache.cayenne.di.Binder binder)
Provides access to a DI collection builder forExtendedType's that allows downstream modules to "contribute" their own types. Unlike "default" types (seecontributeDefaultTypes(Binder)), "user" types are loaded after the adapter-provided types and can override those.- Parameters:
binder- DI binder passed to the module during injector startup.- Returns:
- ListBuilder for ExtendedTypes.
- Since:
- 4.0
-
contributeValueObjectTypes
public static org.apache.cayenne.di.ListBuilder<ValueObjectType> contributeValueObjectTypes(org.apache.cayenne.di.Binder binder)
- Parameters:
binder- DI binder passed to module during injector startup- Returns:
- ListBuilder for user-contributed ValueObjectTypes
- Since:
- 4.0
-
configure
public void configure(org.apache.cayenne.di.Binder binder)
- Specified by:
configurein interfaceorg.apache.cayenne.di.Module
-
-