package com.vci.web.service; import com.vci.corba.common.PLException; import com.vci.corba.framework.data.RoleRightInfo; import com.vci.corba.omd.btm.BizType; import com.vci.corba.omd.ltm.LinkType; import com.vci.corba.omd.qtm.QTInfo; import com.vci.corba.portal.data.PLTabPage; import com.vci.corba.portal.data.PLUILayout; import com.vci.corba.portal.data.PortalVI; import com.vci.dto.UIAuthorDTO; import com.vci.pagemodel.*; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.BaseQueryObject; import com.vci.starter.web.pagemodel.BaseResult; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.pagemodel.Tree; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map; /** * UI定义管理服务 * @author ludc * @date 2024/8/28 17:05 */ public interface UIManagerServiceI { /** * 通过业务类型name查询ui上下文,支持分页 * @param baseQueryObject * @return * @throws PLException */ DataGrid gridUIContextData(BaseQueryObject baseQueryObject) throws PLException; /** * 给业务类型下添加ui上下文 * @param pluiLayout * @return * @throws PLException */ boolean saveUIContextData(PLUILayout pluiLayout) throws PLException; /** * 修改业务类型下添加ui上下文 * @param pluiLayout * @return * @throws PLException */ boolean updateUIContextData(PLUILayout pluiLayout) throws PLException; /** * 根据主键和业务类型oid删除ui上下文数据 * @return */ boolean delUIContextData(String[] oids,String plRelatedType) throws PLException; /** * 克隆ui上下文 * @param pluiLayoutCloneVO * @return */ boolean cloneUIContextData(PLUILayoutCloneVO pluiLayoutCloneVO) throws PLException; /** * 根据勾选的条件获取需要导出的ui上下文树 * @param expDatas * @return */ Tree getExpContextTree(List expDatas); /** * 导出ui上下文(勾选的要导出的控制区的数据) * oids * @return */ String expUIContextData(Map expConditionMap) throws PLException, IOException; /** * 导入UI上下文 * @param file * @return */ BaseResult impUIContextData(File file, boolean isCovered,String selectBtm); //区域相关查询、添加、删除、修改等接口 /** * 根据上下文ID和区域类型,按顺序获取当前区域的tab页 */ DataGrid getTabByContextIdAndType(String contextId, int areaType) throws PLException; /** * 添加区域(页签)数据 * @param plTabPage * @return */ boolean addTabData(PLTabPage plTabPage) throws PLException; /** * 修改区域(页签)数据 * @param plTabPage * @return */ boolean updateTabData(PLTabPage plTabPage) throws PLException; /** * 删除区域(页签)数据 * @param oids * @return */ boolean deleteTabData(String[] oids) throws PLException; /** * 检查扩展属性数据格式是否合规,并给出提示 * @param extAttr * @return */ BaseResult checkTabPageExtAttrIsOk(String extAttr); //页面设计相关接口 /** * 查询页面设计定义 * @param pageContextOId * @return */ DataGrid getPLPageDefinations(String pageContextOId) throws PLException; /** * 添加页面定义 * @param pdVO * @return */ boolean addPageDefination(PLDefinationVO pdVO) throws Throwable; /** * 修改页面定义 * @param pdVO * @return */ boolean updatePageDefination(PLDefinationVO pdVO) throws Throwable; /** * 删除页面定义 * @param oids * @return */ boolean delPageDefination(String[] oids) throws PLException; //页面设计下配置按钮相关接口 /** * 获取页签区域按钮配置信息 * @param pageDefinationOid * @return */ List getTabButtons(String pageDefinationOid); /** * 添加按钮配置信息 * @param tabButtonVO * @return */ BaseResult addTabButton(PLTabButtonVO tabButtonVO); /** * 修改按钮配置信息 * @param tabButtonVO * @return */ BaseResult updateTabButton(PLTabButtonVO tabButtonVO); /** * 保存或修改按钮配置信息 * @param tabButtonVO * @return */ boolean saveOrUpdateTabButton(PLTabButtonVO tabButtonVO,boolean isAdd); /** * 删除单个按钮配置 * @param tabButtonVO * @return */ boolean deleteTabButton(PLTabButtonVO tabButtonVO) throws PLException; /** * 调整为下级按钮 * @param tabButtonVO * @return */ BaseResult joinBtn(PLTabButtonVO tabButtonVO) throws PLException; /** * 调整为上级按钮 * @param tabButtonVO * @return */ BaseResult exitBtn(PLTabButtonVO tabButtonVO) throws PLException; /** * 获取UI权限树 * @param baseQueryObject * @return * @throws VciBaseException */ List getUIAuthor(BaseQueryObject baseQueryObject)throws Exception; /** * 根据角色主键获取已授权的信息 * @param roleId * @return * @throws PLException */ Map> getRoleRightMap(String roleId) throws PLException; /** * UI授权 * @param uiAuthorDTO * @return * @throws Exception */ boolean authorizedUI(UIAuthorDTO uiAuthorDTO)throws Exception; /** * 业务类型、源对象类型、顶层节点显示类型等都调用这个接口查询 * @param baseQueryObject * @return * @throws PLException */ DataGrid getBtmDatasByPage(BaseQueryObject baseQueryObject) throws Throwable; /** * 查询链接类型下拉 * @param baseQueryObject * @return * @throws PLException */ DataGrid getLinkDatasByPage(BaseQueryObject baseQueryObject) throws Throwable; /** * UI定义下拉查询(templateType为UI定义时的选择对象下拉查询) * @param baseQueryObject selectBtmType 选择的源对象,带分页信息 * @return * @throws PLException */ DataGrid getUILayoutDatasByPage(BaseQueryObject baseQueryObject)throws Throwable; /** * 选择模板下拉查询(templateType为表格、表单、树表时的选择对象下拉查询) * @param baseQueryObject * @return * @throws PLException */ DataGrid getPortalVIDatasByPage(BaseQueryObject baseQueryObject) throws Throwable; /** * 查询模板下拉查询 * @param baseQueryObject * @return * @throws PLException */ DataGrid getQTInfoDatasByPage(BaseQueryObject baseQueryObject)throws Throwable; /** * 通过业务类型获取UI上下文包含其下关联的区域定义>页面定义等所有关联数据,归纳成tree结构 * @param btmName 业务类型名称 * @param level 查询到那个层级为止(ui、tap、pageDef) * @return */ Tree getAllLevelTreeByBtm(String btmName,String level) throws PLException; /** * 克隆按钮 * @param uiCloneVO * @return * @throws Throwable */ BaseResult cloneTabButton(UICloneVO uiCloneVO)throws Throwable; /** * 克隆页签 * @param uiCloneVO * @return * @throws Throwable */ BaseResult clonetabPage(UICloneVO uiCloneVO)throws Throwable; /** * 克隆页面定义 * @param uiCloneVO * @return * @throws Throwable */ BaseResult clonePageDef(UICloneVO uiCloneVO)throws Throwable; }