dangsn
2024-06-06 8c8c59c1f2005fa3ca89ac2117ca1a3c0c618913
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
package com.vci.web.util;
 
import com.vci.client.common.providers.ServiceProvider;
import com.vci.corba.bofactory.BOFactoryServicePrx;
import com.vci.corba.common.PLException;
import com.vci.corba.framework.FrameworkServicePrx;
import com.vci.corba.omd.atm.AttPoolServicePrx;
import com.vci.corba.omd.btm.BTMServicePrx;
import com.vci.corba.omd.etm.EnumServicePrx;
import com.vci.corba.omd.lcm.LifeCycleServicePrx;
import com.vci.corba.omd.ltm.LinkTypeServicePrx;
import com.vci.corba.omd.stm.StatePoolServicePrx;
import com.vci.corba.omd.vrm.VersionRuleServicePrx;
import com.vci.corba.portal.PortalServicePrx;
import com.vci.corba.query.ObjectQueryServicePrx;
import com.vci.corba.volume.VolumeServicePrx;
import com.vci.corba.workflow.WorkflowServicePrx;
import org.springframework.stereotype.Component;
 
/**
 * 平台的客户端调用工具类
 * @author weidy
 * @date 2021-2-14
 */
@Component
public class PlatformClientUtil {
 
    /**
     * 业务类型工厂的服务
     */
    private static final String BO_FACTORY_SERVICE_NAME = "bofFactoryService";
 
    /**
     * 登录服务
     */
    public static final String LOGON_FACTORY_SERVICE_NAME = "LogonFactoryService";
 
    /**
     * 状态池服务名字
     */
    public static final String STATE_POOL_SERVICE_NAME = "statePoolService";
 
    /**
     * 生命周期服务
     */
    public static final String LIFE_CYCLE_SERVICE_NAME = "lifeCycleService";
 
    /**
     * 枚举的服务
     */
    public static final String ENUM_SERVICE_NAME = "enumService";
 
    /**
     * 版本规则的服务
     */
    private static final String VERSION_SERVICE_NAME = "versionRuleService";
 
    /**
     * 属性的服务
     */
    private static final String ATTRIBUTE_SERVICE_NAME = "apService";
 
    /**
     * 业务类型的服务
     */
    private static final String BTM_SERVICE_NAME = "btmService";
 
    /**
     * 链接类型的服务
     */
    public static final String LINK_SERVICE_NAME = "linkTypeService";
    /**
     * UI上下文服务
     */
    private static final String PORTAL_SERVICE_NAME = "portalService";
    /**
     * 查询服务
     */
    private static final String QUERY_SERVICE_NAME = "qtService";
 
 
    /**
     * 获取业务类型工厂的服务
     * @return 服务的对象
     */
    public BOFactoryServicePrx getBOFactoryService(){
        return ServiceProvider.getBOFService();
   }
 
    /**
     * 获取流程服务
     * @return 服务的对象
     */
    public WorkflowServicePrx getWorkflowService(){
        return ServiceProvider.getWFService();
    }
 
    /**
     * 获取主服务
     * @Return 服务的对象
     */
    public FrameworkServicePrx getFrameworkService(){
        return ServiceProvider.getFrameService();
    }
 
    /**
     * 获取状态池的服务
     * @return 服务的对象
     */
    public StatePoolServicePrx getStatePoolService() throws PLException {
        return ServiceProvider.getOMDService().getStateService();
   }
 
    /**
     * 获取生命周期的服务
     * @return 生命周期的服务对象
     */
    public LifeCycleServicePrx getLifeCycleService() throws PLException {
        return ServiceProvider.getOMDService().getLifeCycleService();
}
 
    /**
     * 获取枚举的服务
     * @return 枚举的服务对象
     */
    public EnumServicePrx getEnumService() throws PLException {
        return ServiceProvider.getOMDService().getEnumService();
//        return EnumServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(ENUM_SERVICE_NAME));
    }
 
    /**
     * 获取版本规则的服务
     * @return 版本规则的服务
     */
    public VersionRuleServicePrx getVersionService() throws PLException {
        return ServiceProvider.getOMDService().getVerRuleService();
//        return VersionRuleServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(VERSION_SERVICE_NAME));
    }
 
    /**
     * 属性服务
     * @return 服务的对象
     */
    public AttPoolServicePrx getAttributeService() throws PLException {
        return ServiceProvider.getOMDService().getAttributeService();
//        return AttPoolServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(ATTRIBUTE_SERVICE_NAME));
    }
 
    /**
     * 获取业务类型
     * @return 服务的对象
     */
    public BTMServicePrx getBtmService() throws PLException {
        return ServiceProvider.getOMDService().getBTMService();
//        return BTMServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(BTM_SERVICE_NAME));
    }
 
    /**
     * 获取链接类型
     * @return 服务的对象
     */
    public LinkTypeServicePrx getLinkTypeService() throws PLException {
        return ServiceProvider.getOMDService().getLinkTypeService();
//        return LinkTypeServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(LINK_SERVICE_NAME));
    }
 
    /**
     * 获取UI上下文服务
     * @return 服务的对象
     */
    public PortalServicePrx getPortalService(){
        return ServiceProvider.getUIService();
//        return PortalServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(PORTAL_SERVICE_NAME));
    }
 
    /**
     * 获取查询服务
     * @return 服务的对象
     */
    public ObjectQueryServicePrx getQueryService(){
        return ServiceProvider.getOQService();
//        return QTServiceHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByServiceName(QUERY_SERVICE_NAME));
    }
 
    /**
     * 卷服务
     * @param volumeName 卷的名称
     * @return 卷服务的的对象
     */
    public VolumeServicePrx getVolumeService(String volumeName){
        return ServiceProvider.getVolumeService(volumeName);
//        return VolumnFactoryHelper.narrow(jacorbClientConnector.getCorbaServiceObjectByUrlAndServiceName(serverUrl,volumeName));
    }
 
}