← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21041: File store, centralizing default container name

 

------------------------------------------------------------
revno: 21041
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-11-12 17:02:05 +0100
message:
  File store, centralizing default container name
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java
  dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-11-11 08:57:16 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/fileresource/JCloudsFileResourceContentStore.java	2015-11-12 16:02:05 +0000
@@ -74,8 +74,6 @@
 
     private static final long FIVE_MINUTES_IN_SECONDS = Minutes.minutes( 5 ).toStandardDuration().getStandardSeconds();
 
-    private static final String DEFAULT_CONTAINER = "files";
-
     private BlobStore blobStore;
     private BlobStoreContext blobStoreContext;
     private String container;
@@ -129,10 +127,10 @@
             {
                 log.warn( "Container name '" + container + "' is illegal." +
                     "Standard domain name naming conventions apply (and underscores are not allowed). " +
-                    "Using default container name '" + DEFAULT_CONTAINER + "'." );
+                    "Using default container name '" + ConfigurationKey.FILE_STORE_CONTAINER.getDefaultValue() + "'." );
             }
 
-            container = DEFAULT_CONTAINER;
+            container = ConfigurationKey.FILE_STORE_CONTAINER.getDefaultValue();
         }
 
         Properties overrides = new Properties();

=== modified file 'dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java'
--- dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java	2015-11-11 09:16:22 +0000
+++ dhis-2/dhis-support/dhis-support-external/src/main/java/org/hisp/dhis/external/conf/ConfigurationKey.java	2015-11-12 16:02:05 +0000
@@ -46,7 +46,7 @@
     LDAP_SEARCH_BASE( "ldap.search.base", "" ),
     LDAP_SEARCH_FILTER( "ldap.search.filter", "(cn={0})" ),
     FILESTORE_PROVIDER( "filestore.provider", "filesystem" ),
-    FILE_STORE_CONTAINER( "filestore.container" ),
+    FILE_STORE_CONTAINER( "filestore.container", "files" ),
     FILE_STORE_LOCATION( "filestore.location" ),
     FILE_STORE_IDENTITY( "filestore.identity", "" ),
     FILE_STORE_SECRET( "filestore.secret", "" );