com.ibm.commerce.context.audit

Interface AuditContext

  • All Superinterfaces:
    Context, java.io.Serializable


    public interface AuditContext
    extends Context
    An audit context to provide a service that handles the auditing of a particular request based on the current contexts.
    • Field Detail

      • COPYRIGHT

        static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • NAME

        static final java.lang.String NAME
        The name of the context.
      • KEY_CONTENT_PERSONALIZATION_ID

        static final java.lang.String KEY_CONTENT_PERSONALIZATION_ID
        The name of the contentPersonalizationId URL parameter in ActivityData objects.
        See Also:
        Constant Field Values
    • Method Detail

      • getRequestIdentifier

        java.lang.Long getRequestIdentifier()
        Returns a unique identifier to identify the request being processed.
        Returns:
        A unique identifier for the request.
      • getNextRequestSequenceNumber

        int getNextRequestSequenceNumber()
        Returns the next sequence number to indicate the ordering when the audit is captured.
        Returns:
        The next sequence number of the request.
      • getTransportData

        TransportData getTransportData()
        Returns the information associated with the transport that is issuing the request.
        Returns:
        The transport request data.
      • setPersonalizationId

        java.lang.String setPersonalizationId(java.lang.String strPersonalizationId)
                                       throws BusinessContextException
        Reserved for IBM internal use.

        Sets the personalization ID in the audit context associated with the current run-as user. The personalization ID that is returned can be different from the input personalization ID if (a) there is already a personalization ID assigned to the current guest/registered user or (b) the input personalization ID has already been used by another registered user and cannot be assigned to the current run-as registered user. For a generic user, the personalization ID that is returned will always be the same as the input personalization ID. If the input personalization ID is null, the method will reset the audit context personalization ID to null without resetting the personalization ID in the database.

        Parameters:
        strPersonalizationId - The personalization ID.
        Returns:
        The final personalization ID being set for this user.
        Throws:
        BusinessContextException - on any other error encountered.
      • setContentPersonalizationId

        void setContentPersonalizationId(java.lang.String strPersonalizationId)
                                  throws BusinessContextException
        Reserved for IBM internal use.

        Sets the content personalization ID in the audit context. The content personalization ID is used to indicate the registered user for whom to retrieve content. The content personalization ID is not persisted to the database.

        Parameters:
        strPersonalizationId - The personalization ID corresponding to the user for whom to retrieve content.
        Throws:
        BusinessContextException - on any other error encountered.
      • getPersonalizationId

        java.lang.String getPersonalizationId()
                                       throws BusinessContextException
        Gets the personalization ID for the current run-as user. If the user does not yet have a personalization ID, the system generates and assigns a new one. If the user is a generic user, the method will return null.
        Returns:
        The personalization ID for this user.
        Throws:
        BusinessContextException - on any other error encountered.
      • getContentPersonalizationId

        java.lang.String getContentPersonalizationId()
                                              throws BusinessContextException
        Gets the content personalization ID to determine the user for whom to retrieve content.
        Returns:
        The personalization ID of the user for whom to retrieve content.
        Throws:
        BusinessContextException - on any other error encountered.
      • getCurrentPersonalizationId

        java.lang.String getCurrentPersonalizationId()
                                              throws BusinessContextException
        Gets the content personalization ID if it is set; otherwise gets the run-as personalization ID.
        Returns:
        The current personalization ID for this user.
        Throws:
        BusinessContextException - on any other error encountered.