/** * Returns the global configuration as extended configuration. * * @return the extended configuration. */ public synchronized ExtendedConfiguration getExtendedConfig() { if ( extWrapper == null ) { extWrapper = new ExtendedConfigurationWrapper( getGlobalConfig() ); } return extWrapper; }
/** * Returns the global configuration as extended configuration. * * @return the extended configuration. */ public synchronized ExtendedConfiguration getExtendedConfig() { if (extWrapper == null) { extWrapper = new ExtendedConfigurationWrapper(getGlobalConfig()); } return extWrapper; }
/** * Helper method for serialization. * * @param in the input stream from where to read the serialized object. * @throws java.io.IOException when reading the stream fails. * @throws ClassNotFoundException if a class definition for a serialized object could not be found. */ private void readObject( final ObjectInputStream in ) throws IOException, ClassNotFoundException { in.defaultReadObject(); final boolean readParent = in.readBoolean(); if ( readParent ) { parentConfiguration = (Configuration) in.readObject(); } else { if ( booterClass != null ) { final AbstractBoot boot = AbstractBoot.loadBooter( booterClass.getName(), booterClass ); parentConfiguration = boot.getGlobalConfig(); } else { parentConfiguration = null; } } }
public synchronized ObjectFactory getObjectFactory() { try { if ( objectFactory == null ) { final String configProperty = getGlobalConfig().getConfigProperty( ObjectFactoryBuilder.class.getName(), DefaultObjectFactoryBuilder.class.getName() ); final ObjectFactoryBuilder objectFactoryBuilder = ObjectUtilities.loadAndInstantiate( configProperty, getClass(), ObjectFactoryBuilder.class ); objectFactory = objectFactoryBuilder.createObjectFactory( this ); } return objectFactory; } catch ( Throwable t ) { throw new IllegalStateException( "ObjectFactory is not configured properly", t ); } } }
/** * Constructs a ConfigDescriptionEditor that is initially invisible. */ public ConfigDescriptionEditor( final AbstractBoot boot ) { if ( boot != null ) { boot.start(); this.configurationToEdit = boot.getGlobalConfig(); } init(); }
/** * Helper method for serialization. * * @param in the input stream from where to read the serialized object. * @throws java.io.IOException when reading the stream fails. * @throws ClassNotFoundException if a class definition for a serialized * object could not be found. */ private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); final boolean readParent = in.readBoolean(); if (readParent) { parentConfiguration = (Configuration) in.readObject(); } else { if (booterClass != null) { final AbstractBoot boot = AbstractBoot.loadBooter(booterClass.getName(), booterClass); parentConfiguration = boot.getGlobalConfig(); } else { parentConfiguration = null; } } }
public synchronized ObjectFactory getObjectFactory() { try { if (objectFactory == null) { final String configProperty = getGlobalConfig().getConfigProperty(ObjectFactoryBuilder.class.getName(), DefaultObjectFactoryBuilder.class.getName()); final ObjectFactoryBuilder objectFactoryBuilder = ObjectUtilities.loadAndInstantiate(configProperty, getClass(), ObjectFactoryBuilder.class); objectFactory = objectFactoryBuilder.createObjectFactory(this); } return objectFactory; } catch (Throwable t) { throw new IllegalStateException("ObjectFactory is not configured properly", t); } } }
/** * Loads all modules mentioned in the report configuration starting with the given prefix. This method is used during * the boot process of JFreeReport. You should never need to call this method directly. * * @param modulePrefix the module prefix. */ public void load( final String modulePrefix ) { if ( modulePrefix == null ) { throw new NullPointerException(); } if ( this.initSections.contains( modulePrefix ) ) { return; } this.initSections.add( modulePrefix ); final Configuration config = this.booter.getGlobalConfig(); final Iterator it = config.findPropertyKeys( modulePrefix ); int count = 0; while ( it.hasNext() ) { final String key = (String) it.next(); if ( key.endsWith( ".Module" ) ) { final String moduleClass = config.getConfigProperty( key ); if ( moduleClass != null && moduleClass.length() > 0 ) { addModule( moduleClass ); count++; } } } LOGGER.debug( "Loaded a total of " + count + " modules under prefix: " + modulePrefix ); }
final Configuration config = this.booter.getGlobalConfig(); final Iterator it = config.findPropertyKeys(modulePrefix); int count = 0;
/** * Constructs a ConfigDescriptionEditor that is initially invisible. */ public ConfigDescriptionEditor( final String booterClass ) { final AbstractBoot boot = ObjectUtilities.loadAndInstantiate( booterClass, ConfigDescriptionEditor.class, AbstractBoot.class ); if ( boot != null ) { boot.start(); this.configurationToEdit = boot.getGlobalConfig(); } init(); }