Examples of Administrator


Examples of br.com.buyFast.model.Administrator

  /**
   * Instancia um novo {@link AdminController}.
   */
  public AdminController() {
    this.employee = new Employee();
    this.admin = new Administrator();
  }
View Full Code Here

Examples of br.com.buyFast.model.Administrator

      return null;
    }
   
    try {
      if (this.admin == true) {
        Administrator administrator = new Administrator();
        administrator.setName(this.employee.getName());
        administrator.setCpf(this.employee.getCpf());
        administrator.setEmail(this.employee.getEmail());
        administrator.setPassword(this.employee.getPassword());
        administrator.setSecondName(this.employee.getSecondName());
        administrator.setUser(this.employee.getUser());
        // Removendo o funcionário para termos certeza que será cadastrado como admin.
        facade.removeEmployee(this.employee);
        // Persistindo como Administrador.
        facade.saveAdmin(administrator);
      } else {
        if (employee instanceof Administrator) {
          Administrator admin = (Administrator) this.employee;
          facade.removeAdmin(admin);
          Employee emp = new Employee();
          emp.setName(this.employee.getName());
          emp.setCpf(this.employee.getCpf());
          emp.setEmail(this.employee.getEmail());
View Full Code Here

Examples of br.com.buyFast.model.Administrator

   */
  public String delete() {
    Object obj = dataModel.getRowData();
    try {
      if (obj instanceof Administrator) {
        Administrator administrator = (Administrator) obj;
        facade.removeAdmin(administrator);
      } else {
        Employee employee = (Employee) obj;
        facade.removeEmployee(employee);
      }
View Full Code Here

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

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

  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

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

  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

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.startMapService(serviceName);
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
View Full Code Here

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.reloadMapService(serviceName);
        }
      } catch (Exception ex) {
        ex.printStackTrace();
      }
View Full Code Here

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

  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

Examples of de.innovationgate.wga.config.Administrator

     
        if (name == null || password == null) {
            return false;
        }

        Administrator admin = (Administrator) _wgaConfiguration.getAdministrator(name);
        if (admin == null) {
            return false;
        }
       
        boolean loggedIn = getBruteForceLoginBlocker().login(admin, password);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.