Managing a connection profile
You can create connection profiles for different purposes. Data Source Explorer provides import and export functionality to support multiple connection profiles. This functionality supports creating and maintaining separate profiles with connection properties valid for different environments. Figure 45‑13 shows Data Source Explorer, and the Import and Export buttons.
Figure 45‑13 Importing and exporting connection profiles
Exporting connection profiles
Connection profiles are exported as text files, either plain or encrypted. Use the exported feature to:
*Move reports from development to production environments.
*Plan to create a new workspace or upgrade to a newer version.
*Reuse existing connection profiles.
*Share a common set of connection profiles across a workgroup.
*Deploy a set of connection profiles to a server environment whose application can work directly with the exported file.
How to export a connection profile
1 In Data Source Explorer, choose Export.
2 Select the connection profiles you want to export, as shown in Figure 45‑14.
Figure 45‑14 Exporting a connection profile
3 Enter a fully qualified path to create a new file, or choose Browse to overwrite an existing file.
Use the default .acconnprofiles extension if you plan to encrypt the connection profile and use the default out‑of‑the‑box encryption mechanism for it.
4 Deselect Encrypt File Content if the connection profiles do not contain passwords or any other content that pose a security risk.
5 Choose OK.
Importing connection profiles
You might import a connection profile if you created connection profiles in a previous version of the product and want to reuse them in the current version, or want to share a common set of connection profiles across a workgroup.
Importing connection profiles, as shown in Figure 45‑15, involves a profile selection. You can overwrite an existing profile if you choose to.
Figure 45‑15 Importing a connection profile
How to import a connection profile
1 In Data Source Explorer, choose Import.
2 Enter the fully qualified path to the connection profile file, or choose Browse.
3 Choose Overwrite Existing Connection Profiles with Same Names, if you wish.
4 Choose OK.
The connection profile appears under its data source category.
Editing connection profile properties
You can use Data Source Explorer or Console Editor Application to edit connection profile properties. Console Editor Application works from a command line and is useful in environments where you do not have BIRT Designer Professional installed. Use this application for editing connection profile store files.
How to edit connection profile properties
1 Open Data Source Explorer.
2 Expand the category for the connection profile that you want to edit.
3 Right-click the data source and select Properties.
4 Edit the connection profile properties as necessary.
Figure 45‑16 shows an example of the properties for a flat file data source.
Figure 45‑16 Modifying connection profile properties
Editing connection profile store files using Console Editor Application
You can also view and edit connection profile properties in connection profile store files using Console Editor Application, which is an application you can launch outside the Eclipse Workbench. Console Editor Application is a system console application to make minor changes to an exported connection profile, such as the file path to the JDBC driver JARs, a connection URL or an ODA data source file path.
When you copy an exported file to a server environment for deployment, you can use this editor tool to quickly adjust the connection profile properties without having to open Data Source Explorer in the Eclipse Workbench. The updates are saved in a separate file for all the connection profiles. If the connection profile is deployed on iHub, you must download the profile first, make the changes, and then upload it to iHub again.
Before you can use Console Editor Application, you must install org.eclipse.datatools.connectivity.console.profile_<version>.jar in your Eclipse environment, along with the other DTP plug‑ins. The plug-in is installed with the BIRT Designer Professional installation.
From within your Eclipse home directory, enter the command:
eclipse[c] -nosplash -application
[ -? | -in <connectionProfileFile> | -out <saveAsFile> | -profile <profileName> ]
For Windows platforms, indicate eclipsec. For other platforms, use eclipse. The command line options are presented in Table 45‑1.
Table 45‑1 Optional command line options
Displays help.
-in <connectionProfileFile>
Enter the name of the connection profile storage file to view and/or change.
-out <saveAsFile>
Enter the name of the output file to save your changes.
-profile <profileName>
Enter the name of a connection profile to view and/or change. If you do not specify a connection profile name, Console Editor steps through all the profiles found in the input file.
If you do not specify an argument value, Console Editor prompts you for an input value.
Deploying a connection profile
Connection profiles that use relative paths are deployed the same way as report resources, and by default they are saved to the iHub Resource folder. For more details on how to publish resources to iHub, see Publishing a resource file to iHub.
When deploying reports that use absolute connection profiles, you must deploy the connection profile to the correct folder in the file system on the iHub machine. For example, if a report uses a connection profile stored in folder C:\ConnProfile\MySQL.acconnprofiles, you must manually create the same folder C:\ConnProfile on the iHub machine and copy the MySQL.dat file there.
Encrypting connection profile properties
BIRT supports encrypting the connection profile properties by using the cipherProvider extension point. To define a new encryption method, you must extend org.eclipse.datatools.connectivity.cipherProvider extension point.
To define a new encryption plug-in, you must define the file extension and its corresponding provider of javax.crypto.Cipher class for the encryption of connection profile store files. Listing 45‑1 shows an example of such a definition.
*fileExtension—The file extension of connection profile store files that shall be encrypted and decrypted using the cipher provider class specified in the class attribute. The out‑of‑the‑box encryption implementation defines .acconnprofiles as a default extension.
The fileExtension attribute value may include an optional dot (.) before the file extension, for example, you can define profiles or .profiles. A keyword default may be specified as an attribute value to match files with no file extension.
*class—The concrete class that implements the interface to provide the javax.crypto.Cipher instances for the encryption and decryption of connection profile store files. The custom class may optionally extend the base class, which reads a secret (symmetric) key specification from a bundled resource. The base implementation class of the interface is The class uses a default bundled encryption key as its javax.crypto.spec.SecretKeySpec.
The example in Listing 45‑1 registers as the provider for files with the extension .profile and for those with no file extension.
Listing 45‑1 Example of javax.crypto.Cipher extension
<cipherProvider fileExtension="profile"
<cipherProvider fileExtension="default" class="
Listing 45‑2 shows an example implementation of class.
Listing 45‑2 interface implementation example
import org.osgi.framework.Bundle;
public class ProfileStoreCipherProvider extends CipherProviderBase
implements ICipherProvider
/* (non-Javadoc)
* @see
protected URL getKeyResource()
Bundle bundle = Platform.getBundle( "" );
return bundle != null ?
bundle.getResource( "cpkey" ) : //$NON-NLS-1$