Package step.core.controller
Class ControllerSettingAccessorImpl
java.lang.Object
step.core.accessors.AbstractAccessor<ControllerSetting>
step.core.controller.ControllerSettingAccessorImpl
- All Implemented Interfaces:
step.core.accessors.Accessor<ControllerSetting>,ControllerSettingAccessor
- Direct Known Subclasses:
InMemoryControllerSettingAccessor
public class ControllerSettingAccessorImpl
extends step.core.accessors.AbstractAccessor<ControllerSetting>
implements ControllerSettingAccessor
-
Field Summary
Fields inherited from class step.core.accessors.AbstractAccessor
collectionDriver, newVersionThresholdMs, versionedCollectionDriver -
Constructor Summary
ConstructorsConstructorDescriptionControllerSettingAccessorImpl(step.core.collections.Collection<ControllerSetting> collectionDriver) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHook(String key, ControllerSettingHook hook) protected voidcallHookOnSettingRemove(ControllerSetting deletedSetting, ControllerSettingHook hook, boolean ignoreError) protected voidcallHookOnSettingSave(ControllerSetting res, ControllerSettingHook hook, boolean ignoreError) protected voidcallHooksForChangedKey(ControllerSetting oldValueWithChangedKey) Calls the onSettingRemove hooks when key is changed in some controller setting (the value with old key is handled as removed)createSettingIfNotExisting(String key, String value) protected List<ControllerSettingHook>getHooksBySettingKey(String settingKey) protected Map<String,List<ControllerSettingHook>> booleangetSettingByKey(String key) voidremove(org.bson.types.ObjectId id) booleanremoveHook(String key, ControllerSettingHook hook) protected voidrollbackOldValue(org.bson.types.ObjectId settingId, ControllerSetting oldValue, Exception ex) voidsave(Iterable<ControllerSetting> entities) save(ControllerSetting entity) updateOrCreateSetting(String key, String value) Methods inherited from class step.core.accessors.AbstractAccessor
createOrUpdateCompoundIndex, createOrUpdateIndex, enableVersioning, findByAttributes, findByAttributes, findByCriteria, findManyByAttributes, findManyByAttributes, findManyByCriteria, get, get, getAll, getCollectionDriver, getHistory, getRange, isVersioningEnabled, restoreVersion, stream, streamLazyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface step.core.accessors.Accessor
enableVersioning, findByAttributes, findByAttributes, findByCriteria, findManyByAttributes, findManyByAttributes, findManyByCriteria, get, get, getAll, getCollectionDriver, getHistory, getRange, isVersioningEnabled, restoreVersion, stream, streamLazy
-
Constructor Details
-
ControllerSettingAccessorImpl
public ControllerSettingAccessorImpl(step.core.collections.Collection<ControllerSetting> collectionDriver)
-
-
Method Details
-
getSettingByKey
- Specified by:
getSettingByKeyin interfaceControllerSettingAccessor
-
addHook
- Specified by:
addHookin interfaceControllerSettingAccessor
-
removeHook
- Specified by:
removeHookin interfaceControllerSettingAccessor
-
save
- Specified by:
savein interfacestep.core.accessors.Accessor<ControllerSetting>- Specified by:
savein interfaceControllerSettingAccessor- Overrides:
savein classstep.core.accessors.AbstractAccessor<ControllerSetting>
-
save
- Specified by:
savein interfacestep.core.accessors.Accessor<ControllerSetting>- Overrides:
savein classstep.core.accessors.AbstractAccessor<ControllerSetting>
-
remove
public void remove(org.bson.types.ObjectId id) - Specified by:
removein interfacestep.core.accessors.Accessor<ControllerSetting>- Overrides:
removein classstep.core.accessors.AbstractAccessor<ControllerSetting>
-
rollbackOldValue
protected void rollbackOldValue(org.bson.types.ObjectId settingId, ControllerSetting oldValue, Exception ex) -
callHooksForChangedKey
Calls the onSettingRemove hooks when key is changed in some controller setting (the value with old key is handled as removed) -
callHookOnSettingRemove
protected void callHookOnSettingRemove(ControllerSetting deletedSetting, ControllerSettingHook hook, boolean ignoreError) -
callHookOnSettingSave
protected void callHookOnSettingSave(ControllerSetting res, ControllerSettingHook hook, boolean ignoreError) -
getHooksBySettingKey
-
getHooksMap
-
updateOrCreateSetting
- Specified by:
updateOrCreateSettingin interfaceControllerSettingAccessor
-
createSettingIfNotExisting
- Specified by:
createSettingIfNotExistingin interfaceControllerSettingAccessor
-
getSettingAsBoolean
- Specified by:
getSettingAsBooleanin interfaceControllerSettingAccessor
-