public class WriteAuditLog extends AbstractProfileAction
AuditContext and one or more formatting strings.EventIds.PROCEED_EVENT_ID| Modifier and Type | Field and Description |
|---|---|
private Function<org.opensaml.profile.context.ProfileRequestContext,AuditContext> |
auditContextLookupStrategy
Strategy used to locate the
AuditContext associated with a given ProfileRequestContext. |
private AuditContext |
auditCtx
The AuditContext to operate on.
|
private String |
dateTimeFormat
Formatting string for
DateTime fields. |
private Map<String,List<String>> |
formattingMap
Map of log category to formatting tokens and literals to output.
|
private HttpServletRequest |
httpRequest
HttpServletRequest object.
|
private org.slf4j.Logger |
log
Class logger.
|
private org.springframework.webflow.execution.RequestContext |
requestContext
The Spring RequestContext to operate on.
|
private boolean |
useDefaultTimeZone
Convert
DateTime fields to default time zone. |
private static DateTimeFormatter |
v2Formatter
Formatter used to convert timestamps to strings.
|
| Constructor and Description |
|---|
WriteAuditLog()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
protected org.springframework.webflow.execution.Event |
doExecute(org.springframework.webflow.execution.RequestContext springRequestContext,
org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
protected boolean |
doPreExecute(org.opensaml.profile.context.ProfileRequestContext profileRequestContext) |
protected void |
filter(StringBuilder entry)
Optional override to filter the outgoing log message, does nothing by default.
|
Map<String,List<String>> |
getFormattingMap()
Get the map of logging category to formatting tokens for log entries.
|
void |
setAuditContextLookupStrategy(Function<org.opensaml.profile.context.ProfileRequestContext,AuditContext> strategy)
Set the strategy used to locate the
AuditContext associated with a given
ProfileRequestContext. |
void |
setDateTimeFormat(String format)
|
void |
setFormattingMap(Map<String,String> map)
Set the map of logging category to formatting strings for log entries.
|
void |
setUseDefaultTimeZone(boolean flag)
Convert
DateTime-valued fields to default time zone. |
execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategygetActivationCondition, setActivationConditiondoPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponsedestroy, doDestroy, doInitialize, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, isInitializedprivate static DateTimeFormatter v2Formatter
@Nonnull private final org.slf4j.Logger log
@Nonnull private Function<org.opensaml.profile.context.ProfileRequestContext,AuditContext> auditContextLookupStrategy
AuditContext associated with a given ProfileRequestContext.@Nonnull @NotEmpty private Map<String,List<String>> formattingMap
private boolean useDefaultTimeZone
DateTime fields to default time zone.@Nullable private org.springframework.webflow.execution.RequestContext requestContext
@Nullable private AuditContext auditCtx
@Nullable private HttpServletRequest httpRequest
public void setAuditContextLookupStrategy(@Nonnull Function<org.opensaml.profile.context.ProfileRequestContext,AuditContext> strategy)
AuditContext associated with a given
ProfileRequestContext.strategy - lookup strategy@Nonnull @NonnullElements @NotLive @Unmodifiable public Map<String,List<String>> getFormattingMap()
public void setFormattingMap(@Nonnull@NonnullElements Map<String,String> map)
A formatting string consists of tokens prefixed by '%' separated by any non-alphanumeric or whitespace. Tokens can contain any letter or number or a hyphen. Anything other than a token, including whitespace, is a literal.
map - map of categories to formatting stringspublic void setDateTimeFormat(@Nullable@NotEmpty String format)
format - formatting stringpublic void setUseDefaultTimeZone(boolean flag)
DateTime-valued fields to default time zone.flag - flag to set@Nonnull protected org.springframework.webflow.execution.Event doExecute(@Nonnull org.springframework.webflow.execution.RequestContext springRequestContext, @Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprotected boolean doPreExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doPreExecute in class org.opensaml.profile.action.AbstractConditionalProfileActionprotected void doExecute(@Nonnull org.opensaml.profile.context.ProfileRequestContext profileRequestContext)
doExecute in class org.opensaml.profile.action.AbstractProfileActionprotected void filter(@Nonnull StringBuilder entry)
entry - log entryCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.