Skip to content

Commit 9f39909

Browse files
authored
Merge pull request #122 from eharris369/114-updateEnabledState
Issue #114: Update the state of the application (open or closed)
2 parents b3d4edc + 7691383 commit 9f39909

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dev/com.ibm.microclimate.core/src/com/ibm/microclimate/core/internal/MicroclimateApplicationFactory.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ public static void updateApp(MicroclimateApplication mcApp, JSONObject appJso) {
143143
mcApp.setAction(null);
144144
}
145145

146+
// Set the app state
147+
if (appJso.has(MCConstants.KEY_OPEN_STATE)) {
148+
String state = appJso.getString(MCConstants.KEY_OPEN_STATE);
149+
mcApp.setEnabled(!MCConstants.VALUE_STATE_CLOSED.equals(state));
150+
}
151+
146152
// Set the app status
147153
if (appJso.has(MCConstants.KEY_APP_STATUS)) {
148154
String appStatus = appJso.getString(MCConstants.KEY_APP_STATUS);

0 commit comments

Comments
 (0)