protected TestProject createTestProject(String testProjectName,
String testProjectPrefix, String notes, Boolean enableRequirements,
Boolean enableTestPriority, Boolean enableAutomation,
Boolean enableInventory, Boolean isActive, Boolean isPublic)
throws TestLinkAPIException {
TestProject testProject = null;
Integer id = 0;
testProject = new TestProject(id, testProjectName, testProjectPrefix,
notes, enableRequirements, enableTestPriority,
enableAutomation, enableInventory, isActive, isPublic);
try {
Map<String, Object> executionData = Util
.getTestProjectMap(testProject);
Object response = this.executeXmlRpcCall(
TestLinkMethods.CREATE_TEST_PROJECT.toString(),
executionData);
Object[] responseArray = Util.castToArray(response);
Map<String, Object> responseMap = (Map<String, Object>) responseArray[0];
id = Util.getInteger(responseMap,
TestLinkResponseParams.ID.toString());
testProject.setId(id);
} catch (XmlRpcException xmlrpcex) {
throw new TestLinkAPIException("Error creating test project: "
+ xmlrpcex.getMessage(), xmlrpcex);
}