Hi,
Is there a way to obtain file import with the use of webdav interface?
By file import I understand something equivalent to the following calls
using jcr api:
public Node importFile (Node folderNode, File file, String mimeType,
String encoding) throws RepositoryException, IOException
{
//create the file node - see section 6.7.22.6 of the spec
Node fileNode = folderNode.addNode (file.getName (), "nt:file");
//create the mandatory child node - jcr:content
Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
resNode.setProperty ("jcr:mimeType", mimeType);
resNode.setProperty ("jcr:encoding", encoding);
resNode.setProperty ("jcr:data", new FileInputStream (file));
Calendar lastModified = Calendar.getInstance ();
lastModified.setTimeInMillis (file.lastModified ());
resNode.setProperty ("jcr:lastModified", lastModified);
return fileNode;
}
How to add such nested node set if I don't have transaction lock/unlock
supported (see my previous post:
http://www.nabble.com/UNLOCK-with-%27abort%27-transaction-status-don%27t
-abort-the-transaction-tf2858874.html ) ?
Best regards
Edyta
The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose it
to anyone else. If you received it in error please notify us immediately and
then destroy it.