Commit c073291c authored by Pierre-Yves Gibello's avatar Pierre-Yves Gibello
Browse files

Adapted to latest evolutions of PKM client

parent c323514d
......@@ -34,10 +34,11 @@ public class PkmJmlGen {
/**
* Connect to PKM on specified database
* @param database the PKM database name (null if specified in configuration)
* @param createDbIfNotExists If true, create database if not exists
* @return The connected PKM client
* @throws ApiException
*/
public PkmClient login(String database) throws ApiException {
public PkmClient login(String database, boolean createDbIfNotExists) throws ApiException {
if(database == null) database = getProperty("database");
if(database == null) {
// error
......@@ -57,7 +58,7 @@ public class PkmJmlGen {
} catch (FileNotFoundException e) {
throw new ApiException(e);
}
client.login(getProperty("user"), getProperty("password"));
client.login(getProperty("user"), getProperty("password"), createDbIfNotExists);
return client;
}
......@@ -68,7 +69,7 @@ public class PkmJmlGen {
*/
public void injectJmlIntoPKM(String database) throws Exception {
PkmClient client = login(database);
PkmClient client = login(database, true);
Path tmpDir = Files.createTempDirectory("pkm-").toAbsolutePath();
// Extract data from PKM, and copy them to temporary dir
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment