package com.vci.server.framework; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.vci.common.ServiceNames; import com.vci.common.exception.VciException; import com.vci.common.log.ServerWithLog4j; import com.vci.common.resource.CommonProperties; import com.vci.common.utility.ObjectUtility; import com.vci.corba.common.VCIError; import com.vci.corba.framework.data.AppConfigCategoryInfo; import com.vci.corba.framework.data.AppConfigDetailInfo; import com.vci.corba.framework.data.CombinationInfo; import com.vci.corba.framework.data.CombinationValueInfo; import com.vci.corba.framework.data.DataSourceInfo; import com.vci.corba.framework.data.DeptInfo; import com.vci.corba.framework.data.FuncOperationInfo; import com.vci.corba.framework.data.FunctionInfo; import com.vci.corba.framework.data.MachSecurityInfo; import com.vci.corba.framework.data.OperateInfo; import com.vci.corba.framework.data.PasswordStrategyInfo; import com.vci.corba.framework.data.PvolumeInfo; import com.vci.corba.framework.data.RoleInfo; import com.vci.corba.framework.data.RoleRightInfo; import com.vci.corba.framework.data.SpecialCharClsfInfo; import com.vci.corba.framework.data.SpecialCharInfo; import com.vci.corba.framework.data.SpecialtyInfo; import com.vci.corba.common.data.UserEntityInfo; import com.vci.corba.framework.data.UserInfo; import com.vci.corba.framework.data.UserLogonInfo; import com.vci.corba.framework.FrameworkService; import com.vci.server.BaseService; import com.vci.corba.framework.data.CheckValue; import com.vci.corba.framework.data.GrandValue; import com.vci.server.framework.delegate.AppConfigCategoryDelegate; import com.vci.server.framework.delegate.AppConfigDetailDelegate; import com.vci.server.framework.delegate.DataTypeRightDelegate; import com.vci.server.framework.delegate.FuncOperationDelegate; import com.vci.server.framework.delegate.FunctionDelegate; import com.vci.server.framework.delegate.MachSecurityDelegate; import com.vci.server.framework.delegate.OperateDelegate; import com.vci.server.framework.delegate.RightManagementDelegate; import com.vci.server.framework.delegate.RoleRightDelegate; import com.vci.server.framework.delegate.SystemCfgDelegate; import com.vci.server.framework.volume.delegate.PvolumeDelegate; import com.zeroc.Ice.Current; /** *
Title:
*Copyright: Copyright (c) 2011
*Company: VCI
* @author Administrator * @time 2011-6-3 * @version 1.0 */ public class FrameworkServiceImpl extends BaseService implements FrameworkService { private RightManagementDelegate rightmanagementDelegate = new RightManagementDelegate(); //权限的delegate public FrameworkServiceImpl() { // AppConfigDetailCatch.InitCatch(); // UserCacheUtil.initCache(); // DeptCacheUtil.initCache(); // RoleCacheUtil.initCache(); } @Override public String getServiceName() { return ServiceNames.FRAMESERVICE; } @Override public boolean test(com.zeroc.Ice.Current current) { String op = current.operation; String adapter = current.adapter.getName(); String id = current.id.name; String time = new Date().toString(); System.out.println(String.format("== %s [FrameworkService.test] (adapter=%s, id=%s, op=%s)", time, adapter, id, op)); return true; } /** * 验证用户登录 */ @Override public UserInfo checkLogin(String userName, String password, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.checkLogin(userName,password); } @Override public UserInfo checkLoginForBS(String userName, String password, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.checkLoginForBS(userName,password); } @Override public UserInfo getUserObjectByUserName(String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getUserObjectByUserName(userName); } @Override public UserInfo checkByToken(String token, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.loginByToken(token); } @Override public String getConfigValue(String key, com.zeroc.Ice.Current current) throws VCIError { return new SystemCfgDelegate().getConfigValue(key); } // /*-------------------日志管理模块---------------------*/ // // /** // * 初始化日志模块时检查是否配置了自动删除 // */ // @Override // public boolean getIsAutoDelete(com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // boolean res = false; // res = logDel.getIsAutoDelete(); // return res; // } // // // // /** // * 获取配置好的日志查询页面显示条数 // */ // @Override // public long getPageSize(com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.getPageSize(); // } // // /** // * 获取当前查询日志的总条�? // */ // @Override // public long getSumLogRows(String sql, com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.getSumLogRows(sql); // } // // // // /** // * 获取当前保存/备份期限 // */ // @Override // public long getCurPeriod(String type, com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.getCurPeriod(type); // } // // /** // * 手动删除日志 // */ // @Override // public boolean deleteLog(String deleteDate, com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.deleteLog(deleteDate); // } // /** * 保存特殊字符分类 */ @Override public String saveSpecialCharClsf(SpecialCharClsfInfo specialCharClsfInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.saveSpecialCharClsf(specialCharClsfInfo, userEntityInfo); } /** * 删除特殊字符分类 */ @Override public boolean deletSpecialCharClsf(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.deletSpecialCharClsf(ids, userEntityInfo); } /** * 更新特殊字符分类 */ @Override public boolean updateSpecialCharClsf( SpecialCharClsfInfo specialCharClsfInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.updateSpecialCharClsf(specialCharClsfInfo, userEntityInfo); } /** * 获取所有特殊字符分�? */ public SpecialCharClsfInfo[] getSpecialCharClsfList(int pageNo,int pageSize, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.getSpecialCharClsfList(pageNo,pageSize); } /*** * 根据字符分类获取字符 */ @Override public SpecialCharInfo[] getBychar(String plscsfoId, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.getBychar(plscsfoId); } /** * 获取所有特殊字符分�? */ public SpecialCharClsfInfo[] getSpecialCharClsfList(com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.getSpecialCharClsfList(); } /** * 保存特殊字符 */ public String saveSpecialChar(SpecialCharInfo[] specialCharInfos, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.saveSpecialChar(specialCharInfos, userEntityInfo); } /** * 删除特殊字符 */ public boolean deletSpecialChar(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.deletSpecialChar(ids, userEntityInfo); } /** * 根据PID删除特殊字符 */ public boolean deleteSpecialCharByParentId(String id, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.deleteSpecialCharByParentId(id, userEntityInfo); } /** * 更新特殊字符 */ public boolean updateSpecialChar(SpecialCharInfo specialCharInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.updateSpecialChar(specialCharInfo, userEntityInfo); } /** * 获取特殊字符 */ public SpecialCharInfo[] fetchSpecialChar(String classId, com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.fetchSpecialChar(classId); } /** * 获取随机数ID */ public String getRandomGUID36(com.zeroc.Ice.Current current) throws VCIError { String id = ""; try { id = ObjectUtility.getNewObjectID36(); } catch (Exception e) { throw new VCIError("150113", new String[0]);//连接服务器时发生异常! } return id; } @Override public DeptInfo[] fetchDepartmentInfo(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfo(); } @Override public DeptInfo[] fetchDeptByUserNames(String[] userNames, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDeptByUserNames(userNames); } @Override public DeptInfo fetchDepartmentInfoById(String id, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfoById(id); } @Override public DeptInfo[] fetchDepartmentInfoRoot(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfoRoot(); } @Override public DeptInfo[] fetchDepartmentInfoByParentId(String prtoid, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfoByParentId(prtoid); } @Override public DeptInfo[] fetchDepartmentInfosById(String id, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfosById(id); } @Override public DeptInfo[] fetchDepartmentInfosBySonId(String id, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDepartmentInfosBySonId(id); } @Override public RoleInfo fetchRoleInfoById(String roleId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoById(roleId); } @Override public RoleInfo fetchRoleByName(String name, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleByName(name); } @Override public RoleInfo[] fetchRoleInfo(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfo(); } @Override public RoleInfo[] fetchRoleInfoByType(short type, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByType((int)type); } @Override public RoleInfo[] fetchRoleInfoByRoleType(short type, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByRoleType(type); } @Override public UserInfo[] fetchUserInfo(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfo(); } @Override public UserInfo[] fetchUserInfoWithOutSanYuan(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoWithOutSanYuan(); } @Override public UserInfo[] fetchUserInfoByCondition(String searchName, String searchUserName, String deptId, String roleId, String userName,long pageNo,long pageSize, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByCondition(searchName,searchUserName,deptId,roleId,userName,(int)pageNo,(int)pageSize); } @Override public UserInfo[] fetchUserInfoByType(short type, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByType(type); } @Override public UserInfo fetchUserInfoByName(String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByName(userName); } @Override public UserInfo[] fetchUserInfoByRoleId(String roleId, short type, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByRoleId(roleId ,type); } @Override public UserInfo[] fetchUsersByRoleId(String roleId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUsersByRoleId(roleId); } public UserInfo[] fetchUserInfoByDeptAndRole(String[] deptIds, String[] roleIds, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByDeptAndRole(deptIds ,roleIds); } @Override public boolean saveRight(String roleId, String[] userIds, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveRight(roleId , userIds, userEntityInfo); } @Override public boolean saveRighForDept(String deptId, String[] userIds, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveRighForDept(deptId , userIds, userEntityInfo); } public boolean saveRights(String[] roleIds, String[] userIds, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveRights(roleIds , userIds, userEntityInfo); } @Override public String saveDepartment(DeptInfo deptInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveDepartment(deptInfo,userEntityInfo); } @Override public boolean batchSaveDepart(DeptInfo[] deptInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.batchSaveDepart(deptInfo, userEntityInfo); } @Override public String saveRole(RoleInfo roleInfo,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveRole(roleInfo,userEntityInfo); } @Override public UserInfo[] selectUserByRoleId(String roleId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.selectUserByRoleId(roleId); } @Override public long checkRoleIsquotedCount(String id, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.checkRoleIsquotedCount(id); } @Override public String saveUser(UserInfo userInfo,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveUser(userInfo,userEntityInfo); } @Override public boolean batchSaveUsers(UserInfo[] userInfos, String[][] deptAndUserRelation, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { for(UserInfo userInfo : userInfos){ rightmanagementDelegate.saveUser(userInfo,userEntityInfo); } for(String[] userDept : deptAndUserRelation){ String[] userIds = new String[]{userDept[0]}; String deptId = userDept[1]; rightmanagementDelegate.saveUserDept(userIds , deptId, userEntityInfo); } return true; } @Override public boolean updateDepartment(DeptInfo deptInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateDepartment(deptInfo, userEntityInfo); } @Override public boolean updateRole(RoleInfo roleInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateRole(roleInfo, userEntityInfo); } @Override public boolean saveOrUpdateUser(UserInfo userInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveOrUpdateUser(userInfo, userEntityInfo); } @Override public boolean updateUser(UserInfo userInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateUser(userInfo, userEntityInfo); } @Override public String modifyUserPassword(String idUser, String oldPW, String newPW, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { //System.out.println("======modifyUserPassword======"); return rightmanagementDelegate.modifyUserPassword(idUser, oldPW, newPW, userEntityInfo); } @Override public boolean deleteDepartment(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deleteDepartment(ids,userEntityInfo); } @Override public boolean updateDeptParentId(String id, String parentId, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateDeptParentId(id, parentId, userEntityInfo); } @Override public boolean deleteRole(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deleteRole(ids,userEntityInfo); } @Override public boolean deleteUser(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deleteUser(ids,userEntityInfo); } @Override public UserInfo[] getUserByDeptId(String deptId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getUserByDeptId(deptId); } @Override public RoleInfo[] fetchRoleInfoByUserId(String userId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByUserId(userId); } @Override public UserInfo[] fetchUserInfoByModelId(String modelId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByModelId(modelId); } @Override public UserInfo[] fetchUserInfoByModel(String model, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserInfoByModel(model); } @Override public RoleInfo[] fetchRoleInfoByUserName(String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByUserName(userName); } @Override public RoleInfo[] fetchRoleInfoByUserType(String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByUserType(userName); } @Override public DeptInfo fetchDeptByUserId(String userId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDeptByUserId(userId); } @Override public DeptInfo fetchDeptByDeptName(String deptName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDeptByDeptName(deptName); } @Override public DeptInfo fetchDeptByParentIdAndName(String parentId, String deptName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchDeptByParentIdAndName(parentId,deptName); } @Override public boolean saveUserDept(String[] userIds, String deptId, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveUserDept(userIds , deptId, userEntityInfo); } @Override public boolean stopUsers(String[] ids, boolean flag, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.stopUsers(ids , flag, userEntityInfo); } @Override public String saveModule(FunctionInfo functionInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate(userEntityInfo).saveModule(functionInfo); } @Override public String updateModule(FunctionInfo functionInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate(userEntityInfo).updateModule(functionInfo); } @Override public String deleteModule(String moduleId, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate(userEntityInfo).deleteModule(moduleId); } @Override public String saveOperate(OperateInfo operateInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate(userEntityInfo).saveOperate(operateInfo); } @Override public String updateOperate(OperateInfo operateInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate(userEntityInfo).updateOperate(operateInfo); } @Override public boolean deleteOperate(String id, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate(userEntityInfo).deleteOperate(id); } // @Override // public int getAutoModuleNo() throws VCIError { // return new FunctionDelegate().getAutoModuleNo(); // } @Override public FunctionInfo[] getModuleListByParentId(String parentId, boolean isAll, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleListByParentId(parentId, isAll); } public FunctionInfo[] getChildrenFunctionsByParentId(String parentId, boolean isAll, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getChildrenFunctionsByParentId(parentId, isAll); } @Override public FunctionInfo[] getModuleListByParentIdForBS(String parentId, boolean isAll, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleListByParentIdForBS(parentId, isAll); } @Override public FunctionInfo[] getModuleListByParentIdForCS(String parentId, boolean isAll, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleListByParentIdForCS(parentId, isAll); } @Override public OperateInfo[] getOperateTreeList(String moduleId, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate().getOperateTreeList(moduleId); } @Override public long checkChildObject(String moduleId, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().checkChildObject(moduleId); } /** * 获取模块下的操作,如果操作ID为空,则获取模块下的全部操作 * @param functionId 模块ID * @param operateId 操作ID * @param onlyIsValid onlyIsValid 参数表示是否仅仅返回是生效的操作 true:是 false :不是(此时返回模块下全部的操作,仅在定义模块下的操作时需要返回全部的操作,其它情况需要均只需要返回生效的操作�? * @return */ @Override public FuncOperationInfo[] getFuncOperationByModule(String functionId,String operateId, boolean onlyIsValid, com.zeroc.Ice.Current current) throws VCIError { return new FuncOperationDelegate().getFuncOperationByModule(functionId, operateId, onlyIsValid); } @Override public boolean saveFuncOperation(FuncOperationInfo[] funcOperationInfos, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FuncOperationDelegate(userEntityInfo).saveFuncOperation(funcOperationInfos); } @Override public boolean updateFuncOperation(String id, String alias, boolean isSelected, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FuncOperationDelegate(userEntityInfo).updateFuncOperation(id, alias, isSelected); } @Override public long checkOperateIsReferenced(String operateId, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate().checkOperateIsReferenced(operateId); } @Override public boolean deleteFuncOperation(FuncOperationInfo funcOperationInfo,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new FuncOperationDelegate(userEntityInfo).deleteFuncOperation(funcOperationInfo); } @Override public boolean saveRoleRight(RoleRightInfo[] roleRightInfos,String roleId, String userName,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate(userEntityInfo).saveRoleRight(roleRightInfos,roleId,userName); } @Override public boolean addRoleRight(RoleRightInfo[] roleRightInfos, String roleId, String userName, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate(userEntityInfo).addRoleRight(roleRightInfos, roleId, userName); } @Override public boolean removeRoleRight(RoleRightInfo[] roleRightInfos,String roleId, String userName,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate(userEntityInfo).removeRoleRight(roleRightInfos,roleId,userName); } @Override public RoleRightInfo[] getRoleRightList(String roleId,String userName, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate().getRoleRightList(roleId,userName); } @Override public RoleRightInfo[] getRoleRightListByType(String[] rightType, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate().getRoleRightListByType(rightType); } @Override public PasswordStrategyInfo[] fetchAllPasswordStrategy(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchAllPasswordStrategy(); } @Override public boolean savePasswordStrategy(PasswordStrategyInfo info, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.savePasswordStrategy(info, userEntityInfo ); } @Override public boolean editPasswordStrategy(PasswordStrategyInfo info, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.editPasswordStrategy(info, userEntityInfo ); } @Override public boolean deletePasswordStrategy(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deletePasswordStrategy(ids,userEntityInfo ); } @Override public FunctionInfo[] getModuleListByRoleRight(String parentId, String userName, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleListByRoleRight(parentId,userName); } @Override public FunctionInfo[] getModuleListByRoleRightForBS(String parentId, String userName, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleListByRoleRightForBS(parentId,userName); } @Override public FunctionInfo getModuleByClass(String classPath, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleByClass(classPath); } /** * *根据模块funcOid信息查询出模块对象的信息
* * @author xchao * @time 2014-6-6 * @param funcOid * @return * @throws VciException */ @Override public FunctionInfo getFunctionObjectById(String funcOid, com.zeroc.Ice.Current current) throws VCIError{ return new FunctionDelegate().getFunctionObjectById(funcOid); } @Override public FunctionInfo getModuleByName(String moduleName, com.zeroc.Ice.Current current) throws VCIError { return new FunctionDelegate().getModuleByName(moduleName); } @Override public RoleRightInfo[] getRoleRightByModule(String funcId, String userName, com.zeroc.Ice.Current current) throws VCIError { String swithUIRight = CommonProperties.getStringProperty("ui.right.swith"); if (swithUIRight.equalsIgnoreCase("off")) { RoleInfo[] roles = this.fetchRoleInfoByUserName(userName, current); RoleRightInfo right = new RoleRightInfo(); right.funcId = funcId; if (roles.length > 0) right.roleId = roles[0].id; right.rightValue = 0xffffffff; right.rightType = 2; return new RoleRightInfo[] {right}; } return new RoleRightDelegate().getRoleRightByModule(funcId,userName); } @Override public RoleRightInfo[] getRoleRightByUserName(String userName, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate().getRoleRightByUserName(userName); } @Override public RoleRightInfo[] getFunctionRoleRightByUserName(String userName, com.zeroc.Ice.Current current) throws VCIError { return new RoleRightDelegate().getFunctionRoleRightByUserName(userName); } @Override public OperateInfo getOperateByIdentify(String identify, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate().getOperateByIdentify(identify); } @Override public FuncOperationInfo getFuncOperationByIdentify(String funcId, String identify, com.zeroc.Ice.Current current) throws VCIError { return new FuncOperationDelegate().getFuncOperationByIdentify(funcId,identify); } @Override public PasswordStrategyInfo fetchPasswordStrategyByUserId(String userId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchPasswordStrategyByUserId(userId); } @Override public String checkPasswordStrategyByUserId(String userId, String password, UserEntityInfo userEnt, com.zeroc.Ice.Current current) throws VCIError { //System.out.println("==================checkPasswordStrategyByUserId========================="); return rightmanagementDelegate.checkPasswordStrategyByUserId(userId, password); } @Override public long checkPasswordStrategyIsquotedCount(String id, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.checkPasswordStrategyIsquotedCount(id); } @Override public boolean saveUserPasswordStrateg(String[] userIds, String passwordStrategId, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveUserPasswordStrateg(userIds , passwordStrategId, userEntityInfo); } @Override public UserLogonInfo fetchUserLogonObj(String userId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchUserLogonObj(userId); } @Override public long getSystemTime(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getSystemTime(); } @Override public void updateLogonInfo(String userId, boolean flag, com.zeroc.Ice.Current current) throws VCIError { rightmanagementDelegate.updateLogonInfo(userId,flag); } @Override public void deblock(String[] ids,UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { rightmanagementDelegate.deblock(ids,userEntityInfo); } // // @Override // public LogPeriodInfo[] getPeriods(com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.getPeriods(); // } // @Override // public LogInfo[] fetchLogInfo(long pageNo, long pagesize, String sql, com.zeroc.Ice.Current current) // throws VCIError { // LogManagementDelegate logDel = new LogManagementDelegate(); // return logDel.fetchLogInfo((int)pageNo,(int)pagesize,sql); // } // // @Override // public LogInfo[] getLogListByContion(long pageNo, long pagesize, String sql, com.zeroc.Ice.Current current) // throws VCIError { // LogManagementDelegate logDelegate = new LogManagementDelegate(); // return logDelegate.getLogListByContion((int)pageNo,(int)pagesize,sql); // } // // @Override // public boolean savePeriod(SystemCfgInfo period, // UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { // LogManagementDelegate logDelegate = new LogManagementDelegate(); // return logDelegate.savePeriod(period,userEntityInfo); // } @Override public OperateInfo fetchOperateTypeByName(String name, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate().fetchOperateTypeByName(name); } @Override public OperateInfo getOperatetById(String id, com.zeroc.Ice.Current current) throws VCIError { return new OperateDelegate().getOperatetById(id); } @Override public RoleInfo[] getRoleListByTypeForMeasure(short type, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getRoleListByTypeForMeasure(type); } // @Override // public void savelog(String message, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { // rightmanagementDelegate.savelog(message, userEntityInfo); // } // @Override // public void saveLogV2(String result, String message, String type, short logTypeIntVal, String dataObjOid, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { // rightmanagementDelegate.saveLogV2(result, message, type, logTypeIntVal, dataObjOid, userEntityInfo); // } // // @Override // public void savelogfail(String message, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) // throws VCIError { // rightmanagementDelegate.savelogfail(message, userEntityInfo); // // } @Override public RoleInfo[] fetchRoleInfoByUserNameAndPage(long pageNo, long pageSize, String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchRoleInfoByUserName((int)pageNo,(int)pageSize,userName); } @Override public long getRoleTotalByUserName(String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getRoleTotalByUserName(userName); } @Override public PasswordStrategyInfo[] fetchAllPasswordStrategyByPage(long pageNo,long pageSize, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchAllPasswordStrategy((int)pageNo, (int)pageSize); } @Override public long getPasswordStrategyTotal(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getPasswordStrategyTotal(); } @Override public long getUserTotalByCondition(String searchName, String searchUserName, String deptId, String roleId, String userName, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.getUserTotalByCondition(searchName, searchUserName, deptId, roleId, userName); } @Override public long getSpecialCharClsTotal(com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.getSpecialCharClsTotal(); } @Override public SpecialCharClsfInfo[] getSpecialCharClsfList(long pageNo, long pageSize, Current current) throws VCIError { throw new VCIError("getSpecialCharClsfList", new String[] {"The method is not implemented"}); } @Override public SpecialCharClsfInfo[] getAllSpecialCharClsfList(com.zeroc.Ice.Current current) throws VCIError { SystemCfgDelegate sysCfgDel = new SystemCfgDelegate(); return sysCfgDel.getSpecialCharClsfList(); } @Override public CombinationInfo[] fetchAllCombinations(com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchAllCombinations(); } @Override public CombinationInfo[] fetchCombinationsToPage(long pageIndex, long pageSize, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchCombinationsToPage((int)pageIndex, (int)pageSize); } @Override public String saveCombination(CombinationInfo combinationInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveCombination(combinationInfo ,userEntityInfo); } @Override public boolean updateCombination(CombinationInfo combinationInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateCombination(combinationInfo ,userEntityInfo); } @Override public boolean deleteCombination(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deleteCombination(ids ,userEntityInfo); } @Override public CombinationValueInfo[] fetchCombinationValuesByParentId( String parentId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchCombinationValuesByParentId(parentId); } @Override public String saveCombinationValue( CombinationValueInfo[] combinationValueInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.saveCombinationValue(combinationValueInfo ,userEntityInfo); } @Override public boolean updateCombinationValue( CombinationValueInfo combinationValueInfo, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.updateCombinationValue(combinationValueInfo,userEntityInfo); } @Override public boolean deletCombinationValues(String[] ids, UserEntityInfo userEntityInfo, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.deletCombinationValues(ids ,userEntityInfo); } @Override public CombinationInfo[] fetchCombinationsByPstId(String pstId, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.fetchCombinationsByPstId(pstId); } @Override public long checkCombinationIsquotedCount(String combinationd, com.zeroc.Ice.Current current) throws VCIError { return rightmanagementDelegate.checkCombinationIsquotedCount(combinationd); } /** * 加载客户端需要加载的jar包路径 */ @Override public String[] getClientDeployJarPath(com.zeroc.Ice.Current current) throws VCIError { List