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

Common Framework: Working with Protex && Code Center

Ari Kamen edited this page Sep 2, 2015 · 1 revision

Overview

Working with the ProtexServerWrapper enables the developer to short-cut some commonly used methods to make development easier. New functionality is being added often and more is always welcomed.

Examples

Assuming you have a working connection and the user that you are using has at least 'Manager' set for their user within Protex, here are a few examples to get you started:

Get projects in Protex

List<ProtexProjectPojo> projectList = protexWrapper
				.getProjects(ProtexProjectPojo.class);

This return a list of projects, where each project is represented by a ProtexProjectPojo object. You can extend the Pojo to add custom methods if you wish.

Perform tasks against the SDK directly

While new functionality is being added all the time, sometimes you will need to perform a task against the SDK directly. In which case you retrieve the individual API classes and work with them. For example if you wanted to access the code tree you would:

 CodeTreeApi treeApi= protexServer.getInternalApiWrapper().getCodeTreeApi();
 PartialCodeTree tree = treeApi.getCodeTree(projId, projPath, 1, false);

Clone this wiki locally