Package com.narirelays.ems.services

Examples of com.narirelays.ems.services.PrivilegeManagementService


      super.contextInitialized(event);
      StorageService.ctx = WebApplicationContextUtils
          .getRequiredWebApplicationContext(event.getServletContext());
     
      if(StorageService.ctx.containsBean("privilegeManagementService")){
        PrivilegeManagementService priv = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
        priv.setInterceptUrls();
      }

     
//      CacheUtility.init();
     
    } catch (Exception e) {
      e.printStackTrace();
    }
    ExcelUtility.initTemplates();
   
//    DirectoryWatcher directoryWatcher = (DirectoryWatcher)StorageService.ctx.getBean("directoryWatcher");
//    if(directoryWatcher!=null){
//      directoryWatcher.start();
//    }


   
    if(StorageService.ctx.containsBean("maintainMeasurePoints4WinccService")){
      MaintainMeasurePoints4WinccService winccMeasurePointsService = (MaintainMeasurePoints4WinccService)StorageService
                                    .ctx.getBean("maintainMeasurePoints4WinccService");
      if(isSystemProperty("REFRESH_WINCC_MEASURE_WHEN_START")){
        winccMeasurePointsService.maintainMeasurePointsAndSaveLog();
      }
      if(isSystemProperty("REFRESH_INDEX_WHEN_START"))
      {
        winccMeasurePointsService.maintainIndex4WinccOnStart();
      }
    }
    // LuceneSupport.optimize();
    // System.out.println(WebVariable.appPath+WebVariable.indexPath);
    if(StorageService.ctx.containsBean("privilegeManagementService")){
      PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
      privilegeManagementService.addRootUserAndRole();
    }
   
//    if(StorageService.ctx.containsBean("equipmentManagementService")){
//      EquipmentManagementService equipmentManagementService = (EquipmentManagementService)StorageService.ctx.getBean("equipmentManagementService");
//      equipmentManagementService.addDefaultDepAlgorithm();
View Full Code Here


public class PrivilegeManagement extends MyBaseAction
{
  public String queryAllUsers()//查看所有用户,只返回用户id,用户名等;管理员操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.queryAllUsers();
    }
    return SUCCESS;
  }
View Full Code Here

    return SUCCESS;
  }
 
  public String queryUserInfoByAdmin()//根据用户id,基本信息;管理员操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.queryUserInfoByAdmin(request.getParameter("id"));
    }
    return SUCCESS;
  }
View Full Code Here

    return SUCCESS;
  }
 
  public String queryUserInfo()//查看本用户基本信息;本用户操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.queryUserInfo();
    }
    return SUCCESS;
  }
View Full Code Here

    return SUCCESS;
  }
 
  public String addUserByAdmin()//参数列表中要求name非空;管理员操作(管理员=超级用户,系统中唯一)
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.addUserByAdmin(request.getParameter("name"),parameterMap);
    }
    return SUCCESS;
  }
View Full Code Here

    return SUCCESS;
  }
 
  public String modifyUserByAdmin()//修改基本用户信息,不包括修改密码、salt及enabled;管理员操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.modifyUserByAdmin(request.getParameter("id"),parameterMap);
    }
    return SUCCESS;
  }
View Full Code Here

    return SUCCESS;
  }
 
  public String modifyUserInfo()////修改用户基本信息,不包括修改密码、salt及enabled;本用户操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.modifyUserInfo(parameterMap);
    }
    return SUCCESS;
  }
View Full Code Here

    }
    return SUCCESS;
  }
  public String deleteUserByAdmin()//要求递归删除group_member与authorities这两张表中的相关内容;管理员操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.deleteUserByAdmin(request.getParameter("id"));
    }
    return SUCCESS;
  }
View Full Code Here

   * */
  public String changePassByAdmin()//管理员修改用户密码,无需用户旧密码,需用户id;
  {
    resultInfo = new OperResult();
    IChangePassword iChangePassword = (IChangePassword)StorageService.ctx.getBean("jdbcUserService");
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(iChangePassword!=null)
    {
      String userID = request.getParameter("id");
      String userName = null;
      if(privilegeManagementService!=null)
      {
        userName = privilegeManagementService.query4UserNameByID(userID);
      }
      String newPass = request.getParameter("newPass");
      try{
        iChangePassword.changePassword(userName,newPass);//pass能否为空?
        resultInfo.setSucceed();
View Full Code Here

    return SUCCESS;
  }
 
  public String disableUserByAdmin()//将用户置为无效;管理员操作
  {
    PrivilegeManagementService privilegeManagementService = (PrivilegeManagementService)StorageService.ctx.getBean("privilegeManagementService");
    if(privilegeManagementService!=null)
    {
      resultInfo = privilegeManagementService.modifyUserEnable(request.getParameter("id"),false);
    }
    return SUCCESS;
  }
View Full Code Here

TOP

Related Classes of com.narirelays.ems.services.PrivilegeManagementService

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.