Package io.jmix.dynmodel.impl
Class DynamicModelSettingsServiceImpl
java.lang.Object
io.jmix.dynmodel.impl.DynamicModelSettingsServiceImpl
- All Implemented Interfaces:
DynamicModelSettingsService
@NullMarked
@Component("dynmod_DynamicModelSettingsService")
public class DynamicModelSettingsServiceImpl
extends Object
implements DynamicModelSettingsService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationEventPublisherprotected DynamicModelApplyLockprotected DynamicModelClusterSupportprotected DataManagerprotected DynamicModelSecuritySupportprotected org.springframework.transaction.PlatformTransactionManagerprotected UnconstrainedDataManagerFields inherited from interface io.jmix.dynmodel.DynamicModelSettingsService
DEFAULT_SETTINGS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(DynamicModelSettings settings) voidvoidapplyAndSave(List<DynamicModelMigration> migrations, DynamicModelSettings settings) protected voidcheckBaseSettingsIsActive(UUID baseSettingsId, boolean baseSettingsIsNew) Checks that the record the caller loaded for editing is still the active one.protected voidChecks that the current user may apply the whole saved model, not only the migrations the caller passed.loadAll()
-
Field Details
-
dataManager
-
unconstrainedDataManager
-
applicationEventPublisher
@Autowired protected org.springframework.context.ApplicationEventPublisher applicationEventPublisher -
transactionManager
@Autowired protected org.springframework.transaction.PlatformTransactionManager transactionManager -
applyLock
-
clusterSupport
-
securitySupport
-
-
Constructor Details
-
DynamicModelSettingsServiceImpl
public DynamicModelSettingsServiceImpl()
-
-
Method Details
-
loadAll
- Specified by:
loadAllin interfaceDynamicModelSettingsService
-
loadActive
- Specified by:
loadActivein interfaceDynamicModelSettingsService
-
applyAndSave
- Specified by:
applyAndSavein interfaceDynamicModelSettingsService
-
checkSavedContentPermitted
Checks that the current user may apply the whole saved model, not only the migrations the caller passed. The saved model is applied as the system user at the next start and on cluster catch-up, so content that drops data must not be saved by a user who may apply only changes that cannot lose data. -
checkBaseSettingsIsActive
Checks that the record the caller loaded for editing is still the active one. A record that was never persisted has no base to compare against and is accepted. -
applyActive
public void applyActive()- Specified by:
applyActivein interfaceDynamicModelSettingsService
-
activate
- Specified by:
activatein interfaceDynamicModelSettingsService
-