Skip to content
This repository was archived by the owner on May 9, 2019. It is now read-only.

Common Framework: Starting out

Ari Kamen edited this page Sep 2, 2015 · 18 revisions

Configuration Manager

To get connected to an existing Black Duck Protex or Code Center using a configuration file is a simple two line operation. You must first create a Configuration Manager which houses all your configuration options for the utility you are writing and then specify which type of Black Duck application you wish to connect to. The APPLICATION enumeration will let you choose.

APPLICATION appType = APPLICATION.PROTEX; ConfigurationManager cf = new ConfigurationManager(configFileLocation, appType);

Create a Protex Server Wrapper (same applies for Code Center) with the configuration manager.

boolean useAuth = true; ProtexServerWrapper psw = new ProtexServerWrapper(cf.getServerBean(), cf , useAuth );

That is it! If your specified configuration file contains the proper keys and values, you now have a fully connected Protex object that you can use to interact with the Protex SDK.

Clone this wiki locally