⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rightdelegateif.java

📁 Java开发的权限管理的例子
💻 JAVA
字号:
package org.artemis.right;

import java.util.List;
import org.artemis.right.model.Function;
import org.artemis.right.model.Permission;
import org.artemis.right.model.Role;
import org.artemis.right.model.User;
import org.artemis.right.model.UserRole;
import com.gsta.eshore.framework.daoutil.CriteriaQuery;
import com.gsta.eshore.framework.daoutil.PageSupport;
import com.gsta.eshore.framework.facade.AbstractBizDelegateIF;
import com.gsta.eshore.framework.jcf.IState;
import com.gsta.eshore.framework.daoutil.HqlQuery;

public interface RightDelegateIF extends AbstractBizDelegateIF {

	public abstract boolean findWorkflow(IState state);

	public Role findgrantedAuthorityFromDataBase(String authority, IState state);

	public Function findFunctionFromDataBase(String protectfunction,IState state);
	
	public List findFunctionByRoleId(String roleId,IState state);

	public User findUserByNameFromDataBase(String name, IState state);
	
	public List findRoleByFunction(String functionId, IState state);
	
	public String saveUser(User user, IState state);

	public boolean isUserExist(String name, IState state);

	// 查找用户
	public User findUserById(String userId, IState state);
	
	public List findOtherFunctionByRoleId(String roleId,IState state);
	
	public PageSupport findOtherFunctionByHql(HqlQuery hqlQuery,String roleId,IState state);

	public PageSupport findAllUser(CriteriaQuery cq, IState state);

	// 密码要MD5加密再传到数据库中
	public void updateUserPassowrd(String userId, String password, IState state);

	// 权限管理
	public String saveFunction(Function function, IState state);

	public boolean deleteFunctionById(String id, IState state);

	public void deleteFunction(Function function, IState state) ;
	
	public Function findFunctionById(String id, IState state);

	public PageSupport findAllFunction(CriteriaQuery cq,IState state);

	public void updateFunction(Function function, IState state);

	// 为角色增加权限
	public boolean saveFunctionToRole(Permission permission, IState state);
	
	public void saveFunctionsToRole(List permissions, IState state);

	public void deleteFunctionsFromRole(List permissions, IState state);
	
	public void deleteRole(Role role, IState state) ;
	
	public Role findRoleById(String id, IState state) ;

	// 角色
	public String saveRole(Role role, IState state);

	public void deleteRoleById(String roleId, IState state);

	public PageSupport findAllRole(CriteriaQuery cq, IState state);

	public void updateRole(Role role, IState state);

	// 为用户增加角色
	public void saveRoleToUser(UserRole userRole, IState state);

	public void saveRolesToUser(List userRoles, IState state);

	public void deleteRoleFromUser(List userRoles, IState state);

	public void deletePermissionByRoleId(String roleId, IState state);
	
	public void deletePermissionByFunctionId(String functionId, IState state);
	
	public void deleteUserRoleByUserId(String userId, IState state);
	
	public void deleteUserRoleByRoleId(String roleId, IState state) ;
	
	public void updateUser(User user, IState state);
	
	public List findRoleByUser(String userId, IState state);
	
	public List findFunctionByUser(String userId, IState state);
	
	public void deleteRoleFromUser(UserRole userRole, IState state) ;
	
	public PageSupport findOtherRoleByUser(HqlQuery hqlQuery,String userId, IState state);
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -