Hi all,
I wrote a DFS client which uploads and downloads document from the content server .This content server have ACS running and BOCS is also configured .The BOCS cache is working fine .I tested it with webtop by importing and exporting a file from the content server.I can able to see the contents in the acs cache location C:\Documentum\acsCache. But if download or upload a document through DFS it is not getting cached in the BOCS.Here is the code i used for content transfer.I have also set the ContentTransferProfile .What i am missing here .
what value i have to set for geolocation ?
//code to create file
File file = new File(filePath);
ContextFactory contextFactory = ContextFactory.getInstance();
IServiceContext context = contextFactory.newContext();
RepositoryIdentity repoId = new RepositoryIdentity();
repoId.setRepositoryName(repositoryName);
repoId.setUserName(username);
repoId.setPassword(password);
context.addIdentity(repoId);
try {
ContentTransferProfile profile = new ContentTransferProfile();
profile.setTransferMode(ContentTransferMode.UCF);
profile.setGeolocation("Bocs Server"); //not sure abt the value
profile.setCachedContentTransferAllowed(true);
context.setProfile(profile);
IObjectService objectService=ServiceFactory.getInstance().getService(IObjectService.class, context,serviceModule,contextRoot);
ObjectIdentity objIdentity = new ObjectIdentity(repositoryName);
DataObject dataObject = new DataObject(objIdentity,"dm_document");
PropertySet properties = dataObject.getProperties();
properties.set("object_name", "test.pdf");
properties.set("a_content_type", "pdf");
FileContent fileContent = new FileContent();
fileContent.setLocalPath(file.getAbsolutePath());
dataObject.getContents().add(fileContent);
OperationOptions operationOptions = new OperationOptions();
operationOptions.setContentTransferProfile(profile);
operationOptions.setProfile(profile);
ObjectPath objectPath = new ObjectPath("/"+repositoryName+"/TestFolder");
ObjectIdentity<ObjectPath> sampleFolderIdentity = new ObjectIdentity<ObjectPath>(objectPath, repositoryName);
ReferenceRelationship sampleFolderRelationship = new ReferenceRelationship();
sampleFolderRelationship.setName(Relationship.RELATIONSHIP_FOLDER);
sampleFolderRelationship.setTarget(sampleFolderIdentity);
sampleFolderRelationship.setTargetRole(Relationship.ROLE_PARENT);
dataObject.getRelationships().add(sampleFolderRelationship);
DataPackage newFilePropertiesInfo = objectService.create(new DataPackage(dataObject), operationOptions);
Thanks,
Maddy