Class TOTVSHeader


  • public class TOTVSHeader
    extends Object
    This class contains the default TOTVS message header information.
    Author:
    diego.n
    • Constructor Detail

      • TOTVSHeader

        public TOTVSHeader()
        The default constructor of this class.
      • TOTVSHeader

        public TOTVSHeader​(String type)
        Default constructor that initializes with defaults values. Sets tenantId to current tenant and generatedOn to current timestamp, and set the current locale language.
        Parameters:
        type - The types indicates the event or command contained in the message.
      • TOTVSHeader

        public TOTVSHeader​(String type,
                           @Nullable
                           String tenantId)
        Default constructor that initializes with defaults values. Sets tenantId and generatedOn to current timestamp, and set the current locale language.
        Parameters:
        type - The types indicates the event or command contained in the message.
        tenantId - The tenant identification of message
      • TOTVSHeader

        public TOTVSHeader​(String type,
                           TransactionInfo transactionInfo)
        Default constructor with TransactionInfo that initializes with defaults values.
        Parameters:
        type - The types indicates the event or command contained in the message.
        transactionInfo - The transaction information of the current thread.
      • TOTVSHeader

        public TOTVSHeader​(String type,
                           @Nullable
                           String tenantId,
                           TransactionInfo transactionInfo)
        Default constructor with TransactionInfo that initializes with defaults values.
        Parameters:
        type - The types indicates the event or command contained in the message.
        transactionInfo - The transaction information of the current thread.
      • TOTVSHeader

        public TOTVSHeader​(String type,
                           TransactionInfo transactionInfo,
                           CloudEventsInfo cloudEventsInfo)
        Default constructor with TransactionInfo that initializes with defaults values.
        Parameters:
        type - The types indicates the event or command contained in the message.
        transactionInfo - The transaction information of the current thread.
        cloudEventsInfo - The cloudevents information of the current thread.
      • TOTVSHeader

        public TOTVSHeader​(String type,
                           @Nullable
                           String tenantId,
                           TransactionInfo transactionInfo,
                           CloudEventsInfo cloudEventsInfo)
        Default constructor with TransactionInfo that initializes with defaults values.
        Parameters:
        type - The types indicates the event or command contained in the message.
        tenantId - Tenant identification.
        transactionInfo - The transaction information of the current thread.
        cloudEventsInfo - The cloudevents information of the current thread.
    • Method Detail

      • getType

        public String getType()
        This method returns the type.
        Returns:
        type type indicates the event or command contained in the message.
      • getTenantId

        public String getTenantId()
        This method returns the tenant identification.
        Returns:
        tenantID tenant identification
      • getGeneratedOn

        public String getGeneratedOn()
        This method returns the date of message generation.
        Returns:
        generatedOn timestamp of message generation.
      • getTransactionInfo

        public TransactionInfo getTransactionInfo()
        This method returns the TransactionInfo.
        Returns:
        transactionInfo information of the current thread
      • getCloudEventsInfo

        public CloudEventsInfo getCloudEventsInfo()
        This method returns the CloudEventsInfo.
        Returns:
        cloudEventsInfo information of the current thread
      • getLocale

        public Locale getLocale()
        This method returns the current locale.
        Returns:
        locale current locale