Bug 183104 Allow a Custom ODA Data Source Wizard Page to override the Linked Profile Properties' Value
The ODA designer framework provides a connection profile selection wizard and page to allow an user to select a connection profile instance from a file-based profile repository. It in turn assigns the connection profile reference info as public properties in a DataSourceDesign definition. Such assignment takes place by default when the ODA profile selection wizard is used. It currently ignores any values that a custom ODA wizard page may have specified for these profile reference properties (ConnectionProfileProperty.PROFILE_NAME_PROP_KEY and PROFILE_STORE_FILE_PATH_PROP_KEY). The ODA framework should have allowed a custom ODA wizard page to override such property values returned by its collectCustomProperties method. By default, the related properties are not included in the property collection provided to a custom ODA wizard page for initialization. And it should not add those properties if it wants to assume the default behavior. A custom ODA wizard page should however be able to explicitly add these properties, which if exists would override the values contributed by the connection profile selection page.
data/org.eclipse.birt.report.data.oda.sampledb.ui/src/org/eclipse/birt/report/data/oda/sampledb/ui/profile/SampleDbSelectionPageHelper.java
static final String DEFAULT_MESSAGE = 
        Messages.getMessage(  "datasource.page.title" ); 
    
    private static final String EMPTY_STRING = "";
    
    SampleDbSelectionPageHelper( WizardPage page )
    {
        m_wizardPage = page;
    }
    SampleDbSelectionPageHelper( PreferencePage page )
    {
        m_propertyPage = page;
    }
    void createCustomControl( Composite parent )
	{
		
		Composite content = new Composite( parent, SWT.NONE );
		GridLayout layout = new GridLayout( );
		layout.numColumns = 2;
		content.setLayout( layout );
		new Label( content, SWT.LEFT ).setText( Messages.getMessage( "datasource.page.driver.class" ) ); 
		m_driverClass = new Label( content, SWT.LEFT );
		m_driverClass.setText( SampleDBConstants.DRIVER_CLASS ); 
		new Label( content, SWT.LEFT ).setText( Messages.getMessage( "datasource.page.url" ) ); 
		m_driverURL = new Label( content, SWT.LEFT );
		m_driverURL.setText( SampleDBConstants.DRIVER_URL );
		new Label( content, SWT.LEFT ).setText( Messages.getMessage( "datasource.page.user" ) ); 
		m_sampleUser = new Label( content, SWT.LEFT );
		m_sampleUser.setText( SampleDBJDBCConnectionFactory.getDbUser( ) );
		setMessage( DEFAULT_MESSAGE );