Implement a document adapter to handle relations between documents
------------------------------------------------------------------

                 Key: NXP-3849
                 URL: http://jira.nuxeo.org/browse/NXP-3849
             Project: Nuxeo Enterprise Platform
          Issue Type: Improvement
            Reporter: Alain Escaffre
            Assignee: Thierry Delprat


When just dealing with relations between documents, it would be useful to have 
a off-the-shell api to create and read those relations, comparing to what 
RelationManager proposes currently. We could have a document adapter that 
behaves something like : 


DocumentModel myDoc
//instanciation of myDoc
....

// get the relation adapter
Document2DocumentRelationsAdaptater   myBetterDoc = 
myDoc.getAdapter(Document2DocumentRelationsAdaptater.class);

//for reading :
DocumentList outgoing = myBetterDoc.getOutgoingDocuments('predicatName", ...)
DocumentList incoming = myBetterDoc.getIncomingDocuments('predicatName", ...)



//to create relations between documents :
myDoc.createRelation("predicatName",targetDocumentModel,comment);

I would also be sure it is is usable to create relations between checkout 
documents or checkin versions, but It seems to me it just depends on what myDoc 
and targetDocumentModel represents.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to