Class AggregateTraceMessage

  • All Implemented Interfaces:
    ITraceMessage, Serializable

    public final class AggregateTraceMessage
    extends TraceMessageBase
    This class defines the information that is logged about the actions taken in the AggregateDAO plugin. The information includes the action performed, the date when it was performed, the user who performed the action and the profile after the action was performed. (who, when, what)
    Author:
    V. Moldovan
    See Also:
    Serialized Form
    • Field Detail

      • PROPERTY_DATE

        public static final String PROPERTY_DATE
        The name of the column that contains date time at which the action is performed.
        See Also:
        Constant Field Values
      • PROPERTY_USER_ID

        public static final String PROPERTY_USER_ID
        The name of the column that contains the id of the user who performed the change.
        See Also:
        Constant Field Values
      • PROPERTY_USER_NAME

        public static final String PROPERTY_USER_NAME
        The name of the column that contains the name of the user who performed the change.
        See Also:
        Constant Field Values
      • PROPERTY_PROFILE

        public static final String PROPERTY_PROFILE
        The name of the column that contains the xml representation of the aggregate profile after the performed action.
        See Also:
        Constant Field Values
      • PROPERTY_AGGREGATE_ID

        public static final String PROPERTY_AGGREGATE_ID
        The name of the column that contains the aggregate id.
        See Also:
        Constant Field Values
      • PROPERTY_AGGREGATE_VERSION

        public static final String PROPERTY_AGGREGATE_VERSION
        The name of the column that contains the aggregate version.
        See Also:
        Constant Field Values
    • Method Detail

      • forCreate

        public static AggregateTraceMessage forCreate​(String applicationId,
                                                      String userId,
                                                      String userName,
                                                      Long aggregateId,
                                                      long version,
                                                      String data)
        This method returns a new Aggregate Trace Message when a new aggregate is created.
        Parameters:
        applicationId - The application id.
        userId - the user id
        userName - the user name
        aggregateId - the aggregate id
        version - the aggregate version
        data - the aggregate data
        Returns:
        A new trace message.
      • forDelete

        public static AggregateTraceMessage forDelete​(String applicationId,
                                                      String userId,
                                                      String userName,
                                                      Long aggregateId,
                                                      long version,
                                                      String data)
        This method returns a new Aggregate Trace Message when an aggregate is deleted.
        Parameters:
        applicationId - The application id.
        userId - the user id
        userName - the user name
        aggregateId - the aggregate id
        version - the aggregate version
        data - the aggregate data
        Returns:
        A new trace message.
      • forUpdate

        public static AggregateTraceMessage forUpdate​(String applicationId,
                                                      String userId,
                                                      String userName,
                                                      Long aggregateId,
                                                      long version,
                                                      String data)
        This method returns a new Aggregate Trace Message when an aggregate is updated.
        Parameters:
        applicationId - The application id.
        userId - the user id
        userName - the user name
        aggregateId - the aggregate id
        version - the aggregate version
        data - the aggregate data
        Returns:
        A new trace message.