public JavinSecurityManager() { if (!isDisabled()) { String userServiceProviderClassName = JavinConfig.get().getSecure().getUserServiceProvider(); Class<?> userServiceProviderClass; try { userServiceProviderClass = Class.forName(userServiceProviderClassName); } catch (ClassNotFoundException e) { throw new JavinRuntimeException( "Can't load UserServiceProvider impl: " + userServiceProviderClassName, e); } try { userServiceProvider = (UserServiceProvider) userServiceProviderClass.newInstance(); } catch (Exception e) { throw new JavinRuntimeException( "Can't instantiate UserServiceProvider impl: " + userServiceProviderClassName, e); } } }
public static boolean isDisabled() { return JavinConfig.get().getSecure().isDisabled(); }