package au.gov.dva;
// Include the following imports to use blob APIs.
import com.microsoft.azure.storage.*;
import com.microsoft.azure.storage.blob.*;


public class AppSettings {

    public static Environment getEnvironment() {
        // todo: load from config file by naming convention

        return Environment.devtest;
    }

    public static class AzureStorage {

        public static String accountName() {
            if (getEnvironment() == Environment.devtest)
                return "devstoreaccount1";
            // todo: prod settings
            return null;
        }

        public static String accountKey() {
            if (getEnvironment() == Environment.devtest)
                return "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==";
            return null;
            // todo: prod settings
        }

        public static String storageConnectionString() {

            if (getEnvironment() == Environment.devtest)
                return "UseDevelopmentStorage=true";
            else {
                return null;
                // todo: investigate RoleEnvironment in azure sdk
            }
            // todo: prod settings
        }


    }

    public static enum Environment {
        prod,
        devtest
    }
}






@@ -17,140 +17,8 @@
 va;%0A
-// Include the following imports to use blob APIs.%0Aimport com.microsoft.azure.storage.*;%0Aimport com.microsoft.azure.storage.blob.*;%0A
 %0A%0Apu
@@ -95,68 +95,8 @@
 () %7B
-%0A        // todo: load from config file by naming convention
 %0A%0A  
@@ -188,216 +188,161 @@
     
-public static String accountName() %7B%0A            if (getEnvironment() == Environment.devtest)%0A                return %22devstoreaccount1%22;%0A            // todo: prod settings%0A            return null;%0A        %7D%0A%0A
+// todo: get production values from environment variables%0A%0A        public static class DevTest %7B%0A            // For use with Azure storage emulator.%0A    
     
@@ -344,32 +344,38 @@
          public 
+final 
 static String ac
@@ -383,95 +383,86 @@
 ount
-Key() %7B%0A            if (getEnvironment() == Environment.devtest)%0A                return
+Name = %22devstoreaccount1%22;%0A            public final static String accountKey =
  %22Eb
@@ -566,409 +566,101 @@
     
-return null;%0A            // todo: prod settings%0A        %7D%0A%0A        public static String storageConnectionString() %7B%0A%0A            if (getEnvironment() == Environment.devtest)%0A                return %22UseDevelopmentStorage=true%22;%0A            else %7B%0A                return null;%0A                // todo: investigate RoleEnvironment in azure sdk%0A            %7D%0A            // todo: prod settings%0A        %7D%0A%0A
+public final static String storageConnectionString =  %22UseDevelopmentStorage=true%22;%0A        %7D
 %0A   

clean up app settings