Package com.google.appengine.tools.admin

Examples of com.google.appengine.tools.admin.AppAdminFactory


    ConnectOptions connectOptions = ConnectionOptionsManager
        .getOptions(readApplication.getAppId());
    if (connectOptions == null) {
      return Status.CANCEL_STATUS;
    }
    AppAdmin createAppAdmin2 = new AppAdminFactory().createAppAdmin(
        connectOptions, readApplication, new PrintWriter(System.err));
    try {
      Reader requestLogs = createAppAdmin2.requestLogs(count, severity);

      BufferedReader bufferedReader = new BufferedReader(requestLogs);
View Full Code Here


        }
        return credential.getAccessToken();
    }

    AppAdmin createAppAdmin(GenericApplication app) throws IOException {
        AppAdminFactory appAdminFactory = new AppAdminFactory();

        /**
         if (options.getJavaExecutableOSPath() != null) {
         appAdminFactory.setJavaExecutable(new File(options.getJavaExecutableOSPath()));
         }

         if (options.getJavaCompilerExecutableOSPath() != null) {
         appAdminFactory.setJavaCompiler(new File(options.getJavaCompilerExecutableOSPath()));
         }
         */

        final AppAdminFactory.ConnectOptions appEngineConnectOptions = new AppAdminFactory.ConnectOptions();
        // APPENGINE_SERVER is server to upload the app.
        //  The default is appspot.com, which is used for both upload and test container.
        String appengineServer = System.getenv("APPENGINE_SERVER");
        if (appengineServer != null) {
            appEngineConnectOptions.setServer(appengineServer);
        }

        // User/Password
        appEngineConnectOptions.setUserId(configuration.getUserId());
        // TODO -- better prompt?
        appEngineConnectOptions.setPasswordPrompt(new AppAdminFactory.PasswordPrompt() {
            public String getPassword() {
                return configuration.getPassword();
            }
        });

        // OAuth2
        String oauthToken = null;
        String configOauthToken = configuration.getOauth2token(); // -Dappengine.oauth2token=
        if (configOauthToken != null) {
            if (configOauthToken.trim().equals("")) {  // if blank token, get it from cookie.
                oauthToken = getOAuthToken();
            } else {
                oauthToken = configOauthToken;
            }
        }
        // if oauthToken is null, username/pw will be used.
        appEngineConnectOptions.setOauthToken(oauthToken);


        PrintWriter errorWriter = new PrintWriter(System.err, true);

        return appAdminFactory.createAppAdmin(appEngineConnectOptions, app, errorWriter);
    }
View Full Code Here

        }
        return credential.getAccessToken();
    }

    AppAdmin createAppAdmin(GenericApplication app) throws IOException {
        AppAdminFactory appAdminFactory = new AppAdminFactory();

        /**
         if (options.getJavaExecutableOSPath() != null) {
         appAdminFactory.setJavaExecutable(new File(options.getJavaExecutableOSPath()));
         }

         if (options.getJavaCompilerExecutableOSPath() != null) {
         appAdminFactory.setJavaCompiler(new File(options.getJavaCompilerExecutableOSPath()));
         }
         */

        final AppAdminFactory.ConnectOptions appEngineConnectOptions = new AppAdminFactory.ConnectOptions();
        // APPENGINE_SERVER is server to upload the app.
        //  The default is appspot.com, which is used for both upload and test container.
        String appengineServer = System.getenv("APPENGINE_SERVER");
        if (appengineServer != null) {
            appEngineConnectOptions.setServer(appengineServer);
        }

        // User/Password
        appEngineConnectOptions.setUserId(configuration.getUserId());
        // TODO -- better prompt?
        appEngineConnectOptions.setPasswordPrompt(new AppAdminFactory.PasswordPrompt() {
            public String getPassword() {
                return configuration.getPassword();
            }
        });

        // OAuth2
        String oauthToken = null;
        String configOauthToken = configuration.getOauth2token(); // -Dappengine.oauth2token=
        if (configOauthToken != null) {
            if (configOauthToken.trim().equals("")) {  // if blank token, get it from cookie.
                oauthToken = getOAuthToken();
            } else {
                oauthToken = configOauthToken;
            }
        }
        // if oauthToken is null, username/pw will be used.
        appEngineConnectOptions.setOauthToken(oauthToken);


        PrintWriter errorWriter = new PrintWriter(System.err, true);

        return appAdminFactory.createAppAdmin(appEngineConnectOptions, app, errorWriter);
    }
