usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [16/39] usergrid git commit: remove system properities
Date Wed, 14 Oct 2015 16:54:12 GMT
remove system properities


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/cd623e60
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/cd623e60
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/cd623e60

Branch: refs/heads/usergrid-1007-shiro-cache
Commit: cd623e60d1257bdd132f43f9b6ea1834172e3f81
Parents: 5233567
Author: Shawn Feldman <shawn.feldman@gmail.com>
Authored: Fri Sep 25 13:47:02 2015 -0600
Committer: Shawn Feldman <shawn.feldman@gmail.com>
Committed: Fri Sep 25 13:47:02 2015 -0600

----------------------------------------------------------------------
 .../services/assets/data/AwsSdkS3BinaryStore.java        | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/cd623e60/stack/services/src/main/java/org/apache/usergrid/services/assets/data/AwsSdkS3BinaryStore.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/assets/data/AwsSdkS3BinaryStore.java
b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/AwsSdkS3BinaryStore.java
index a0fd361..688e7bf 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/assets/data/AwsSdkS3BinaryStore.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/AwsSdkS3BinaryStore.java
@@ -93,9 +93,6 @@ public class  AwsSdkS3BinaryStore implements BinaryStore {
     @Autowired
     private EntityManagerFactory emf;
 
-    @Autowired
-    private Properties properties;
-
     public AwsSdkS3BinaryStore( ) {
     }
 
@@ -103,20 +100,20 @@ public class  AwsSdkS3BinaryStore implements BinaryStore {
     //ideally it should only do one. and the client should be initlized at the beginning
of the run.
     private AmazonS3 getS3Client() throws Exception{
 
-            this.accessId = properties.getProperty( SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR
);
+            this.accessId = System.getProperty( SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR
);
             if(accessId == null){
                 logger.error( SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR + " not properly
set so amazon access key is null" );
                 throw new AwsPropertiesNotFoundException( SDKGlobalConfiguration.ACCESS_KEY_ENV_VAR
);
 
             }
-            this.secretKey = properties.getProperty( SDKGlobalConfiguration.SECRET_KEY_ENV_VAR
);
+            this.secretKey = System.getProperty( SDKGlobalConfiguration.SECRET_KEY_ENV_VAR
);
 
             if(secretKey == null){
                 logger.error( SDKGlobalConfiguration.SECRET_KEY_ENV_VAR + " not properly
set so amazon secret key is null" );
                 throw new AwsPropertiesNotFoundException( SDKGlobalConfiguration.SECRET_KEY_ENV_VAR
);
 
             }
-            this.bucketName = properties.getProperty( "usergrid.binary.bucketname" );
+            this.bucketName = System.getProperty( "usergrid.binary.bucketname" );
             if(bucketName == null){
                 logger.error( "usergrid.binary.bucketname  not properly set so amazon bucket
is null" );
                 throw new AwsPropertiesNotFoundException( "usergrid.binary.bucketname" );
@@ -189,7 +186,7 @@ public class  AwsSdkS3BinaryStore implements BinaryStore {
 
             // determine max size file allowed, default to 50mb
             long maxSizeBytes = 50 * FileUtils.ONE_MB;
-            String maxSizeMbString = properties.getProperty( "usergrid.binary.max-size-mb",
"50" );
+            String maxSizeMbString = System.getProperty( "usergrid.binary.max-size-mb", "50"
);
             if ( StringUtils.isNumeric( maxSizeMbString )) {
                 maxSizeBytes = Long.parseLong( maxSizeMbString ) * FileUtils.ONE_MB;
             }


Mime
View raw message