| | |
| | | import com.thoughtworks.xstream.io.xml.XppDriver; |
| | | import com.vci.client.common.providers.ServiceProvider; |
| | | import com.vci.corba.common.VCIError; |
| | | import com.vci.corba.portal.data.PLPageDefination; |
| | | import com.vci.corba.portal.data.PLUILayout; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLTabPage; |
| | | import com.vci.corba.portal.data.PLTabButton; |
| | | |
| | | import plm.corba.portal.*; |
| | | |
| | | import java.util.*; |
| | |
| | | @Override |
| | | @VciUnLog |
| | | public UITableDefineVO tableDO2VO(PortalVI portal, boolean queryDetail) { |
| | | if(){ |
| | | if(null != null){ |
| | | |
| | | } |
| | | UITableDefineVO tableDefineVO = new UITableDefineVO(); |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public List<UIActionVO> actionDO2VOs(Collection<PLAction> actions) { |
| | | public List<UIActionVO> actionDO2VOs(Collection<com.vci.corba.portal.data.PLAction> actions) { |
| | | List<UIActionVO> actionVOS = new ArrayList<>(); |
| | | Optional.ofNullable(actions).orElseGet(()->new ArrayList<>()).stream().forEach(action->{ |
| | | UIActionVO actionVO = actionDO2VO(action); |
| | |
| | | */ |
| | | @Override |
| | | @VciUnLog |
| | | public UIActionVO actionDO2VO(PLAction action) { |
| | | public UIActionVO actionDO2VO(com.vci.corba.portal.data.PLAction action) { |
| | | UIActionVO actionVO = new UIActionVO(); |
| | | if(action!=null){ |
| | | actionVO.setOid(action.plOId); |
| | |
| | | * @param pages 区域的数据对象 |
| | | * @return 显示对象 |
| | | */ |
| | | private List<UILayoutVO> UILayoutDO2VOs(Collection<PLTabPage> pages, boolean queryDetail){ |
| | | private List<UILayoutVO> UILayoutDO2VOs(Collection<com.vci.corba.portal.data.PLTabPage> pages, boolean queryDetail){ |
| | | List<UILayoutVO> contentVOS = new ArrayList<>(); |
| | | Optional.ofNullable(pages).orElseGet(()->new ArrayList<PLTabPage>()).stream().forEach(page->{ |
| | | Optional.ofNullable(pages).orElseGet(()->new ArrayList<com.vci.corba.portal.data.PLTabPage>()).stream().forEach(page->{ |
| | | UILayoutVO layoutVO = UILayoutDO2VO(page, queryDetail); |
| | | if(layoutVO.isEnableStatus()) { |
| | | contentVOS.add(layoutVO); |
| | |
| | | * @return 区域的显示对象 |
| | | */ |
| | | @VciUnLog |
| | | private UILayoutVO UILayoutDO2VO(PLTabPage page, boolean queryDetail){ |
| | | private UILayoutVO UILayoutDO2VO(com.vci.corba.portal.data.PLTabPage page, boolean queryDetail){ |
| | | UILayoutVO layoutVO = new UILayoutVO(); |
| | | if(page !=null ){ |
| | | layoutVO.setOid(page.plOId); |
| | |
| | | } |
| | | if(!QUERY_BY_CACHE){ |
| | | try { |
| | | PLPageDefination plPageDefination = ServiceProvider.getUIService().getPLPageDefinationById(componentOid); |
| | | // PLPageDefination plPageDefination = platformClientUtil.getPortalService().getPLPageDefinationById(componentOid); |
| | | return uiComponentDO2VO(plPageDefination,true); |
| | | platformClientUtil.getPortalService().getPLPageDefinationById(componentOid); |
| | | return uiComponentDO2VO(null,true); |
| | | } catch (VCIError vciError) { |
| | | throw WebUtil.getVciBaseException(vciError); |
| | | } |
| | |
| | | * @param pages 数据对象 |
| | | * @return 显示对象 |
| | | */ |
| | | private List<UIComponentVO> uiComponentDO2VOs(Collection<PLPageDefination> pages, boolean queryDetail){ |
| | | private List<UIComponentVO> uiComponentDO2VOs(Collection<com.vci.corba.portal.data.PLPageDefination> pages, boolean queryDetail){ |
| | | List<UIComponentVO> componentVOS = new ArrayList<>(); |
| | | pages.stream().forEach(page->{ |
| | | componentVOS.add(uiComponentDO2VO(page,queryDetail)); |
| | |
| | | * @return 显示对象 |
| | | */ |
| | | @VciUnLog |
| | | private UIComponentVO uiComponentDO2VO(PLPageDefination page, boolean queryDetail){ |
| | | private UIComponentVO uiComponentDO2VO(com.vci.corba.portal.data.PLPageDefination page, boolean queryDetail){ |
| | | UIComponentVO componentVO = new UIComponentVO(); |
| | | if(page !=null){ |
| | | componentVO.setOid(page.plOId); |
| | |
| | | throw new VciBaseException("{0}里的表格{1}不存在", new String[]{btmType, componentDefineXO.getTemplateId()}); |
| | | } |
| | | componentVO.setTableDefineVO(tableDefineVOMap.get(key)); |
| | | |
| | | }else{ |
| | | try { |
| | | componentVO.setTableDefineVO(tableDO2VO(ServiceProvider.getUIService().getPortalVIByTypeNameAndVIName(btmType,componentDefineXO.getTemplateId()),true)); |
| | |
| | | * @return 显示对象 |
| | | */ |
| | | @Override |
| | | public List<UIButtonDefineVO> buttonDO2VOs(Collection<PLTabButton> buttons){ |
| | | public List<UIButtonDefineVO> buttonDO2VOs(Collection<com.vci.corba.portal.data.PLTabButton> buttons){ |
| | | List<UIButtonDefineVO> buttonDefineVOS = new ArrayList<>(); |
| | | Optional.ofNullable(buttons).orElseGet(()->new ArrayList<>()).stream().forEach(button->{ |
| | | buttonDefineVOS.add(buttonDO2VO(button)); |
| | |
| | | // return UIContentDO2VO(context,true); |
| | | return UIContentDO2VO(null,true); |
| | | } |
| | | |
| | | } |
| | | |