Products.Relations
HomePage: http://svn.plone.org/svn/archetypes/Products.Relations
Author: Daniel Nouri
Download: https://pypi.python.org/packages/source/P/Products.Relations/Products.Relations-0.9b1.zip
Relations Readme Overview Relations allows for the definition of sets of rules for validation, creation and lifetime of Archetypes references. Contained in each ruleset are components that make for the actual rules logic. Rulesets may be created and edited through the web (TTW). Components implementing custom behaviour are easily added. Installation In Plone, click "Add/Remove Products" in the Plone Setup. Then select Relations from the list of available products and click "Install". Now click "Relations Library" in the Plone Setup portlet on the left to visit the TTW configuration user interface. Usage As an example, add a ruleset by clicking "Add Ruleset" in the library. Now choose a reasonable identification. Notice that identifications are required to be unique among rulesets in your portal. Note: When you create a reference through a ruleset, the relationship attribute of the reference is set to be the ruleset's id. There's nothing that is different about how you use the Archetypes Reference API when querying for referenced objects. (However, references are created and deleted differently; namely through function 'processor.process'.) The ruleset's title is what is presented to the user in Plone. Let's choose "Is Child Of" as the title of our ruleset, and "isChildOf" as the identification. After saving changes, click "Add New Item" and add a cardinality constraint. Enter "Exactly Two" as the title and choose "2" for both the minimum and the maximum number of targets. At this point we still need another component so we can actually make use of the "Is Child Of" ruleset. Add a "Portal Type Constraint" and choose "Unrestricted" as its title. Click the "Save" button and then the "Relations" tab that just appeared. The form says "Edit Relations for Unrestricted", meaning that we can from here add and remove "Is Child Of" references from our Portal Type Constraint "Unrestricted" to any referenceable portal object. Through our "Exactly Two" constraint we assert that we have exactly two "parents". Requirements Archetypes >= 1.4.0 Python 2.4 See also Additional documentation is in the product's doc/ directory on the filesystem. Credits This code was created for the ZUCCARO project. ZUCCARO is a database framework for the Humanities developed by the Bibliotheca Hertziana, Max-Planck Institute for Art History. For further information, please visit http://zuccaro.biblhertz.it/ 2010-10-11 Max Burgess (netropic at u dot washington dot edu) Removed test for unsupported Relations action tab. 2010-10-11 Eric Steele (ericsteele at psu dot edu) Add Plone 4.x compatibility. Product should now work in both 3.x and 4.x 2008-09-10 Cris Ewing (cewing at u dot washington dot edu) Fixed a bug in the finalizeOnConnect() method of components.contentreference.ContentReferenceFinalizer.finalizeOnConnect that left Shared Objects (association classes) cataloged by portal_catalog. This caused attribute errors to be thrown by methods called in Plone's sharing UI. (See https://weblion.psu.edu/trac/weblion/ticket/531 for a detailed discussion) Tagged 0.8.1 bugfix release, posted egg to cheeseshop. 2008-05-28 Alex Clark (aclark at aclark dot net) Egg-i-fy. 2007-06-25 Jens Klein (jens at bluedynamics dot com) we added events to relations on each connect and disconnect. within this implementation some cleanup were done. the events are used for exampe by RelationsIndex, but you can subscribe to them also to fulfill task need to be done on connect or disconnect. 2007-02-25 Philipp Auersperg (phil at bluedynamics.com) allowedTypesByInterface now also supports zope3 interfaces 2006-03-30 Daniel Nouri <daniel (dot) nouri at gmail (dot) com> utils.py (adddeleteVocab): I put the ``adddelete_vocab`` script onto the filesystem while adding a che