dangsn
2024-12-26 4e9ff2ce6a830bb2340d7c8612c72eea0c5a553e
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
package com.vci.test;
 
import com.vci.client.common.objects.ClientInfo;
import com.vci.client.common.objects.UserEntityObject;
import com.vci.client.common.objects.UserObject;
import com.vci.client.framework.delegate.RightManagementClientDelegate;
 
public class TestClient {
 
    /**
     * @param args
     * @throws Throwable 
     */
    public static void main(String[] args) throws Throwable {
        // TODO Auto-generated method stub
        
        String userName = "1";
        String password = "1";
        String ip = "127.0.0.1";
        UserEntityObject userEntityObject = new UserEntityObject(userName, ip);
        
        ClientInfo ci = new ClientInfo();
        ci.setOsUser(userName);
        ci.setMachine(System.getenv("os.name"));
        ci.setIp(ip);
        
        RightManagementClientDelegate rmcd = new RightManagementClientDelegate(userEntityObject);
        UserObject uo = rmcd.checkLogin(userName, password, ci);
        
        
        
//        String destFileFullPath = "E:/store/0B/61/61AAA75F-24A1-01F4-8121-745FBFACF767"; // 卷中文件完整路径
//        long clientFileSize = 17518557l; // 客户端文件实际大小
//        String clientFileMD5 = ""; // 
//        String[] otherParams = new String[]{};
//        boolean res = VolumnSession.getVolumnService().verifyFileUploadSuccess(
//                destFileFullPath, clientFileSize, clientFileMD5, otherParams);
//        System.out.println(res);
        
        // 上传
//        IClientFileBaseOperation fileOpt = ClientFileOperationsFacade.getInstance().getClientFileBaseOperation();
//
//        ObjectUtility objUtil = ObjectUtility;
//        String fileFullPath = "D:/Work/0812 VCITest 数据库备份.rar";
//        // 1、生成临时FOVO(基于数据所属业务类型及所属数据OID)
//        FileObjectVO fovo = fileOpt.createNewFileVO("xcxc", "xcxc", fileFullPath);
//
//        // 2、基于FOVO得到FCBO
//        FileComplexBO fcbo = FileCommonUtil.getFOMFacadeService().retriveNewFileBO(fovo);
//        fcbo.fileObject.revisionid = objUtil.getNewObjectID36();
//        fcbo.fileObject.nameoid = objUtil.getNewObjectID36();
//        fcbo.fileStream.revisionid = objUtil.getNewObjectID36();
//        fcbo.fileStream.nameoid = objUtil.getNewObjectID36();
//
//        // 3、基于FCBO得到FO对应的CBO(该数据业务类型为fileobject)
//        ClientBusinessObject cbo = new ClientBusinessObject();
//        cbo.setBusinessObject(fcbo.fileObject);
//
//        // 4、上传文件
//        fileOpt.sendVolumeFile(fileFullPath, fovo.filePath);
    }
 
}