public static String getSystemSetting( final String path, final String settingName, final String defaultValue ) { if ( PentahoSystem.systemSettingsService == null ) { return defaultValue; } return PentahoSystem.systemSettingsService.getSystemSetting( path, settingName, defaultValue ); }
when( testNodeImplementation.getText() ).thenReturn( testXMLValue ); when( testNode.selectSingleNode( eq( "@implementation" ) ) ).thenReturn( testNodeImplementation ); when( settingsService.getSystemSettings( eq( "xml-factories/factory-impl" ) ) ).thenReturn( new LinkedList() { { add( testNode ); } } ); } else { when( settingsService.getSystemSettings( eq( "xml-factories/factory-impl" ) ) ).thenReturn( new LinkedList() ); when( settingsService.getSystemSetting( anyString(), anyString() ) ).thenReturn( "" );
List nds = PentahoSystem.systemSettingsService.getSystemSettings( xpathToXMLFactoryNodes ); if ( null != nds && !nds.isEmpty() ) { Logger.warn( PentahoSystem.class.getName(), Messages.getInstance()
public static void refreshSettings() { PentahoSystem.systemSettingsService.resetSettingsCache(); ICacheManager cacheManager = getCacheManager( null ); if ( cacheManager != null ) { cacheManager.removeFromGlobalCache( WAIT_SECONDS ); } }
Properties quartzProps = null; if ( quartzPropertiesFile != null ) { quartzProps = PentahoSystem.getSystemSettings().getSystemSettingsProperties( quartzPropertiesFile ); } else if ( quartzProperties != null ) { quartzProps = quartzProperties;
public static String getSystemSetting( final String settingName, final String defaultValue ) { // TODO make this more efficient using caching if ( PentahoSystem.systemSettingsService == null ) { return defaultValue; } return PentahoSystem.systemSettingsService.getSystemSetting( settingName, defaultValue ); }
public void init( final IPentahoSession session ) { ISystemSettings settings = PentahoSystem.getSystemSettings(); String roleName = settings.getSystemSetting( "acl-voter/admin-role", "Administrator" ); //$NON-NLS-1$ //$NON-NLS-2$ adminRole = new SimpleGrantedAuthority( roleName ); }
private String getSystemSettingOutputPath() { try { return PentahoSystem.getSystemSettings().getSystemSetting( DEFAULT_SETTING_KEY, null ); } catch ( Exception e ) { logger.warn( e.getMessage(), e ); } return null; }
String roleName = ( settings != null ) ? settings.getSystemSetting( "acl-voter/admin-role", "Admin" ) : "Admin";
if ( PentahoSystem.systemSettingsService != null ) { PentahoSystem.loggingLevel = Logger.getLogLevel( PentahoSystem.systemSettingsService.getSystemSetting( "log-level", "ERROR" ) ); //$NON-NLS-1$//$NON-NLS-2$