[dna-issues] [JBoss JIRA] Commented: (DNA-341) Graph API behavior when removing all property values doesn't reflect that of JCR
Randall Hauch (JIRA)
jira-events at lists.jboss.org
Thu Apr 2 17:50:22 EDT 2009
[ https://jira.jboss.org/jira/browse/DNA-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12460371#action_12460371 ]
Randall Hauch commented on DNA-341:
-----------------------------------
The Graph API currently has a RemovePropertiesRequest that takes a set of property names to be removed. (This could be optimized to have another RemovePropertyRequest that would be optionally supported, with a default implementation in the RequestProcessor that would use RemovePropertiesRequest.) However, it is also possible to use UpdatePropertiesRequest, and the expected behavior is currently to remove any property with no values.
This latter behavior could be changed to make UpdatePropertiesRequest purely update (no remove), and require the use of RemovePropertiesRequest for any remove operations. I'm not sure what the impact of this would be in terms of existing connectors or components that use the Graph interface.
Another option would be to continue to allow UpdatePropertiesRequest to define removal operations, but to distinguish between setting a property to have no values versus removing the property. The former could be accomplished by using an empty array, while the latter could be defined by a null array reference.
Either way, there is likely to be an impact on existing connectors, components that directly use the requests (e.g., the Graph API implementation), and maybe even higher-level components. Fortunately, there have already been significant changes to the request and connector framework within this release, so the impact to JBoss DNA users is not much different than is current for 0.4.
> Graph API behavior when removing all property values doesn't reflect that of JCR
> --------------------------------------------------------------------------------
>
> Key: DNA-341
> URL: https://jira.jboss.org/jira/browse/DNA-341
> Project: DNA
> Issue Type: Bug
> Components: API, Graph, JCR
> Affects Versions: 0.3
> Reporter: Randall Hauch
> Assignee: Randall Hauch
> Priority: Critical
> Fix For: 0.4
>
>
> Section 4.7.3 of the JSR-170 specification (version 1.0.1) states:
> Every property must have a value. The range of property states does not include having a "null value", or "no value". Setting a
> property to "null" is equivalent to removing that property. In the case of multi-value properties, the setting of a particular value
> within the array to null results in the removal of that value and the compacting of the array. As a result it is possible to have a multi-
> value property with no values (an empty array). See 7.1.5 Adding and Writing Properties.
> However, currently the Graph API and connector behavior is such that whenever a property is updated (or set) to no values, the property is removed automatically. This means that it is not possible for the Graph API or connectors to support a multi-valued JCR property with no values.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the dna-issues
mailing list