[Hippo-cms7-user BETA] Save document through Hippo Repository API

Ard Schrijvers a.schrijvers at onehippo.com
Thu Feb 5 10:07:25 CET 2009


 
> > 
> > I thought if you connect to the HippoRepository some 
> decorator is used 
> > to always return HippoNodes instead of a Node. AFAIK, you 
> will always 
> > get a HippoNode (apart from whether you should use it or not). Am I 
> > missing something?
> > 
> 
> VersionHistory and Version nodes (which are Nodes themselves) 
> are currently not HippoNode.  They could, probably better 
> also HippoNodes but any front-end should not depend on this.

Aaah thx, good to know!

Ard

> 
> \Berry
> > Ard
> > 
> > > 
> > > Cheers, Frank
> > > 
> > > > -----Original Message-----
> > > > From: hippo-cms7-user-bounces at lists.onehippo.com
> > > > [mailto:hippo-cms7-user-bounces at lists.onehippo.com] On
> > > Behalf Of Niels
> > > > van Kampenhout
> > > > Sent: 04 February 2009 19:46
> > > > To: Hippo CMS7 user list
> > > > Subject: Re: [Hippo-cms7-user BETA] Save document through Hippo 
> > > > Repository API
> > > > 
> > > > Niels van Kampenhout wrote:
> > > > > My first question is, how can I best find out the state of
> > > > a document? 
> > > > > The hippostd:state property already gives some info
> > > ("published" or
> > > > > "unpublished"), but I noticed that for a document that is
> > > scheduled
> > > > > for later publication, the state is also "unpublished" (and
> > > > there is a
> > > > > "hippo:request" object present next to the document
> > > node). I guess
> > > > > when a document is published, or scheduled for publication,
> > > > I should
> > > > > create a draft/unpublished copy using the workflow API, and
> > > > write my
> > > > > changes to that node. I managed to obtain the workflow of
> > > > the document
> > > > > using a code snippet from [1], but then I am stuck. What
> > > > can I do with
> > > > > a Workflow object?
> > > > 
> > > > I dug through the code and figured out I can cast the
> > > Workflow object
> > > > to a FullReviewedActionsWorkflow object, and then call
> > > > obtainEditableInstance() to create a variant with 
> hippostd:state 
> > > > "draft". This method however returns a Document object,
> > > which doesn't
> > > > seem to have a lot of useful methods. Instead I need the
> > > corresponding
> > > > HippoNode so I can access the child nodes and properties, and 
> > > > write the change.
> > > > After that I probably need to call commitEditableInstance()?
> > > > 
> > > > Thanks,
> > > > Niels
> > > > 
> > > > P.S. It would be a great help if source-jars and javadocs were 
> > > > published to the maven repository.
> > > > 
> > > > _______________________________________________
> > > > Hippo-cms7-user mailing list
> > > > Hippo-cms7-user at lists.hippo.nl
> > > > http://lists.hippo.nl/mailman/listinfo/hippo-cms7-user
> > > > 
> > >   
> > > 
> > > f.vanlankvelt at onehippo.com          www.onehippo.com
> > > Amsterdam Hippo B.V. Oosteinde 11   1017 WT   Amsterdam
> > > +31(0)20-5224466
> > > San Francisco Hippo USA Inc. 101 H Street, suite Q   Petaluma   CA
> > > 94952-5100   +1-877-41-HIPPO
> > > 
> > >   
> > > _______________________________________________
> > > Hippo-cms7-user mailing list
> > > Hippo-cms7-user at lists.hippo.nl
> > > http://lists.hippo.nl/mailman/listinfo/hippo-cms7-user
> > > 
> > _______________________________________________
> > Hippo-cms7-user mailing list
> > Hippo-cms7-user at lists.hippo.nl
> > http://lists.hippo.nl/mailman/listinfo/hippo-cms7-user
> 
> -- 
> Berry A.W. van Halderen       b.vanhalderen at onehippo.com / 
> berry at halderen.net
> Disclaimer: the above is the author's personal opinion and is 
> not the opinion or policy of his employer or of the little 
> green men that have been following him all day.
> _______________________________________________
> Hippo-cms7-user mailing list
> Hippo-cms7-user at lists.hippo.nl
> http://lists.hippo.nl/mailman/listinfo/hippo-cms7-user
> 



More information about the Hippo-cms7-user mailing list