Author: spagop
Date: 2008-12-05 18:52:47 -0500 (Fri, 05 Dec 2008)
New Revision: 662
Modified:
trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
Log:
a small impl. for the read all children and read all properties request processing
Modified:
trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java
===================================================================
---
trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java 2008-12-05
18:26:07 UTC (rev 661)
+++
trunk/extensions/dna-connector-svn/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java 2008-12-05
23:52:47 UTC (rev 662)
@@ -33,6 +33,7 @@
import org.jboss.dna.graph.JcrNtLexicon;
import org.jboss.dna.graph.Location;
import org.jboss.dna.graph.connectors.RepositorySourceException;
+import org.jboss.dna.graph.properties.Binary;
import org.jboss.dna.graph.properties.DateTimeFactory;
import org.jboss.dna.graph.properties.Name;
import org.jboss.dna.graph.properties.NameFactory;
@@ -41,7 +42,9 @@
import org.jboss.dna.graph.properties.PathNotFoundException;
import org.jboss.dna.graph.properties.Property;
import org.jboss.dna.graph.properties.PropertyFactory;
+import org.jboss.dna.graph.properties.ValueFactory;
import org.jboss.dna.graph.properties.basic.BasicMultiValueProperty;
+import org.jboss.dna.graph.properties.basic.InMemoryBinary;
import org.jboss.dna.graph.requests.CopyBranchRequest;
import org.jboss.dna.graph.requests.CreateNodeRequest;
import org.jboss.dna.graph.requests.DeleteBranchRequest;
@@ -227,11 +230,14 @@
SVNDirEntry entry =
getEntryInfo(parent.getString(getExecutionContext().getNamespaceRegistry()));
Date lastModified = entry.getDate();
if (lastModified != null) {
- Property jcrLastModifiedProperty =
propertyFactory().create(JcrLexicon.LAST_MODIFIED, dateFactory().create(lastModified));
+ Property jcrLastModifiedProperty =
propertyFactory().create(JcrLexicon.LAST_MODIFIED,
+
dateFactory().create(lastModified));
properties.add(jcrLastModifiedProperty);
}
if (os.toByteArray().length > 0) {
- Property jcrDataProperty = propertyFactory().create(JcrLexicon.DATA,
os.toByteArray());
+ Property jcrDataProperty = propertyFactory().create(JcrLexicon.DATA,
+
binaryFactory().create(new InMemoryBinary(
+
os.toByteArray())));
properties.add(jcrDataProperty);
}
request.addProperties(properties.toArray(new
BasicMultiValueProperty[0]));
@@ -305,6 +311,11 @@
}
}
+ /**
+ * Factory for sample name.
+ *
+ * @return the name factory
+ */
protected NameFactory nameFactory() {
return getExecutionContext().getValueFactories().getNameFactory();
}
@@ -321,6 +332,10 @@
return getExecutionContext().getValueFactories().getDateFactory();
}
+ protected ValueFactory<Binary> binaryFactory() {
+ return getExecutionContext().getValueFactories().getBinaryFactory();
+ }
+
protected Path getPathFor( Location location,
Request request ) {
Path path = location.getPath();
Show replies by date