[
http://jira.jboss.com/jira/browse/DNA-77?page=comments#action_12414448 ]
Randall Hauch commented on DNA-77:
----------------------------------
Added two methods to the SequencerOutput interface:
ValueFactories getFactories();
void setProperty(Path nodePath, Name propertyName, Object... values);
The first is a method to obtain the org.jboss.dna.spi.graph.ValueFactories instance that
can be used to create paths, names, and other value objects (like binary objects,
date-time instants, strings, doubles, etc.). The second method added sets the property
values using a Path object for the node path, and a Name object for the property name.
The Path, Name, DateTime, Reference, Binary, ValueFactory, and ValueFactories interfaces
are all part of the SPI, and will be used by the federation engine, connectors, and (now)
sequencers. The existing SequencerOutput methods (that take string paths and names)
simply create the Path and Name objects and then delegate to the new method.
Note that no methods have been added with the various kinds of primitive value types, as
was the request. The reason is that the sequencers should be using the value factories to
create their values, and they can simply pass whatever values were created by the value
factories. Note that these value factories are very efficient as creating Java primitive
types, such as doubles, longs, etc. Sequencer implementations should definitely use them,
as there are some cases where these apparently simple operations do some encoding/decoding
as well as format checking.
SequencerOutput setProperty and setReference method signatures need
to be changed
---------------------------------------------------------------------------------
Key: DNA-77
URL:
http://jira.jboss.com/jira/browse/DNA-77
Project: DNA
Issue Type: Bug
Components: Sequencers
Affects Versions: 0.1
Reporter: Johnny Verhaeg
Assigned To: Randall Hauch
Fix For: 0.2
Original Estimate: 0 minutes
Remaining Estimate: 0 minutes
Both methods' first parameter should be a Path. The setProperty method should have
one method for each JSR-283 primitive type, with the last parameter being of that type,
and the setReference method's last parameter should be Path..., as follows:
setProperty(Path nodePath, String property, Path path)
setProperty(Path nodePath, String property, Boolean value)
setProperty(Path nodePath, String property, String value)
etc.
setReference(Path nodePath, String property, Path... paths)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira