[
https://jira.jboss.org/jira/browse/DNA-266?page=com.atlassian.jira.plugin...
]
Randall Hauch commented on DNA-266:
-----------------------------------
Added an easy way to set references to nodes as property values. Any Node or Location
passed as a property value will automatically be converted to a Reference property value
pointing to the UUID of the Node (or Location). Also added additional "to"
methods (for setting property values) that take a Node and Location, making it more
obvious what values are allowed.
Also changed the SetValuesTo interface so that it's possible to specify the
"on" before the values. For example:
graph.set("propName").to("value").on("/node1");
graph.set("propName").on("/node1").to("value");
The first example was what was original required, but the bottom one also works now.
Notice that the 3rd method called in each of these ("on" in the first,
"to" in the second example) returns an interface that completes the set
operation. In other words, the following results in a compile error:
graph.set("propName").to("value").on("/node1").to("value2");
This is great, since it is the desired behavior.
Improve usability of graph API with additional methods
------------------------------------------------------
Key: DNA-266
URL:
https://jira.jboss.org/jira/browse/DNA-266
Project: DNA
Issue Type: Feature Request
Components: API, Graph
Affects Versions: 0.3
Reporter: Randall Hauch
Assignee: Randall Hauch
Priority: Minor
Fix For: 0.4
Provide an easy way to set references to nodes as property values. Currently, one has to
get the node, obtain a reference value factory, create the reference, then set the
property using that value. It's pretty impossible to make a single chained call that
does all this.
Also, provide additional flexibility when setting properties. Currently, the only way to
set a property is to do the following:
graph.set("propName").to("value").on("/node1");
but it would also be nice to reverse the "on" and "to" methods, such
as:
graph.set("propName").on("/node1").to("value");
--
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