[JBoss JIRA] Created: (DNA-260) Add factory method to create a Binary instance from a (local) File
by Randall Hauch (JIRA)
Add factory method to create a Binary instance from a (local) File
------------------------------------------------------------------
Key: DNA-260
URL: https://jira.jboss.org/jira/browse/DNA-260
Project: DNA
Issue Type: Feature Request
Components: API, Graph
Affects Versions: 0.3
Reporter: Randall Hauch
Priority: Minor
Fix For: 0.4
A client sometimes has a file and wants to represent the content of the file with a Binary value object. Currently, the client would have to obtain an InputStream or a Reader to the file, and create the Binary value object with that. Then, when somebody wants to read the binary value, they have to create another stream/reader. Essentially, the content is streamed 1+n times, where n is the number of times the value is read. This can be very expensive when the size of the file is large (or very large, as in gigabytes).
By adding a factor method that takes a File object, the factory could optimize the behavior. Rather than creating a stream/reader to put the content into the Binary value object, the factory could just create a Binary implementation that delegates to a File. Then, the only time a stream/reader is created is when the client wants to read the value. In other words, the content is streamed only n times.
We don't yet have a BinaryFactory interface, and are currently using ValueFactory<Binary>. Therefore, the first step is to create the BinaryFactory interface and use this in the ValueFactories interface. (Most uses of the 'getBinaryFactory()' method would not need to change, since they're either just immediately calling 'create(...)' on the returned reference, or are using ValueFactory<Binary>, which would still work.
--
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
15 years, 3 months
[JBoss JIRA] Created: (DNA-267) Change copyright year to 2009
by Randall Hauch (JIRA)
Change copyright year to 2009
-----------------------------
Key: DNA-267
URL: https://jira.jboss.org/jira/browse/DNA-267
Project: DNA
Issue Type: Task
Components: API, Common, Connectors, Development Environment, Documentation, Examples, Federation, Graph, JCR, Maven Classloader, Sequencers, Testing
Affects Versions: 0.3
Reporter: Randall Hauch
Assignee: Randall Hauch
Priority: Trivial
Fix For: 0.4
We need to change the copyright year to 2009. We may want to consider updating the source headers while we're at it, to remove the copyright (similar to the latest style for JBoss projects).
--
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
15 years, 3 months
[JBoss JIRA] Updated: (DNA-48) Development and testing kit for federation connectors
by Randall Hauch (JIRA)
[ https://jira.jboss.org/jira/browse/DNA-48?page=com.atlassian.jira.plugin.... ]
Randall Hauch updated DNA-48:
-----------------------------
Description: Developing federation connectors will require some documentation and test harnesses that simplifies the task of creating and testing connectors. This should include unit tests that verify the connectors' behavior matches that expected by DNA, and that can be used to check for regression. Ideally this would also include a way to execute performance tests. (was: Developing federation connectors will require some documentation and test harnesses that simplifies the task of creating and testing connectors. This should include unit- and integration-level tests, and ways of running these tests as regression tests. Ideally this would also include a way to execute performance tests.)
Changed the scope. Will be putting the performance tests under another issue.
> Development and testing kit for federation connectors
> -----------------------------------------------------
>
> Key: DNA-48
> URL: https://jira.jboss.org/jira/browse/DNA-48
> Project: DNA
> Issue Type: Feature Request
> Components: Connectors, Federation, Testing
> Reporter: Randall Hauch
> Assignee: Randall Hauch
> Priority: Minor
> Fix For: 0.5
>
>
> Developing federation connectors will require some documentation and test harnesses that simplifies the task of creating and testing connectors. This should include unit tests that verify the connectors' behavior matches that expected by DNA, and that can be used to check for regression. Ideally this would also include a way to execute performance tests.
--
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
15 years, 3 months
[JBoss JIRA] Commented: (DNA-48) Development and testing kit for federation connectors
by Randall Hauch (JIRA)
[ https://jira.jboss.org/jira/browse/DNA-48?page=com.atlassian.jira.plugin.... ]
Randall Hauch commented on DNA-48:
----------------------------------
Added an initial set of JUnit test case classes under "org.jboss.dna.graph.connectors.test" (in the test source) that provide a foundation for writing simple unit test classes for a connector, since almost all of the test logic can be inherited. Right now the tests include the WritableConnectorTest and ReadableConnectorTest abstract classes. To use these to test a particular connector, the connector developer would create subclass these abstract classes, implementing the two abstract methods (one sets up the RepositorySource instance, and the other initializes the repository content to prepare for the tests). All test methods are inherited from the abstract classes, so with minimal effort a connector developer can easily provide a series of (standard) benchmark functionality tests to ensure the connector is behaving correctly.
It is likely that the connector developer will want to create additional tests. There is a common abstract base class for the WritableConnectorTest and ReadableConnectorTest classes, and this common base class performs all the set up and initialization of the repository source. So by extending this class, a custom connector test case class can test the repository using any methods.
As part of this effort, I also added "package-info.java" files for each package in the "org.jboss.dna.graph" project. These package-level JavaDocs should help developers understand how to use the JBoss DNA Graph API. including how to write and test a custom connector.
Finally, I changed the test cases in the JPA connector to use this test harness.
> Development and testing kit for federation connectors
> -----------------------------------------------------
>
> Key: DNA-48
> URL: https://jira.jboss.org/jira/browse/DNA-48
> Project: DNA
> Issue Type: Feature Request
> Components: Connectors, Federation, Testing
> Reporter: Randall Hauch
> Assignee: Randall Hauch
> Priority: Minor
> Fix For: 0.5
>
>
> Developing federation connectors will require some documentation and test harnesses that simplifies the task of creating and testing connectors. This should include unit- and integration-level tests, and ways of running these tests as regression tests. Ideally this would also include a way to execute performance tests.
--
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
15 years, 3 months