]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
CSPACE-7080: Updated Nuxeo repository config for blobs/binaries.
authorremillet <remillet@yahoo.com>
Fri, 24 Feb 2017 04:45:05 +0000 (20:45 -0800)
committerremillet <remillet@yahoo.com>
Fri, 24 Feb 2017 04:45:05 +0000 (20:45 -0800)
3rdparty/nuxeo/nuxeo-server/7.10-HF17/config/proto-repo-config.xml
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java
services/config/src/main/java/org/collectionspace/services/common/config/ConfigUtils.java

index 3d8ea3ad46994d7f09aa4f2a7c0a6f3b4fa3b1e3..6dd85c1c0ee42a5ae5b9da70858699ec7131fd93 100644 (file)
@@ -30,7 +30,6 @@
         <repository name="default" factory="org.nuxeo.ecm.core.storage.sql.ra.PoolingRepositoryFactory">
                        <pool minPoolSize="0" maxPoolSize="20" blockingTimeoutMillis="100" idleTimeoutMinutes="10"/>
                        <clustering enabled="false" delay="1000"/>                
-                       <binaryStore path=""/> <!-- Default value will be repository/database name.  Can be partial or full system path.  Partial path is relative to Nuxeo's data dir -->
                        <xa-datasource>@XA_DATASOURCE@</xa-datasource> <!-- The transactional datasource for Nuxeo -->
                        <noDDL>false</noDDL>
                        <sqlInitFile>vcsconfig.sql.txt</sqlInitFile> <!-- see https://doc.nuxeo.com/display/ADMINDOC/VCS+Configuration#VCSConfiguration-DatabaseCreationOption -->              
index 4ae59463f76f2a8f5623aaace4d1bfdeecaa35af..9821be5f718766c4d340384d31082e1afa5fe4e2 100644 (file)
@@ -1091,18 +1091,22 @@ public class ServiceMain {
         repoConfigDoc = XmlTools.setAttributeValue(repoConfigDoc, "/component", "name",
                 String.format("config:%s-repository", repositoryName));
         
-        // Text substitutions within first extension point, "repository"
         repoConfigDoc = XmlTools.setAttributeValue(repoConfigDoc,
-                       ConfigUtils.REPOSITORY_EXTENSION_POINT_XPATH + "/repository", "name",
+                       ConfigUtils.CONFIGURATION_EXTENSION_POINT_XPATH + "/blobprovider", "name",
                 repositoryName);
         
+        repoConfigDoc = XmlTools.setElementValue(repoConfigDoc,
+                       ConfigUtils.CONFIGURATION_EXTENSION_POINT_XPATH + "/blobprovider/property[@name='path']",
+                               Tools.isBlank(binaryStorePath) ? repositoryName : binaryStorePath);
+        
+        // Text substitutions within first extension point, "repository"
         repoConfigDoc = XmlTools.setAttributeValue(repoConfigDoc,
                        ConfigUtils.REPOSITORY_EXTENSION_POINT_XPATH + "/repository", "name",
                 repositoryName);
         
-        repoConfigDoc = XmlTools.setAttributeValue(repoConfigDoc,
-                       ConfigUtils.REPOSITORY_EXTENSION_POINT_XPATH + "/repository/binaryStore", "path",
-                Tools.isBlank(binaryStorePath) ? repositoryName : binaryStorePath);  // Can be either partial or full path.  Partial path will be relative to Nuxeo's data directory
+//        repoConfigDoc = XmlTools.setAttributeValue(repoConfigDoc,
+//                     ConfigUtils.REPOSITORY_EXTENSION_POINT_XPATH + "/repository/binaryStore", "path",
+//                Tools.isBlank(binaryStorePath) ? repositoryName : binaryStorePath);  // Can be either partial or full path.  Partial path will be relative to Nuxeo's data directory
 
         /* Create the JDBC url options if any exist */
         String jdbcOptions = XmlTools.getElementValue(repoConfigDoc,
index 4d11001e8d909df7fe1d3bdd0439eebf9d54061c..e218d69f3e234ec2a0384e1902de016b99958d96 100644 (file)
@@ -15,6 +15,7 @@ public class ConfigUtils {
     public static final String COMPONENT_EXTENSION_XPATH = "/component" + EXTENSION_XPATH;
     public static final String DATASOURCE_EXTENSION_POINT_XPATH = String.format(COMPONENT_EXTENSION_XPATH, "datasources");
     public static final String REPOSITORY_EXTENSION_POINT_XPATH = String.format(COMPONENT_EXTENSION_XPATH, "repository");
+    public static final String CONFIGURATION_EXTENSION_POINT_XPATH = String.format(COMPONENT_EXTENSION_XPATH, "configuration");
     public static final String ELASTICSEARCH_INDEX_EXTENSION_XPATH = String.format(EXTENSION_XPATH, "elasticSearchIndex");
     public static final String ELASTICSEARCH_EXTENSIONS_EXPANDER_STR = "%elasticSearchIndex_extensions%";