com.ibm.commerce.businessaudit.util

Class AuditLoggingHelper

  • java.lang.Object
    • com.ibm.commerce.businessaudit.util.AuditLoggingHelper


  • public class AuditLoggingHelper
    extends java.lang.Object
    This is a helper class for audit logging.
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright statement
        See Also:
        Constant Field Values
      • CODE_PERSONAL_DATA_READ

        public static final java.lang.String CODE_PERSONAL_DATA_READ
        See Also:
        Constant Field Values
      • CODE_PERSONAL_DATA_CREATE

        public static final java.lang.String CODE_PERSONAL_DATA_CREATE
        See Also:
        Constant Field Values
      • CODE_PERSONAL_DATA_UPDATE

        public static final java.lang.String CODE_PERSONAL_DATA_UPDATE
        See Also:
        Constant Field Values
      • CODE_PERSONAL_DATA_DELETE

        public static final java.lang.String CODE_PERSONAL_DATA_DELETE
        See Also:
        Constant Field Values
      • PERSONAL_DATA_CONTACT

        public static final java.lang.String PERSONAL_DATA_CONTACT
        See Also:
        Constant Field Values
      • PERSONAL_DATA_WISH_LIST

        public static final java.lang.String PERSONAL_DATA_WISH_LIST
        See Also:
        Constant Field Values
      • PERSONAL_DATA_ORDER

        public static final java.lang.String PERSONAL_DATA_ORDER
        See Also:
        Constant Field Values
      • PERSONAL_DATA_ORDER_HISTORY

        public static final java.lang.String PERSONAL_DATA_ORDER_HISTORY
        See Also:
        Constant Field Values
      • PERSONAL_DATA_PASSWORD

        public static final java.lang.String PERSONAL_DATA_PASSWORD
        See Also:
        Constant Field Values
      • PERSONAL_DATA_SUBSCRIPTION

        public static final java.lang.String PERSONAL_DATA_SUBSCRIPTION
        See Also:
        Constant Field Values
      • PERSONAL_DATA_COUPON

        public static final java.lang.String PERSONAL_DATA_COUPON
        See Also:
        Constant Field Values
      • PERSONAL_DATA_CHECKOUT_PROFILE

        public static final java.lang.String PERSONAL_DATA_CHECKOUT_PROFILE
        See Also:
        Constant Field Values
      • PERSONAL_DATA_PREFERENCE

        public static final java.lang.String PERSONAL_DATA_PREFERENCE
        See Also:
        Constant Field Values
    • Method Detail

      • getInstance

        public static AuditLoggingHelper getInstance()
        Returns the instance.
        Returns:
        The instance.
      • log

        public void log(java.lang.String className,
                        java.lang.String methodName,
                        java.lang.String msg,
                        java.lang.String remoteAddress,
                        java.lang.Long userId,
                        java.lang.String userName,
                        java.lang.String commandName)
        Logging the message the audit level
        Parameters:
        className - The name of the calling class.
        methodName - The name of the calling method.
        msg - The message.
        remoteAddress - The remote address of the calling request.
        userId - The user ID.
        userName - The user logon ID
        commandName - The command name.
      • log

        public void log(java.lang.String className,
                        java.lang.String methodName,
                        java.lang.String msg,
                        java.lang.String remoteAddress,
                        java.lang.Long userId,
                        java.lang.String userName,
                        java.lang.String commandName,
                        boolean errLevel)
        Logging the message the audit level
        Parameters:
        className - The name of the calling class.
        methodName - The name of the calling method.
        msg - The message.
        remoteAddress - The remote address of the calling request.
        userId - The user ID.
        userName - The user logon ID
        commandName - The command name.
        errLevel - The log level. if value true, will use WcLevel.ERROR, otherwise use WcLevel.Audit
      • log

        public void log(java.util.logging.Logger logger,
                        java.lang.String className,
                        java.lang.String methodName,
                        java.lang.String msg,
                        java.lang.String remoteAddress,
                        java.lang.Long userId,
                        java.lang.String userName,
                        java.lang.String commandName,
                        boolean errLevel)
        Logs the message.
        Parameters:
        logger - The Logger class.
        className - The name of the calling class.
        methodName - The name of the calling method.
        msg - The message.
        remoteAddress - The remote address of the calling request.
        userId - The user ID.
        userName - The user logon ID
        commandName - The command name.
        errLevel - The log level. if value true, will use WcLevel.ERROR, otherwise use WcLevel.Audit
      • logPersonalDataAccess

        public void logPersonalDataAccess(java.lang.String className,
                                          java.lang.String methodName,
                                          java.lang.String remoteAddress,
                                          java.lang.String userId,
                                          java.lang.String action,
                                          java.lang.String forUserId,
                                          java.lang.String data)
        Adds the audit log for access to personal data. The actions of access include read, create, update and delete.
        Parameters:
        className - The name of the class which access personal data.
        methodName - The name of the method which access personal data.
        remoteAddress - The remote address of the host which access personal data.
        userId - The unique id of the user who access personal data.
        action - The action to the personal data. Accepted values include AuditLoggingHelper.ACTOIN_READ, AuditLoggingHelper.ACTOIN_CREATE, AuditLoggingHelper.ACTOIN_UPDDATE, AuditLoggingHelper.ACTOIN_DELETE.
        forUserId - The unique id of the user whose personal data is accessed.
        data - The type of the personal data is accessed, for example AuditLoggingHelper.PERSONAL_DATA, AuditLoggingHelper.PERSONAL_DATA_CONTACT, AuditLoggingHelper.PERSONAL_DATA_WISH_LIST, AuditLoggingHelper.PERSONAL_DATA_ORDER_HISTORY
      • getUserId

        public java.lang.String getUserId(java.lang.String logonId)
        Gets the user id from the log on id.
        Parameters:
        logonId - The log on id
        Returns:
        The user id
This page was last updated on: 2018/04/03