View Full Code Here

        }
        return credential.getAccessToken();
    }

    AppAdmin createAppAdmin(GenericApplication app) throws IOException {
        AppAdminFactory appAdminFactory = new AppAdminFactory();

        /**
         if (options.getJavaExecutableOSPath() != null) {
         appAdminFactory.setJavaExecutable(new File(options.getJavaExecutableOSPath()));
         }

         if (options.getJavaCompilerExecutableOSPath() != null) {
         appAdminFactory.setJavaCompiler(new File(options.getJavaCompilerExecutableOSPath()));
         }
         */

        final AppAdminFactory.ConnectOptions appEngineConnectOptions = new AppAdminFactory.ConnectOptions();
        // APPENGINE_SERVER is server to upload the app.
        //  The default is appspot.com, which is used for both upload and test container.
        String appengineServer = System.getenv("APPENGINE_SERVER");
        if (appengineServer != null) {
            appEngineConnectOptions.setServer(appengineServer);
        }

        // User/Password
        appEngineConnectOptions.setUserId(configuration.getUserId());
        // TODO -- better prompt?
        appEngineConnectOptions.setPasswordPrompt(new AppAdminFactory.PasswordPrompt() {
            public String getPassword() {
                return configuration.getPassword();
            }
        });

        // OAuth2
        String oauthToken = null;
        String configOauthToken = configuration.getOauth2token(); // -Dappengine.oauth2token=
        if (configOauthToken != null) {
            if (configOauthToken.trim().equals("")) {  // if blank token, get it from cookie.
                oauthToken = getOAuthToken();
            } else {
                oauthToken = configOauthToken;
            }
        }
        // if oauthToken is null, username/pw will be used.
        appEngineConnectOptions.setOauthToken(oauthToken);


        PrintWriter errorWriter = new PrintWriter(System.err, true);

        return appAdminFactory.createAppAdmin(appEngineConnectOptions, app, errorWriter);
    }
View Full Code Here

    protected GenericApplication readApplication() throws IOException {
        return Application.readApplication(getAppLocation().getCanonicalPath());
    }

    AppAdmin createAppAdmin(GenericApplication app) throws IOException {
        AppAdminFactory appAdminFactory = new AppAdminFactory();

        /**
         if (options.getJavaExecutableOSPath() != null) {
         appAdminFactory.setJavaExecutable(new File(options.getJavaExecutableOSPath()));
         }

         if (options.getJavaCompilerExecutableOSPath() != null) {
         appAdminFactory.setJavaCompiler(new File(options.getJavaCompilerExecutableOSPath()));
         }
         */

        final AppAdminFactory.ConnectOptions appEngineConnectOptions = new AppAdminFactory.ConnectOptions();
        String appengineServer = System.getenv("APPENGINE_SERVER");
        if (appengineServer != null) {
            appEngineConnectOptions.setServer(appengineServer);
        }
        appEngineConnectOptions.setUserId(configuration.getUserId());
        // TODO -- better prompt?
        appEngineConnectOptions.setPasswordPrompt(new AppAdminFactory.PasswordPrompt() {
            public String getPassword() {
                return configuration.getPassword();
            }
        });

        PrintWriter errorWriter = new PrintWriter(System.err, true);

        return appAdminFactory.createAppAdmin(appEngineConnectOptions, app, errorWriter);
    }
View Full Code Here

    protected GenericApplication readApplication() throws IOException {
        return Application.readApplication(getAppLocation().getCanonicalPath());
    }

    AppAdmin createAppAdmin(GenericApplication app) throws IOException {
        AppAdminFactory appAdminFactory = new AppAdminFactory();

        /**
         if (options.getJavaExecutableOSPath() != null) {
         appAdminFactory.setJavaExecutable(new File(options.getJavaExecutableOSPath()));
         }

         if (options.getJavaCompilerExecutableOSPath() != null) {
         appAdminFactory.setJavaCompiler(new File(options.getJavaCompilerExecutableOSPath()));
         }
         */

        final AppAdminFactory.ConnectOptions appEngineConnectOptions = new AppAdminFactory.ConnectOptions();
        String appengineServer = System.getenv("APPENGINE_SERVER");
        if (appengineServer != null) {
            appEngineConnectOptions.setServer(appengineServer);
        }
        appEngineConnectOptions.setUserId(configuration.getUserId());
        // TODO -- better prompt?
        appEngineConnectOptions.setPasswordPrompt(new AppAdminFactory.PasswordPrompt() {
            public String getPassword() {
                return configuration.getPassword();
            }
        });

        PrintWriter errorWriter = new PrintWriter(System.err, true);

        return appAdminFactory.createAppAdmin(appEngineConnectOptions, app, errorWriter);
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.admin.AppAdminFactory

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.