AMAuditEventBuilderUtils.java revision bab1e6524fca64a55ecfc2503295092db8e0f48e
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2015 ForgeRock AS.
*/
/**
* Collection of static helper methods for use by AM AuditEventBuilders.
*
* @since 13.0.0
*/
public final class AMAuditEventBuilderUtils {
private AMAuditEventBuilderUtils() {
throw new UnsupportedOperationException("Utils class; should not be instantiated.");
}
/**
* Set "component" audit log field.
*
* @param value String "component" value.
*/
}
/**
* Set "realm" audit log field.
*
* @param value String "realm" value.
*/
}
/**
* Gets the contextId value from the {@code SSOToken}.
*
* @param ssoToken The SSOToken from which the contextId value will be retrieved.
* @return contextId for SSOToken or empty string if undefined.
*/
}
/**
* Given the SSO token, retrieves the user's identifier.
*
* @param ssoToken
* the SSO token
*
* @return the associated user identifier
*/
}
try {
} catch (SSOException e) {
}
}
return defaultValue;
}
/**
* Get all available {@link AuditConstants.TrackingIdKey} values from the possible list of
* {@link AuditConstants.TrackingIdKey} values, from the {@link AuditRequestContext}.
*
* @return All the available {@link AuditConstants.TrackingIdKey} values.
*/
}
}
return trackingIdValues;
}
/**
* Generate a map of query parameters from the ampersand-separated list of key-value pairs.
*
* @param queryString HTTP query string.
* @return Map of parameter keys to their values.
*/
if (queryString != null) {
}
}
}
}
return queryParameters;
}
}