[ 
http://jira.magnolia-cms.com/browse/MAGNOLIA-3022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=26361#action_26361
 ] 

Hudson CI server commented on MAGNOLIA-3022:
--------------------------------------------

Integrated in !http://hudson.magnolia-cms.com/nocacheImages/16x16/blue.gif! 
[magnolia_main-trunk 
#1296|http://hudson.magnolia-cms.com/job/magnolia_main-trunk/1296/]
     MAGNOLIA-3022, MAGNOLIA-3025:
- rename getNodeData(name, type) to newNodeDataInstance()
- return empty non-mutable node data for non-existing node datas
- getString() works for binaries
- getStream() works for all node datas


> content API cleanup: improve/align createNodeData(), getNodeData and 
> setNodeData(), respectively make them compliant to JCR
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MAGNOLIA-3022
>                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3022
>             Project: Magnolia
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Philipp Bärfuss
>            Assignee: Philipp Bärfuss
>             Fix For: 4.3
>
>
> The JCR specification does not support empty properties:
> - only the setProperty() method exists
> - setting a property to null removes it
> But the content API has both createNodeData() and setNodeData() methods but 
> since they use JCR properties they behave which I consider being wrong:
> - createNodeData(name) will not fail if a node data already exist
> - setNodeData(name) will not fail it the node data doesn't exist yet
> - getNodeData(name) will never fail but return an nodeData where isExists() 
> might return false
> - createNodeData(name, type) creates a property by setting an empty string 
> value (null would not create a property) no matter what type you specify
> So there are two solutions possible:
> A) differentiate the creation and setting
> - means throw exception if you are doing wrong
> B) drop the explicit creation (as in JCR)
> I am very much in favor of B) and would like to deprecate all 
> createNodeData() methods

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



----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to