package be.cytomine.client;

/*
 * Copyright (c) 2009-2018. Authors: see NOTICE file.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public class Execute {

    private static final Logger log = Logger.getLogger(Execute.class);

    public static void main(String[] args) throws Exception {
        BasicConfigurator.configure();
        PropertyConfigurator.configure("log4j.properties");
        log.info("Connection to cytomine...");

        Cytomine.connection(args[0], args[1], args[2]);
        Test.launch();

//        SoftwareExample.testAddJobTemplate2(cytomine);
//        SoftwareExample.testAddJobTemplate3(cytomine);
//        SoftwareExample.testAddJobTemplate4(cytomine);
    }

    public static void ping(Cytomine cytomine) throws CytomineException {
        log.info("Hello " + cytomine.getCurrentUser().get("username"));
    }
}

@@ -1126,16 +1126,36 @@
 gs%5B2%5D);%0A
+%0A        ping();%0A%0A//
         
@@ -1348,16 +1348,165 @@
 %0A    %7D%0A%0A
+    public static void ping() throws CytomineException %7B%0A        log.info(%22Hello %22 + Cytomine.getInstance().getCurrentUser().get(%22username%22));%0A    %7D%0A
     publ

add default ping method