public final class MRulesSecurityManagers extends Object
IMRulesSecurityManager.getImmutableInstance()
is called and the result is registered.Modifier and Type | Method and Description |
---|---|
static void |
declare(IMRulesSecurityManager securityManager)
Registers a new security manager.
|
static <T extends IMRulesSecurityManager> |
get(Class<T> securityManagerClass)
Gets the security manager registered for this class.
|
static boolean |
hasManager(Class<? extends IMRulesSecurityManager> securityManagerClass)
Checks if a security manager is register for this class.
|
static boolean |
remove(Class<? extends IMRulesSecurityManager> securityManagerClass)
Unregisters a security manager.
|
static void |
removeAll()
Unregisters all security manager.
|
public static void declare(IMRulesSecurityManager securityManager) throws MRulesSecurityException
securityManager
- Security manager instance to registerMRulesSecurityException
- If this security manager already exists.public static boolean remove(Class<? extends IMRulesSecurityManager> securityManagerClass)
securityManagerClass
- Security manager class to unregisterpublic static void removeAll()
public static boolean hasManager(Class<? extends IMRulesSecurityManager> securityManagerClass)
public static <T extends IMRulesSecurityManager> T get(Class<T> securityManagerClass) throws MRulesSecurityException
MRulesSecurityException
- If not registered.