Package com.gi.server.core.auth

Examples of com.gi.server.core.auth.Administrator


  private String result(String f, String service, String username,
      String password) {
    String result = null;

    try {
      Administrator admin = new Administrator(username, password);
      boolean isSucceed = false;

      String serviceName = service.substring(4);
      try {
        if (service.startsWith("map>")) {
          isSucceed = admin.stopMapService(serviceName);
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
View Full Code Here


  private Response result(String f, String username, String password) {
    Response result = null;

    try {
      Administrator admin = new Administrator(username, password);

      ResponseBuilder rb = null;
      if ("html".equals(f)) {
        rb = Response.ok(generateHTMLResult(admin));

        if (admin.isAuthorized()) {
          int maxAge = 60 * ConfigManager.getServerConfig()
              .getAdminCookieMaxageMinutes();
          NewCookie cookieUsername = new NewCookie("username", admin
              .getUsername(), null, null, null, maxAge, false);
          NewCookie cookiePassword = new NewCookie("password", admin
              .getPassword(), null, null, null, maxAge, false);
          rb.cookie(cookieUsername, cookiePassword);
        }
      }

View Full Code Here

  private String result(String f, String username, String password) {
    String result = null;

    try {
      Administrator admin = new Administrator(username, password);
      boolean isSucceed = admin.reloadConfigs(context);

      if ("html".equals(f)) {
        result = this.generateHTMLResult(admin, isSucceed);
      }
    } catch (Exception ex) {
View Full Code Here

  private String result(String f, String service, String username,
      String password) {
    String result = null;

    try {
      Administrator admin = new Administrator(username, password);
      boolean isSucceed = false;

      String serviceName = service.substring(4);
      try {
        if (service.startsWith("map>")) {
          isSucceed = admin.startMapService(serviceName);
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
View Full Code Here

  private String result(String f, String service, String username, String password) {
    String result = null;

    try {
      Administrator admin = new Administrator(username, password);
      boolean isSucceed = false;

      String serviceName = service.substring(4);
      try {
        if(service.startsWith("map>")){
          isSucceed = admin.reloadMapService(serviceName);
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
View Full Code Here

  private String result(String f, String username, String password) {
    String result = null;

    try {
      Administrator admin = new Administrator(username, password);
      admin.clearServer();

      if ("html".equals(f)) {
        result = this.generateHTMLResult(admin);
      }
    } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of com.gi.server.core.auth.Administrator

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.