[ 
https://issues.apache.org/jira/browse/GRFT-125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478902
 ] 

Christophe Lombart commented on GRFT-125:
-----------------------------------------

I just committed some changes : 

1/ add a new method in the persistence manager : getObjectByUuid(String uuid)
2/ In order to map a bean field into the node uuid, it is possible to add the 
following field-descriptor in any class-descriptor : 
<field-descriptor fieldName="myUuid" uudi="true" /> 
notes : path is still mandatory in each class descriptor, otherwise we have to 
review the PersistenceManager API (add in almost all public methods a new arg : 
String path). the uuid field is optional.
3/ the uuid can be defined in an ancestor class.

> Add UUID support
> ----------------
>
>                 Key: GRFT-125
>                 URL: https://issues.apache.org/jira/browse/GRFT-125
>             Project: Graffito
>          Issue Type: Sub-task
>            Reporter: Christophe Lombart
>         Assigned To: Christophe Lombart
>             Fix For: 1.0-a1-dev
>
>
> Until now, only the path was used to retrieve content and makes references. 
> Of course, in some situation UUID becomes more important. Furthermore 
> supporting uuid is mandatory if we want to support "reference" jcr type. 
> Here is a proposal to support UUID : 
> 1/ Modify the PersistenceManager API : 
>       * add method getObject(String uuid)
>       * Is it necessary to overload methods used to manage versions and locks 
> ? 
> 2/ Review the mapping descriptor in order to map a pojo attribute into the 
> node UUID (readonly) : 
>       <field-descriptor fieldName="myUuid" uudi="true" />
>       From now, it is possible to specify the path attribute and/or the uuid 
> attribute in the java classes. Both fields are optional. 
>      So, we have to review the classes PersistenceManagerImpl and 
> ObjectConverterImpl which depend strongly on the path attribute.
> 3/ Specify in a class-descriptor the jcr type "mix:referenceable ". This can 
> be done with one of the following way : 
>        a. In the class descriptor definition : 
>                 <class-descriptor  className="...." jcrNodeType="..." 
> jcrMixinTypes="mix:referencable" >
>        b. or in the primary node type definition associated to the java class
> 4/ It should possible to defined the uuid field in an ancestor class 
> descrptor (similar to the path field descriptor)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to