Hi,
I'm writing some import process for the DMS.
I would like to add a new version of document when a same document is imported
twice with new content (for example, a fund fact sheet).
My import process works well for the first creation.
But to add the new version, it keeps the content from the first version.
Here under is my coding.
Can someone help?
Thanks,
Françoise.
// --- check if the document is present
Content node = hm.getRoot();
if (node.hasContent(filePathAndName)){
logger.warn("entry exists for:" + filePathAndName);
node = hm.getContent(filePathAndName, false, ItemType.CONTENTNODE);
} else {
logger.warn("NO entry for:" + filePathAndName);
node = hm.createContent(filePath, fileName,
ItemType.CONTENTNODE.getSystemName());
}
// --- add metadata
node.createNodeData("description", "this is the description of node:" +
fileName + " [" + new Date() + "]");
node.createNodeData("subject", "subject:" + fileName);
// --- create the document itself...
info.magnolia.module.dms.beans.Document doc = new
info.magnolia.module.dms.beans.Document(node);
doc.addVersion();
doc.setFile(fileName, extension, file.getStream(), file.getSize());
node.getParent().save();
--------------------------------------------------------
Françoise Gérard ([email protected] )
Senior Consultant
BSB Luxembourg (www.bsb.com)
7A, rue des MérovingiensZ.A.I. Bourmicht - L-8070 Bertrange
T:+352 47 57 39 56 - F:+352 47 57 39 99
--------------------------------------------------------
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Vincent Faidherbe
Sent: mardi 6 janvier 2009 14:37
To: Magnolia User-List
Subject: RE: [magnolia-user] magnolia module wish list
I've already mentioned it few months ago but for my website
(http://www.pyschotonique.be), I've developed an import command that is invoked
in background using the Scheduler module. The command scans a local directory
and import any mp3 files found in that directory. It maps directly ID3v2 tags
to document attributes. When I will find some time free, I plan to package it
as a reusable magnolia module and to improve it in order to allow to easily
support other file types. I will also change the code in order to use Commons
VFS instead of the low level java.io API so it should be easy to support WEBDAV
or FTP. Is it what you are looking for?
Additionally when the 4.0 will be released, I also plan to make some
experiments with Quercus (http://quercus.caucho.com/) in order to add PHP as a
supported templating language in Magnolia. Anyone interested?
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Will Scheidegger
Sent: Tuesday, January 06, 2009 1:51 PM
To: Magnolia User-List
Subject: Re: [magnolia-user] magnolia module wish list
Import from where? In what form is the meta-data stored now?
I'm asking because I'm currently faced with the same problem:
- Large file share on a WebDAV server
- Meta-Data also stored in the WebDAV system
Regards,
-will
On 06.01.2009, at 13:42, Françoise Gérard wrote:
>
> My wish-list:
>
> A module to import massively documents (let's say 1000 ones of 2Mb
> each) on the DMS, with their meta-data.
>
>
> --------------------------------------------------------
>
> Françoise Gérard ([email protected] )
> Senior Consultant
>
>
> BSB Luxembourg (www.bsb.com)
> 7A, rue des MérovingiensZ.A.I. Bourmicht - L-8070 Bertrange
> T:+352 47 57 39 56 - F:+352 47 57 39 99
> --------------------------------------------------------
>
>
>
> BUSINESS SOLUTIONS BUILDERS DISCLAIMER
> This e-mail message and any attachments are intended exclusively for
> the addressee(s) and may contain information which is confidential
> and/or protected by intellectual property rights. If you receive
> this e-mail by mistake, please notify immediately the sender, or
> Business Solutions Builders (by e-mail at [email protected]), and
> delete the message and any attachments without printing, copying or
> opening it. Any disclosure, reproduction, distribution or use of
> this message or any attachments, by persons other than the designed
> addressee(s), is strictly prohibited. E-mail transmission and
> Internet use cannot be guaranteed to be secure. Business Solutions
> Builders and its subsidiaries cannot be held responsible for any
> loss, delay or damage arising from their use.
> --------------------------------------------------------
>
> -----Original Message-----
>
>
> From: [email protected]
> [mailto:[email protected]
> ] On Behalf Of Boris Kraft
> Sent: lundi 5 janvier 2009 15:47
> To: Magnolia User-List
> Cc: [email protected]
> Subject: Re: [magnolia-user] magnolia module wish list
>
>
> If you check the wiki, the "Guest Book" is consistently the most
> requested module. It is the third most visited page on the wiki (after
> the home page and the list of modules), even though it is helplessly
> outdated. I am amazed about this myself.
>
> Note: I am not suggesting you should implement one.
>
> - Boris
>
>
> On Jan 3, 2009, at 11:45 PM, Ruben Reusser wrote:
>
>>
>> Happy New Year to everybody
>>
>> I thought I'd throw out a question to everbody for the New Year. We
>> are considering contributing a module or two to Magnolia in 2009 -
>> however, I'd like to make the module we write count (something that
>> people are really looking for). So it would be great if everybody
>> could respond with their module wish list for 2009 :-)
>>
>> hope to hear from you soon
>>
>> Ruben
>>
>> ----------------------------------------------------------------
>> For list details see
>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>> To unsubscribe, E-mail to: <[email protected]>
>> ----------------------------------------------------------------
>
> Kind Regards / Mit freundlichen Grüssen
> - Boris Kraft
>
> --------------------------------------
>
> Dipl. Inform. Boris Kraft
> CTO, Partner
>
> Magnolia International Ltd.
> Maiengasse 30
> CH-4056 Basel
>
> Phone +41 61 228 9000
> Fax +41 61 228 9001
>
> [email protected]
> http://www.magnolia-cms.com
>
> --------------------------------------
>
> Magnolia® - Simple Open-Source Content Management
>
> --------------------------------------
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------