/** * Returns the configuration that should be used to initialize this factory. * * @return the configuration for initializing the factory. */ protected Configuration getConfiguration() { return ClassicEngineBoot.getInstance().getGlobalConfig(); }
public CountBoxesStep() { enabled = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.layout.process.EnableCountBoxesStep", "false" ) ); }
/** * A helper method that queries the configuration (and therefore also the system properties) for whether the system is * in headless mode. * * @return true, if the system is headless, false otherwise. */ protected static boolean isHeadless() { final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig(); return "true".equals( config.getConfigProperty( "java.awt.headless", "false" ) ); }
/** * Tests, whether the report generation is executed in an headless environment. * * @return true, if this is an headless environment, false otherwise. */ protected static boolean isHeadless() { return "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "java.awt.headless", "false" ) ); }
/** * Defines the loader settings for the available encodings shown to the user. The property defaults to * AVAILABLE_ENCODINGS_ALL. * * @return either AVAILABLE_ENCODINGS_ALL, AVAILABLE_ENCODINGS_FILE or AVAILABLE_ENCODINGS_NONE. */ public static String getAvailableEncodings() { return ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( AVAILABLE_ENCODINGS, AVAILABLE_ENCODINGS_ALL ); }
public static String getDefaultPrinter() { return ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( Epson9PinPrinterDriver.EPSON_9PIN_PRINTER_TYPE, "Generic 9-Pin printer" ); } }
/** * Defines the loader settings for the available encodings shown to the user. The property defaults to * AVAILABLE_ENCODINGS_ALL. * * @return either AVAILABLE_ENCODINGS_ALL, AVAILABLE_ENCODINGS_FILE or AVAILABLE_ENCODINGS_NONE. */ public static String getEncodingsDefinitionFile() { return ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( ENCODINGS_DEFINITION_FILE, ENCODINGS_DEFINITION_FILE_DEFAULT ); }
public static DataFactoryWriteHandler lookupWriteHandler( final DataFactory dataFactory ) { final String configKey = PREFIX + dataFactory.getClass().getName(); final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig(); final String value = globalConfig.getConfigProperty( configKey ); if ( value != null ) { return (DataFactoryWriteHandler) ObjectUtilities.loadAndInstantiate( value, DataFactoryWriter.class, DataFactoryWriteHandler.class ); } return null; }
public ExpressionPropertyReadHandler( final SharedBeanInfo beanInfo, final String bundleLocation ) { this.validatePropertiesOnBoot = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.metadata.StrictValidation" ) ); this.beanInfo = beanInfo; this.bundleLocation = bundleLocation; this.builder = new ExpressionPropertyMetaDataBuilder(); }
public static synchronized SubReportReadHandlerFactory getInstance() { if ( readHandlerFactory == null ) { readHandlerFactory = new SubReportReadHandlerFactory(); readHandlerFactory.configureGlobal( ClassicEngineBoot.getInstance().getGlobalConfig(), PREFIX_SELECTOR ); } return readHandlerFactory; }
public static synchronized ReportElementReadHandlerFactory getInstance() { if ( readHandlerFactory == null ) { readHandlerFactory = new ReportElementReadHandlerFactory(); readHandlerFactory.configureGlobal( ClassicEngineBoot.getInstance().getGlobalConfig(), PREFIX_SELECTOR ); } return readHandlerFactory; }
public Configuration getConfiguration() { final MasterReport report = getReportJob(); if ( report != null ) { return report.getConfiguration(); } return ClassicEngineBoot.getInstance().getGlobalConfig(); }
public DefaultStyleCache() { this.lookupKey = new CacheKey(); this.cache = new LFUMap<CacheKey, CacheCarrier>( 500 ); this.validateCache = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.layout.style.ValidateStyleCacheResults" ) ); }
private TagDescription createTagDescription() { final DefaultTagDescription defaultTagDescription = new DefaultTagDescription(); defaultTagDescription.configure( ClassicEngineBoot.getInstance().getGlobalConfig(), "org.pentaho.reporting.engine.classic.core.modules.parser.extwriter." ); return defaultTagDescription; }
protected void initialize( Configuration configuration ) { this.configuration = configuration; this.contentGenerator.setCopyExternalImages( "true".equals( configuration .getConfigProperty( HtmlTableModule.COPY_EXTERNAL_IMAGES ) ) ); this.allowRawLinkTargets = "true".equals( configuration.getConfigProperty( HtmlTableModule.ALLOW_RAW_LINK_TARGETS ) ); styleBuilderFactory = new DefaultStyleBuilderFactory(); styleBuilderFactory.configure( ClassicEngineBoot.getInstance().getGlobalConfig() ); this.tagHelper = new HtmlTagHelper( configuration, styleBuilderFactory ); }
public TestFontMetrics( final Font font ) { super( font ); metaData = new DebugOutputProcessorMetaData(); metaData.initialize( ClassicEngineBoot.getInstance().getGlobalConfig() ); }
protected void initializeWithoutJob() { if ( printReportProcessor != null ) { printReportProcessor.close(); printReportProcessor = null; } setTitle( messages.getString( "PreviewPane.EMPTY_TITLE" ) ); //$NON-NLS-1$ final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig(); setIconTheme( PreviewPaneUtilities.createIconTheme( configuration ) ); performInitialization( configuration ); }
private InternalParameterContext() { this.resourceManager = new ResourceManager(); dataFactory = new TableDataFactory(); resourceBundleFactory = new DefaultResourceBundleFactory(); configuration = ClassicEngineBoot.getInstance().getGlobalConfig(); documentMetaData = new MemoryDocumentMetaData(); reportEnvironment = new DefaultReportEnvironment( configuration ); final ReportEnvironmentDataRow envDataRow = new ReportEnvironmentDataRow( reportEnvironment ); parameterData = new CompoundDataRow( envDataRow, new ParameterDataRow() ); }
@Test public void locale_can_be_explicitly_overridden() { DefaultReportEnvironment re = new DefaultReportEnvironment( ClassicEngineBoot.getInstance().getGlobalConfig() ); re.setLocale( Locale.GERMAN ); Assert.assertEquals( re.getLocale(), Locale.GERMAN ); }
public void testDefaultValueExists() { ClassicEngineBoot.getInstance().getEditableConfig().setConfigProperty( key, null ); final String value = ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( key ); assertNotNull( value ); }