ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
Source/Client/PLTClientBase/src/com/vci/client/common/providers/ServiceProvider.java
@@ -5,13 +5,15 @@
import com.vci.common.util.IceProxyUtility;
//import com.vci.corba.auth2.Auth2ServicePrx;
import com.vci.corba.bofactory.BOFactoryServicePrx;
import com.vci.corba.framework.method.FrameworkServicePrx;
import com.vci.corba.framework.FrameworkServicePrx;
import com.vci.corba.log.LogServicePrx;
//import com.vci.corba.framework.method.VolumeManagerPrx;
import com.vci.corba.omd.OMDServicePrx;
import com.vci.corba.portal.PortalServicePrx;
import com.vci.corba.query.ObjectQueryServicePrx;
import com.vci.corba.volume.VolumeServicePrx;
import com.vci.corba.workflow.method.WorkflowServicePrx;
import com.vci.corba.workflow.WorkflowServicePrx;
import com.zeroc.Ice.ObjectPrx;
import com.vci.client.mw.ClientProxyUtility;
public class ServiceProvider {
@@ -36,6 +38,20 @@
      FrameworkServicePrx service = getInstance().getFrameServiceImpl();
      if (service == null) {
         String error = "获取 Frame Service 服务异常";
         System.out.println(error);
      }
      return service;
   }
   /**
    * 获取系统该框架服务代理
    * @return
    */
   public static LogServicePrx getLogService()  {
      LogServicePrx service = getInstance().getLogServiceImpl();
      if (service == null) {
         String error = "获取 Log Service 服务异常";
         System.out.println(error);
      }
      
@@ -157,12 +173,14 @@
   /**
    * 获取工作流服务代理
    * @return
    * @throws Exception
    */
   public static WorkflowServicePrx getWFService()  {
      WorkflowServicePrx service = getInstance().getWFServiceImpl();
      if (service == null) {
         String error = "获取 WorkflowService 服务异常";
         System.out.println(error);
         //throw new Exception(error);
      }
      
      return service;
@@ -244,12 +262,35 @@
            InitIceUtil();
         }
         
         _frameService = FrameworkServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.FRAMESERVICE));
         ObjectPrx prx = _proxyUtil.getObjectByName(ServiceNames.FRAMESERVICE, ServiceNames.FRAMESERVICEREP);
         _frameService = FrameworkServicePrx.checkedCast(prx);
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
      }
      return _frameService;
   }
   private LogServicePrx _logService = null;
   private LogServicePrx getLogServiceImpl() {
      try {
         if(_logService != null){
            return _logService;
         }
         if (_proxyUtil == null) {
            InitIceUtil();
         }
         ObjectPrx prx = _proxyUtil.getObjectByName(ServiceNames.LOGSERVICE, ServiceNames.LOGSERVICEREP);
         _logService = LogServicePrx.checkedCast(prx);
      } catch (Exception e) {
         ServerWithLog4j.logger.error(e);
      }
      return _logService;
   }
@@ -284,7 +325,7 @@
            InitIceUtil();
         }
         
         _bofService = BOFactoryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.BOFSERVICE));
         _bofService = BOFactoryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.BOFSERVICE, ServiceNames.BOFSERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
@@ -322,7 +363,7 @@
            InitIceUtil();
         }
         
         _oqService = ObjectQueryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OQSERVICE));
         _oqService = ObjectQueryServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OQSERVICE, ServiceNames.OQSERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
@@ -362,7 +403,7 @@
            InitIceUtil();
         }
         
         _uiService = PortalServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.UISERVICE));
         _uiService = PortalServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.UISERVICE, ServiceNames.UISERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
@@ -382,7 +423,7 @@
            InitIceUtil();
         }
         _omdService = OMDServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OMDSERVICE));
         _omdService = OMDServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.OMDSERVICE, ServiceNames.OMDSERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
@@ -401,7 +442,7 @@
            InitIceUtil();
         }
         _wfService = WorkflowServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.WFSERVICE));
         _wfService = WorkflowServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.WFSERVICE, ServiceNames.WFSERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);
@@ -433,7 +474,7 @@
            InitIceUtil();
         }
         
         _defaultVolService = VolumeServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.VOLUMESERVICE));
         _defaultVolService = VolumeServicePrx.checkedCast(_proxyUtil.getObjectByName(ServiceNames.VOLUMESERVICE, ServiceNames.VOLUMESERVICEREP));
      } catch (Exception e) {
         //e.printStackTrace();
         ServerWithLog4j.logger.error(e);