Package com.microej.kf.util.property
Class SharedPropertyRegistryKF
- java.lang.Object
-
- ej.property.registry.SimplePropertyRegistry
-
- com.microej.kf.util.property.SharedPropertyRegistryKF
-
- All Implemented Interfaces:
FeatureStateListener,PropertyLoader,PropertyRegistry,SharedPropertyRegistry
public class SharedPropertyRegistryKF extends SimplePropertyRegistry implements SharedPropertyRegistry, FeatureStateListener
Implementation of shared property registry over Kernel and Features.
-
-
Constructor Summary
Constructors Constructor Description SharedPropertyRegistryKF()Creates a new shared registry KF.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetProperty(String key)Searches for the property with the specified key in the property lists.StringremoveProperty(String key)Removes a property.StringsetProperty(String key, String value)Sets a property that maps a key to a value.voidstateChanged(Feature feature, Feature.State previousState)Called when the state of a Feature has changed.-
Methods inherited from class ej.property.registry.SimplePropertyRegistry
checkPropertyPermission, getProperty
-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ej.property.PropertyLoader
getProperty
-
-
-
-
Method Detail
-
setProperty
@Nullable public String setProperty(String key, String value)
Description copied from interface:PropertyRegistrySets a property that maps a key to a value.- Specified by:
setPropertyin interfacePropertyRegistry- Overrides:
setPropertyin classSimplePropertyRegistry- Parameters:
key- the key.value- the value.- Returns:
- the previous value of the property, or
nullif the property is not found.
-
removeProperty
@Nullable public String removeProperty(String key)
Description copied from interface:PropertyRegistryRemoves a property.- Specified by:
removePropertyin interfacePropertyRegistry- Overrides:
removePropertyin classSimplePropertyRegistry- Parameters:
key- the key.- Returns:
- the value of the property, or
nullif the property is not found.
-
getProperty
@Nullable public String getProperty(String key)
Searches for the property with the specified key in the property lists. If the property is not found in any map of properties, then the method returns null. Different property maps of properties exist. The order in which they are searched in is:- Current application,
- Kernel,
- Trusted applications,
- Other applications.
- Specified by:
getPropertyin interfacePropertyLoader- Overrides:
getPropertyin classSimplePropertyRegistry- Parameters:
key- the property key.- Returns:
- the value of the property list with the specified key value.
-
stateChanged
public void stateChanged(@Nullable Feature feature, @Nullable Feature.State previousState)
Description copied from interface:FeatureStateListenerCalled when the state of a Feature has changed.- Specified by:
stateChangedin interfaceFeatureStateListener- Parameters:
feature- the Feature which state has changedpreviousState- the previous state,nullif Feature state isFeature.State.INSTALLED
-
-