public class KernelSecurityPolicyManager extends SecurityManager implements FeatureStateListener
Constructor and Description |
---|
KernelSecurityPolicyManager(SecurityPolicyResourceLoader securityPolicyResourceLoader)
Instantiates a new kernel security policy manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addToPermissionMap(Feature feature)
This method allows to load the feature's permissions.
|
void |
checkPermission(Permission perm)
Throws a
SecurityException if the requested access, specified by the given
permission, is not permitted based on the security policy currently in effect. |
void |
stateChanged(Feature feature,
Feature.State previousState)
Called when the state of a Feature has changed.
|
checkAccess
public KernelSecurityPolicyManager(SecurityPolicyResourceLoader securityPolicyResourceLoader)
securityPolicyResourceLoader
- the security policy resource loader
implementation.public void addToPermissionMap(Feature feature)
KernelSecurityPolicyManager
class when using standard
LocalDeploy. This method only needs to be called when the Kernel uses XIP
(Execution In Place) system to load features permissions before starting
them. See the
documentation for more informations.feature
- the feature to load permissions from.public void checkPermission(Permission perm)
SecurityManager
SecurityException
if the requested access, specified by the given
permission, is not permitted based on the security policy currently in effect.
checkPermission
in class SecurityManager
perm
- the requested permission.public void stateChanged(Feature feature, @Nullable Feature.State previousState)
FeatureStateListener
stateChanged
in interface FeatureStateListener
feature
- the Feature which state has changedpreviousState
- the previous state, null
if Feature state is Feature.State.INSTALLED