/** * Get the deferred action from the request. * * @param request the request * @return a tuple containing the deferred action (or null if it doesn't exist) and the cleaned up request you should pass on */ @SuppressWarnings("unchecked") public F.Tuple<AbstractDeadboltAction<?>, Http.RequestHeader> getDeferredAction(final Http.RequestHeader request) { return request.attrs().getOptional(ACTION_DEFERRED).map(action -> { action.delegate = this; return F.<AbstractDeadboltAction<?>, Http.RequestHeader>Tuple(action, request.removeAttr(ACTION_DEFERRED).addAttr(IGNORE_DEFERRED_FLAG, true)); }).orElseGet(() -> F.Tuple(null, request)); }
/** * Get the deferred action from the request. * * @param request the request * @return a tuple containing the deferred action (or null if it doesn't exist) and the cleaned up request you should pass on */ @SuppressWarnings("unchecked") public F.Tuple<AbstractDeadboltAction<?>, Http.RequestHeader> getDeferredAction(final Http.RequestHeader request) { return request.attrs().getOptional(ACTION_DEFERRED).map(action -> { action.delegate = this; return F.<AbstractDeadboltAction<?>, Http.RequestHeader>Tuple(action, request.removeAttr(ACTION_DEFERRED).addAttr(IGNORE_DEFERRED_FLAG, true)); }).orElseGet(() -> F.Tuple(null, request)); }
/** * Create a new version of this object with the given transient language removed. * * @return The new version of this object with the transient language removed. */ default RequestHeader withoutTransientLang() { return removeAttr(Messages.Attrs.CurrentLang); }
/** * Create a new version of this object with the given transient language removed. * * @return The new version of this object with the transient language removed. */ default RequestHeader withoutTransientLang() { return removeAttr(Messages.Attrs.CurrentLang); }
/** * Create a new version of this object with the given transient language removed. * * @return The new version of this object with the transient language removed. */ default RequestHeader withoutTransientLang() { return removeAttr(Messages.Attrs.CurrentLang); }