public class WriteAuditLog extends AbstractProfileAction
AuditContext and one or more formatting strings.EventIds.PROCEED_EVENT_ID| Modifier and Type | Field and Description |
|---|---|
private com.google.common.base.Function<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 javax.servlet.http.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 org.joda.time.format.DateTimeFormatter |
v2Formatter
Formatter used to convert timestamps to strings.
|
| Constructor and Description |
|---|
WriteAuditLog()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doExecute(ProfileRequestContext profileRequestContext) |
protected org.springframework.webflow.execution.Event |
doExecute(org.springframework.webflow.execution.RequestContext springRequestContext,
ProfileRequestContext profileRequestContext) |
protected boolean |
doPreExecute(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(com.google.common.base.Function<ProfileRequestContext,AuditContext> strategy)
Set the strategy used to locate the
AuditContext associated with a given
ProfileRequestContext. |
void |
setDateTimeFormat(String format)
Set the
DateTime formatting string to apply when extracting DateTime-valued fields. |
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 org.joda.time.format.DateTimeFormatter v2Formatter
@Nonnull private final org.slf4j.Logger log
@Nonnull private com.google.common.base.Function<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 javax.servlet.http.HttpServletRequest httpRequest
public void setAuditContextLookupStrategy(@Nonnull com.google.common.base.Function<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)
DateTime formatting string to apply when extracting DateTime-valued fields.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 ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprotected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)
doPreExecute in class AbstractConditionalProfileActionprotected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)
doExecute in class AbstractProfileActionprotected void filter(@Nonnull StringBuilder entry)
entry - log entryCopyright © 1999–2018 Shibboleth Consortium. All rights reserved.