田源
2024-03-07 4b4083fd73dc27ece42f4835483565eef0e4f608
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
package com.vci.client.omd.versionrule.delegate;
 
import com.vci.client.omd.versionrule.VRClientStart;
import com.vci.client.omd.versionrule.bean.ClientVersionRule;
import com.vci.corba.common.VCIError;
import com.vci.corba.omd.vrm.VersionRule;
 
 
/**
 * 版本号规则客户端业务处理扩展类
 * @author liwei
 *
 */
public class VersionRuleClientDelegate {
    
    private ClientVersionRule    clientVersionRule =null;
    private boolean  isSuccess;
    
    /***
     * 增加版本规则
     * @author liwei
     */
    public boolean addClientVersionRule(VersionRule versionRule){
        try {
            clientVersionRule = new ClientVersionRule();
            clientVersionRule.setVersionRule(versionRule);
            //其他扩展的业务逻辑处理 。。。。。。
             isSuccess = VRClientStart.getService().addVersionRule(clientVersionRule.getVersionRule());
        } catch (VCIError e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return isSuccess;
    }
    
    /**
     * 修改版本规则
     * @author liwei
     */
    public boolean  modifyClientVersionRule(VersionRule versionRule){
        try {
            clientVersionRule = new ClientVersionRule();
            clientVersionRule.setVersionRule(versionRule);
            //其他扩展的业务逻辑处理  ......
            isSuccess = VRClientStart.getService().modifyVersionRule(clientVersionRule.getVersionRule());
        } catch (VCIError e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return isSuccess;
        
    }
    /***
     * 删除版本规则
     * @author liwei
     */
    public boolean deleteClientVersionRule(VersionRule versionRule){
        try {
            clientVersionRule = new ClientVersionRule();
            clientVersionRule.setVersionRule(versionRule);
            //其他扩展的逻辑处理
            isSuccess = VRClientStart.getService().deleteVersionRule(clientVersionRule.getVersionRule());
        } catch (VCIError e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return isSuccess;
    }
}