/** * Returns the configuration property with the specified key. * * @param key the property key. * @return the property value. */ public String getConfigProperty( final String key ) { return parent.getConfigProperty( key ); }
/** * Returns the text encoding that should be used to encode URLs. * * @return the encoding for URLs. */ public String getURLEncoding() { return configuration.getConfigProperty( "org.pentaho.reporting.engine.classic.core.URLEncoding" ); }
/** * Checks, whether a given property is defined. * * @param name the name of the property * @return true, if the property is defined, false otherwise. */ public boolean isPropertySet( final String name ) { return parent.getConfigProperty( name ) != null; }
protected boolean isInputStorageEnabled( final Configuration config ) { if ( "true".equals( config .getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.gui.base.StoreExportDialogInputs" ) ) == false ) { return false; } final String confVal = config.getConfigProperty( getConfigurationPrefix() + "StoreDialogContents" ); //$NON-NLS-1$ return "none".equalsIgnoreCase( confVal ) == false; //$NON-NLS-1$ }
private Boolean getComputedFailOnError() { return failOnError == null ? "true".equals( getReportConfiguration().getConfigProperty( ClassicEngineCoreModule.STRICT_ERROR_HANDLING_KEY ) ) : failOnError; } }
public CountBoxesStep() { enabled = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.layout.process.EnableCountBoxesStep", "false" ) ); }
public static void createTextFile( final MasterReport report, final String filename ) throws IOException, ReportProcessingException { final Configuration configuration = report.getConfiguration(); final String cpiText = configuration .getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.CharsPerInch" ); final String lpiText = configuration .getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.pageable.plaintext.LinesPerInch" ); createTextFile( report, filename, ParserUtil.parseInt( cpiText, 10 ), ParserUtil.parseInt( lpiText, 6 ) ); }
/** * Helper method to read the platform default encoding from the VM's system properties. * * @return the contents of the system property "file.encoding". */ public static String getPlatformDefaultEncoding() { return LibFontBoot.getInstance().getGlobalConfig().getConfigProperty( "file.encoding", "Cp1252" ); }
public void reportInitialized( final ReportEvent event ) { functionToCall = this.getReportConfiguration().getConfigProperty( SheetNameFunction.DECALRED_SHEETNAME_FUNCTION_KEY ); super.reportInitialized( event ); }
public static String getDefaultPrinter() { return ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( Epson24PinPrinterDriver.EPSON_24PIN_PRINTER_TYPE, "Generic 24-Pin printer" ); } }
public static String getBundleMapping( final String bundleType ) { final String defaultType = LibDocBundleBoot.getInstance().getGlobalConfig().getConfigProperty ( "org.pentaho.reporting.libraries.docbundle.bundleloader.mapping" ); if ( bundleType == null ) { return defaultType; } return LibDocBundleBoot.getInstance().getGlobalConfig().getConfigProperty ( "org.pentaho.reporting.libraries.docbundle.bundleloader.mapping." + bundleType, defaultType ); }
public CanvasMajorAxisLayoutStep() { super( true ); revalidateAllAxisLayoutStep = new RevalidateAllAxisLayoutStep(); paranoidChecks = "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.layout.process.ParanoidChecks" ) ); }
public ReportPreProcessorPropertyReadHandler( 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 ReportPreProcessorPropertyMetaDataBuilder(); }
public static BigDecimal getExcelDate( final Date date ) { final String dateSystem = LibFormulaBoot.getInstance().getGlobalConfig().getConfigProperty ( "org.pentaho.reporting.libraries.formula.ZeroDate", "1900" ); final boolean excelBugCompatible = "true".equals( LibFormulaBoot.getInstance().getGlobalConfig().getConfigProperty ( "org.pentaho.reporting.libraries.formula.ExcelDateBugAware", "false" ) ); return getExcelDate( date, excelBugCompatible, computeZeroDate( dateSystem, excelBugCompatible ) ); }
public AttributeList createSheetNameAttributes() { final AttributeList tableAttrList = new AttributeList(); final String additionalStyleClass = getConfiguration().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.output.table.html.SheetNameClass" ); if ( additionalStyleClass != null ) { tableAttrList.setAttribute( HtmlPrinter.XHTML_NAMESPACE, "class", additionalStyleClass ); } return tableAttrList; }
public StaticAESPasswordEncryptionServiceProvider() { prefix = "static-aes"; passwordEncryption = new SecurePasswordEncryption(); key = ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.core.modules.parser.base.StaticAESPassword", "fh34\u342228h%\u1234$3*@652!!" ); }
public static IconTheme createIconTheme( final Configuration config ) { final String themeClass = config.getConfigProperty( ICON_THEME_CONFIG_KEY ); final Object maybeTheme = ObjectUtilities.loadAndInstantiate( themeClass, PreviewPane.class, IconTheme.class ); final IconTheme iconTheme; if ( maybeTheme != null ) { iconTheme = (IconTheme) maybeTheme; } else { iconTheme = new DefaultIconTheme(); } iconTheme.initialize( config ); return iconTheme; }
@Before public void setUp() throws ReportDataFactoryException, SQLException { connection = mock( Connection.class ); factory = spy( new SimpleSQLReportDataFactory( connection ) ); DataFactoryContext dataFactoryContext = mock( DataFactoryContext.class ); Configuration conf = mock( Configuration.class ); ResourceBundleFactory resourceBundleFactory = mock( ResourceBundleFactory.class ); doReturn( conf ).when( dataFactoryContext ).getConfiguration(); doReturn( resourceBundleFactory ).when( dataFactoryContext ).getResourceBundleFactory(); doReturn( "simple" ).when( conf ).getConfigProperty( ResultSetTableModelFactory.RESULTSET_FACTORY_MODE ); factory.initialize( dataFactoryContext ); }
public static boolean isSkipLongRunTest() { if ( "false".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "org.pentaho.reporting.engine.classic.test.ExecuteLongRunningTest" ) ) ) { return true; } return false; }
public static boolean isSafeToTestComplexText() { // this property is undefined by default. This is safer than testing for existing Ant properties // or other hacks. You will have to explicitly enable this property in the system properties or // system configuration to test complex text code on your machine. // // Note that the results of the layout is machine dependent, so a failure may not be an error, but // the result of a difference in fonts or settings. return "true".equals( ClassicEngineBoot.getInstance().getGlobalConfig().getConfigProperty( "junit.enable-platform-dependent-tests" ) ); }