-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
report helpful error message for missing sensitive properties file (#…
…1134) * format code * code fix: display helpful message for missing atlas config properties files * handle if there is exception while closing the inputstream * Revert "handle if there is exception while closing the inputstream" This reverts commit a00109f. * handle if there is exception while closing the inputstream * log the error message for missing atlas properties files * handle file not found exception for config command * Allow config command to create missing sensitive.properties file * refactor code * update the log message * fix typo --------- Co-authored-by: Jagdish Kunwar <[email protected]>
- Loading branch information
Showing
5 changed files
with
141 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/CommandScanario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ca.carleton.gcrc.couch.command; | ||
|
||
/** | ||
* This class is being used to set/get the nunaliit command being executed globally. | ||
* Commands scanario can be one of: update, run or config. | ||
* | ||
* This class is used in the following files: | ||
* - Main.java | ||
* - AtlasProperties.java | ||
*/ | ||
public class CommandScanario { | ||
|
||
private static CommandScanario instance; | ||
|
||
public static final String CONFIG_COMMAND = "config"; | ||
public static final String UPDATE_COMMAND = "update"; | ||
public static final String RUN_COMMAND = "run"; | ||
|
||
private String command = ""; | ||
|
||
public static CommandScanario getInstance() { | ||
if (instance == null) { | ||
instance = new CommandScanario(); | ||
} | ||
|
||
return instance; | ||
} | ||
|
||
public String getCommand() { | ||
return this.command; | ||
} | ||
|
||
public void setCommand(String command) { | ||
this.command = command; | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
nunaliit2-couch-command/src/main/java/ca/carleton/gcrc/couch/command/CommandScenario.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package ca.carleton.gcrc.couch.command; | ||
|
||
/** | ||
* This class is being used to set/get the nunaliit command being executed globally. | ||
* Commands scenario can be one of: update, run or config. | ||
* | ||
* This class is used in the following files: | ||
* - Main.java | ||
* - AtlasProperties.java | ||
*/ | ||
public class CommandScenario { | ||
|
||
private static CommandScenario instance; | ||
|
||
public static final String CONFIG_COMMAND = "config"; | ||
public static final String UPDATE_COMMAND = "update"; | ||
public static final String RUN_COMMAND = "run"; | ||
|
||
private String command = ""; | ||
|
||
public static CommandScenario getInstance() { | ||
if (instance == null) { | ||
instance = new CommandScenario(); | ||
} | ||
|
||
return instance; | ||
} | ||
|
||
public String getCommand() { | ||
return this.command; | ||
} | ||
|
||
public void setCommand(String command) { | ||
this.command = command; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
nunaliit2-couch-sdk/src/main/templates/config/sensitive.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
couchdb.admin.password= | ||
google.mapapi.key= | ||
server.key= |