here is the code which i tried....
// Get the destinationNode to which the file to be added
*Node destinationNode = rootNode.addNode(*
*destinationNodeName);
Node file = destinationNode.addNode(**fileName,
"nt:file");*
Node contentNode = file.addNode("jcr:content",
"nt:resource");
// Make a stream object using the file path
InputStream fileStream = new
FileInputStream(filePath);
// set the mandatory properties
contentNode.setProperty("jcr:data", fileStream);
contentNode.setProperty("jcr:lastModified",
Calendar.getInstance());
contentNode.setProperty("jcr:mimeType", mimeType);
session.save();
Inorder to make node versionable......... do i need to add
*destinationNode.addMixin( "mix:versionable" );
(or)
contentNode .addMixin( "mix:versionable" );*
On Fri, Jan 29, 2010 at 4:02 PM, abhishek reddy <[email protected]>wrote:
> hi every one,
>
> Need help in versioning FileNode....... How to version the FileNode?
>
>
> --
> Abhishek
>
--
Abhishek