Hello all,
I wrote a small dfc program to import documents into a repository.
The problem I found is the original documents in the local drive are removed after the import is done.
How can I change this behavior?
See below the part of the import of my code:
private static void importarDocumento(IDfSessionManager sessMgr,String repoName,String file,String destFldrId) throws DfException
{
IDfSession sess = null;
try
{
IDfClientX clientX = new DfClientX();
IDfImportOperation impOper = clientX.getImportOperation();
sess = sessMgr.getSession(repoName);
impOper.setSession(sess);
IDfFile localFile = clientX.getFile(file);
IDfImportNode impNode = (IDfImportNode) impOper.add(localFile);
IDfId destId = new DfId(destFldrId);
impOper.setDestinationFolderId(destId);
if(impOper.execute())
{
IDfDocument newObj = (IDfDocument)impNode.getNewObject();
System.out.println("Objeto creado: " + newObj.getObjectId());
}
else
{
System.out.println("Error en Import");
IDfList errList = impOper.getErrors();
for(int i=0;i<errList.getCount();i++)
{
// System.out.println(errList.getString(i));
}
}
}
finally
{
if(sess != null)
{
sessMgr.release(sess);
}
}
}
Any ideas of how to do this import without removing the original files??
Thanks a lot,
Saul