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);
|
}
|
|
}
|