Package org.apache.gaelucene.auth

Examples of org.apache.gaelucene.auth.GAELucenePermission


  private GAELuceneOnlineUserManager userManager = GAELuceneOnlineUserManager.getInstance();

  public void processShowPoolStats(HttpServletRequest request) throws GAELuceneAuthException, IOException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.isAuthenticated()) {
      throw new GAELuceneAuthException(0);
    }

    long freeMemory = Runtime.getRuntime().freeMemory();
    long totalMemory = Runtime.getRuntime().totalMemory();
View Full Code Here


public class GAELuceneUserWebHandler {
  private GAELuceneOnlineUserManager userManager = GAELuceneOnlineUserManager.getInstance();

  public void processListUser(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.isAuthenticated()) {
      throw new GAELuceneAuthException(0);
    }

    List<GAELuceneUser> users = GAELuceneUserJDO.getUsers();
    request.setAttribute("users", users);
View Full Code Here

    request.setAttribute("reservedUsers", reservedUsers);
  }

  public void processAddUser(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    String email = ParamUtil.getString(request, "email");
    GAELuceneUserJDO.saveOrUpdate(email, new ArrayList<Integer>());
  }
View Full Code Here

    GAELuceneUserJDO.saveOrUpdate(email, new ArrayList<Integer>());
  }

  public void prepareEditUserPermission(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    long uId = ParamUtil.getLong(request, "uid", 0);
    GAELuceneUser oneUser = GAELuceneUserJDO.get(uId);
    request.setAttribute("user", oneUser);
View Full Code Here

    request.setAttribute("user", oneUser);
  }

  public void processUpdateUserPermission(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    long uId = ParamUtil.getLong(request, "uid", 0);
    ArrayList<Integer> permissions = (ArrayList<Integer>) ParamUtil.getIntegers(request, "perm");
    GAELuceneUserJDO.updatePermission(uId, permissions);
View Full Code Here

    GAELuceneUserJDO.updatePermission(uId, permissions);
  }

  public void processDeleteUser(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    long uId = ParamUtil.getLong(request, "uid", 0);
    GAELuceneUserJDO.delete(new Long(uId));
  }
View Full Code Here

  private GAELuceneOnlineUserManager userManager = GAELuceneOnlineUserManager.getInstance();

  public void processImportPrepackagedIndex(HttpServletRequest request) throws GAELuceneAuthException,
      IOException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    String dirName = ParamUtil.getString(request, "dir", "").trim();
    String category = ParamUtil.getString(request, "cat", "").trim();
    log.info("trying to import prepackaged index under '" + dirName + "' to db.");
View Full Code Here

    pm.close();
  }

  public void deleteGAEFile(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }

    long id = ParamUtil.getLong(request, "id", 0);
    if (id > 0) {
View Full Code Here

    }
  }

  public void batchDeleteGAEFiles(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }
    String category = ParamUtil.getString(request, "cat", "").trim();
    long version = ParamUtil.getLong(request, "ver", 0);
    log.info("trying to delete GAEFile entities of '" + category + "' with version='" + version + "'");
View Full Code Here

    GAEFileJDO.batchDelete(category, new Long(version));
  }

  public void deleteGAECategory(HttpServletRequest request) throws GAELuceneAuthException {
    GAELuceneOnlineUser onlineUser = userManager.getOnlineUser(request);
    GAELucenePermission permission = onlineUser.getPermission();
    if (!permission.canAdminSystem()) {
      throw new GAELuceneAuthException(0);
    }

    long id = ParamUtil.getLong(request, "id", 0);
    if (id > 0) {
View Full Code Here

TOP

Related Classes of org.apache.gaelucene.auth.GAELucenePermission

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.