Re: Re: CPSRelation/CPSComment abstraction branches

Anahide Tchertchian <[email protected]>
Newsgroups gmane.comp.web.zope.cps.devel
Message-ID <[email protected]>
Hi,

> * upgrading CPSRelation results in broken (IOBTree, at least) graphs

Yes, sorry for that but the new products define completely new objects 
with a new api, CPSRelation has been completely refactored so no 
compatibility was kept.

> * Is there a conversion guide available?

Unfortunately no. CPSComment was the only product actually using 
CPSRelation, and it has never been packaged in a CPS release so we 
assumed that nobody would want to change the products *and* keep 
existing data.
It should be quite easy to export the Btrees content using the old 
products, then replace by the new products, and then reimport data.
Please tell if you need guidance to do so, I would be glad if you could 
make this contribution.

> * RelationTool methods generally need the ManagePortal permission. E g., 
> AFAIK,
> 
>     relids = rtool.getRelationsFor(GRAPH_ID, docid, relation)
> 
> is now:
> 
>     graph = rtool.getGraph(GRAPH_ID)
>     relids = graph.getSubjects(relation, docid)
> 
> But while getRelationsFor only needed the View permission, getGraph 
> needs ManagePortal

Yes, tool methods are no longer available, because it looked like an 
unnecessary api duplication. If you really need access to the graph in 
restricted code, I suggest you write the appropriate util methods to do so.

Are you using CPSRelation for a custom need? If so, I would be pleased 
if you could explain your use case, see if the product addresses your 
needs correctly.
I think the abstraction that is now available makes it a lot easier to 
handle relations in CPS, I hope you will agree.

Regards,

-- 
Anahide Tchertchian, Nuxeo
Mail: [email protected] - Tel: +33 (0)1 40 33 71 60
http://www.nuxeo.com - http://www.cps-project.org
_______________________________________________
cps-devel mailing list
http://lists.nuxeo.com/mailman/listinfo/cps-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.