com.diboot.iam.service.IamRoleResourceService Maven / Gradle / Ivy
/*
* Copyright (c) 2015-2020, www.dibo.ltd ([email protected]).
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.diboot.iam.service;
import com.diboot.core.service.BaseService;
import com.diboot.iam.entity.IamResource;
import com.diboot.iam.entity.IamRoleResource;
import com.diboot.iam.entity.route.RouteRecord;
import com.diboot.iam.vo.IamResourceVO;
import com.diboot.iam.vo.ResourceRoleVO;
import java.util.List;
/**
* 角色权限关联相关Service
*
* @author [email protected]
* @version 2.0
* @date 2019-12-03
*/
public interface IamRoleResourceService extends BaseService {
/**
* 获取用户的路由信息
*
* @return
* @throws Exception
*/
List getRouteRecords();
/**
* 获取指定角色对应的权限集(转换为树形结构VO)
*
* @param appModule
* @param roleId
* @return
*/
List getPermissionVOList(String appModule, String roleId);
/**
* 获取指定角色集合对应的权限VO集合(转换为树形结构VO)
*
* @param appModule
* @param roleIds
* @return
*/
List getPermissionVOList(String appModule, List roleIds);
/**
* 获取指定角色集合对应的权限集
*
* @param appModule
* @param roleIds
* @return
*/
List getPermissionList(String appModule, List roleIds);
/**
* 获取指定角色集合对应的权限码集合
*
* @param appModule
* @param roleIds
* @return
*/
List getPermissionCodeList(String appModule, List roleIds);
/**
* 获取资源角色VO集合
*
* @return
*/
List getAllResourceRoleVOList();
/**
* 批量创建角色与资源集的关系
*
* @param roleId
* @param resourceIdList
* @return
*/
boolean createRoleResourceRelations(String roleId, List resourceIdList);
/**
* 批量更新角色与资源集的关系
* @param roleId
* @param resourceIdList
* @return
*/
boolean updateRoleResourceRelations(String roleId, List resourceIdList);
/**
* 删除角色下的资源
* @param roleId
* @return
*/
boolean deleteRoleResourceRelations(String roleId);
/**
* 获取RoleService实例
*
* @return
*/
IamRoleService getRoleService();
/**
* 获取PermissionService实例
*
* @return
*/
IamResourceService getPermissionService();
}