use of com.cognifide.cq.cqsm.core.sessions.SessionSavingMode in project APM by Cognifide.
the class SessionSave method process.
private ActionResult process(final Context context, boolean execute) {
ActionResult actionResult = new ActionResult();
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