Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1513 Add support for federating data from external systems
  3. MODE-1732

Binary values from a connector get lost unless the connector writes them to the repository's binary store



      When a connector creates a document for a node that contains a property with a binary value, the Binary is written out to the Document as something like the following nested document.

      { "sha1" : "abcdef...", "length" : 1024 }

      After this is returned by the FederatedDocumentStore, the DocumentTranslator is then used to convert this node representation to the Property objects and associated values. The DocumentTranslator.valueFromDocument(...) method attempts to look up the Binary value using the BinaryFactory and ultimately the BinaryStore, which will not find it – unless the connector wrote the binary value to the store using the same factory (which is not ideal).

      Therefore, we need a way for the DocumentTranslator.valueFromDocument(...) method to know that this is an external value so that the BinaryValue implementation can go back to the Connector instance to obtain the streamed content. (We don't want to go through the SchematicEntry mechanism, since that currently requires the entire binary value to be in memory as an array of bytes within the entry's Document.)

        Gliffy Diagrams


            Issue Links



                • Assignee:
                  hchiorean Horia Chiorean
                  rhauch Randall Hauch
                • Votes:
                  0 Vote for this issue
                  2 Start watching this issue


                  • Created: