Package com.jelastic.model

Examples of com.jelastic.model.UpLoader


            getLog().info("------------------------------------------------------------------------");
            getLog().info("   Authentication : SUCCESS");
            getLog().info("          Session : " + authentication.getSession());
            //getLog().info("              Uid : " + authentication.getUid());
            getLog().info("------------------------------------------------------------------------");
            UpLoader upLoader = upload(authentication);
            if (upLoader.getResult() == 0) {
                getLog().info("      File UpLoad : SUCCESS");
                getLog().info("         File URL : " + upLoader.getFile());
                getLog().info("        File size : " + upLoader.getSize());
                getLog().info("------------------------------------------------------------------------");
                CreateObject createObject = createObject(upLoader,authentication);
                if (createObject.getResult() == 0) {
                    getLog().info("File registration : SUCCESS");
                    getLog().info("  Registration ID : " + createObject.getResponse().getObject().getId());
                    getLog().info("     Developer ID : " + createObject.getResponse().getObject().getDeveloper());
                    getLog().info("------------------------------------------------------------------------");
                    if (System.getProperty("jelastic-session") == null) {
                        LogOut logOut = logOut(authentication);
                        if (logOut.getResult() == 0){
                            getLog().info("           LogOut : SUCCESS");
                        } else {
                            getLog().info("LogOut : FAILED");
                            getLog().error("Error : " + logOut.getError());
                            throw new MojoExecutionException(logOut.getError());
                        }
                    }
                }
            } else {
                getLog().error("File upload : FAILED");
                getLog().error("      Error : " + upLoader.getError());
                throw new MojoExecutionException(upLoader.getError());
            }
        } else {
            getLog().error("Authentication : FAILED");
            getLog().error("         Error : " + authentication.getError());
            throw new MojoExecutionException(authentication.getError());
View Full Code Here


    @Test
    public void upLoaderOkTest() throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        URL url = this.getClass().getClassLoader().getResource("uploader_ok.json");
        UpLoader upLoader = mapper.readValue(url, UpLoader.class);
        assertEquals(upLoader.getName(), "jelastic-maven-plugin-1.0-SNAPSHOT.jar");
    }
View Full Code Here

    @Test
    public void upLoaderErrorTest() throws Exception {
        ObjectMapper mapper = new ObjectMapper();
        URL url = this.getClass().getClassLoader().getResource("uploader_error.json");
        UpLoader upLoader = mapper.readValue(url, UpLoader.class);
        assertEquals(upLoader.getError(), "invalid param");
    }
View Full Code Here

TOP

Related Classes of com.jelastic.model.UpLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.