use of com.cognifide.apm.api.actions.SessionSavingMode in project APM by Cognifide.
the class SessionSave method process.
private ActionResult process(final Context context, boolean execute) {
ActionResult actionResult = context.createActionResult();
if (execute) {
try {
SessionSavingMode savingMode = SessionSavingMode.valueOfMode(mode);
SessionSavingPolicy savingPolicy = context.getSavingPolicy();
savingPolicy.setMode(savingMode);
actionResult.logMessage("Session saving mode set to: " + mode);
} catch (IllegalArgumentException e) {
actionResult.logError(MessagingUtils.createMessage(e));
}
}
return actionResult;
}
Aggregations