Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
feat(feedback): send status for task id on password minimum upper case
Browse files Browse the repository at this point in the history
Signed-off-by: Rafa Hernandez <rhernandez@teclib.com>
  • Loading branch information
rafaelje authored and ajsb85 committed Mar 26, 2018
1 parent cee3fae commit ac79598
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
Expand Up @@ -533,11 +533,8 @@ public void messageArrived(String topic, MqttMessage message) throws Exception {
int minimum = jsonObj.getInt(PASSWORD_MIN_UPPERCASE);
String taskId = jsonObj.getString("taskId");

// return the status of the task
policiesController.sendTaskStatus(taskId, FEEDBACK_RECEIVED);

// execute the policy
policiesController.passwordMinUpperCase(minimum);
policiesController.passwordMinUpperCase(taskId, minimum);
}
} catch (Exception ex) {
FlyveLog.e(ex.getMessage());
Expand Down
Expand Up @@ -616,10 +616,20 @@ public void passwordMinLowerCase(String taskId, int minimum) {
}
}

public void passwordMinUpperCase(int minimum) {
PoliciesDeviceManager mdm = new PoliciesDeviceManager(this.context);
mdm.setPasswordMinimumUpperCase(minimum);
broadcastReceivedLog(Helpers.broadCastMessage(MQTT_SEND, "passwordMinUpperCase", String.valueOf(minimum)));
public void passwordMinUpperCase(String taskId, int minimum) {
try {
PoliciesDeviceManager mdm = new PoliciesDeviceManager(this.context);
mdm.setPasswordMinimumUpperCase(minimum);
broadcastReceivedLog(Helpers.broadCastMessage(MQTT_SEND, "passwordMinUpperCase", String.valueOf(minimum)));

// return the status of the task
sendTaskStatus(taskId, FEEDBACK_DONE);
} catch (Exception ex) {
FlyveLog.e(ex.getMessage());

// return the status of the task
sendTaskStatus(taskId, FEEDBACK_FAILED);
}
}

public void maximumFailedPasswordsForWipe(int maximum) {
Expand Down

0 comments on commit ac79598

Please sign in to comment.