nxt.blockchain

## Class TransactionType

- java.lang.Object
- - nxt.blockchain.TransactionType

- Direct Known Subclasses:
    ChildTransactionType, FxtTransactionType

      public abstract class TransactionType
      extends java.lang.Object

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `apply(TransactionImpl transaction, Account senderAccount, Account recipientAccount)`
    `abstract void` | `applyAttachment(Transaction transaction, Account senderAccount, Account recipientAccount)`
    `abstract boolean` | `applyAttachmentUnconfirmed(Transaction transaction, Account senderAccount)`
    `abstract boolean` | `applyUnconfirmed(TransactionImpl transaction, Account senderAccount)`
    `abstract boolean` | `canHaveRecipient()`
    `static TransactionType` | `findTransactionType(byte type, byte subtype)`
    `abstract Fee` | `getBaselineFee(Transaction transaction)`
    `int` | `getBaselineFeeHeight()`
    `abstract AccountLedger.LedgerEvent` | `getLedgerEvent()`
    `abstract java.lang.String` | `getName()`
    `Fee` | `getNextFee(Transaction transaction)`
    `int` | `getNextFeeHeight()`
    `abstract byte` | `getSubtype()`
    `abstract byte` | `getType()`
    `boolean` | `isBlockDuplicate(Transaction transaction, java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)`
    `boolean` | `isDuplicate(Transaction transaction, java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)`
    `static boolean` | `isDuplicate(TransactionType uniqueType, java.lang.String key, java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates, boolean exclusive)`
    `protected static boolean` | `isDuplicate(TransactionType uniqueType, java.lang.String key, java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates, int maxCount)`
    `abstract boolean` | `isGlobal()`
    `boolean` | `isPhasable()`
    `abstract boolean` | `isPhasingSafe()`
    `boolean` | `isPruned(Chain chain, byte[] fullHash)`
    `boolean` | `isUnconfirmedDuplicate(Transaction transaction, java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)`
    `boolean` | `mustHaveRecipient()`
    `abstract Attachment.AbstractAttachment` | `parseAttachment(java.nio.ByteBuffer buffer)`
    `abstract Attachment.AbstractAttachment` | `parseAttachment(org.json.simple.JSONObject attachmentData)`
    `java.lang.String` | `toString()`
    `abstract void` | `undoAttachmentUnconfirmed(Transaction transaction, Account senderAccount)`
    `abstract void` | `undoUnconfirmed(TransactionImpl transaction, Account senderAccount)`
    `abstract void` | `validateAttachment(Transaction transaction)`
    `protected abstract void` | `validateId(Transaction transaction)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### findTransactionType

          public static TransactionType findTransactionType(byte type,
                                                            byte subtype)

    - #### getType

          public abstract byte getType()

    - #### getSubtype

          public abstract byte getSubtype()

    - #### getLedgerEvent

          public abstract AccountLedger.LedgerEvent getLedgerEvent()

    - #### parseAttachment

          public abstract Attachment.AbstractAttachment parseAttachment(java.nio.ByteBuffer buffer)
                                                                 throws NxtException.NotValidException

      Throws:
        `NxtException.NotValidException`

    - #### parseAttachment

          public abstract Attachment.AbstractAttachment parseAttachment(org.json.simple.JSONObject attachmentData)
                                                                 throws NxtException.NotValidException

      Throws:
        `NxtException.NotValidException`

    - #### validateAttachment

          public abstract void validateAttachment(Transaction transaction)
                                           throws NxtException.ValidationException

      Throws:
        `NxtException.ValidationException`

    - #### applyUnconfirmed

          public abstract boolean applyUnconfirmed(TransactionImpl transaction,
                                                   Account senderAccount)

    - #### applyAttachmentUnconfirmed

          public abstract boolean applyAttachmentUnconfirmed(Transaction transaction,
                                                             Account senderAccount)

    - #### apply

          public abstract void apply(TransactionImpl transaction,
                                     Account senderAccount,
                                     Account recipientAccount)

    - #### applyAttachment

          public abstract void applyAttachment(Transaction transaction,
                                               Account senderAccount,
                                               Account recipientAccount)

    - #### undoUnconfirmed

          public abstract void undoUnconfirmed(TransactionImpl transaction,
                                               Account senderAccount)

    - #### undoAttachmentUnconfirmed

          public abstract void undoAttachmentUnconfirmed(Transaction transaction,
                                                         Account senderAccount)

    - #### isDuplicate

          public boolean isDuplicate(Transaction transaction,
                                     java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)

    - #### isBlockDuplicate

          public boolean isBlockDuplicate(Transaction transaction,
                                          java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)

    - #### isUnconfirmedDuplicate

          public boolean isUnconfirmedDuplicate(Transaction transaction,
                                                java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates)

    - #### isDuplicate

          public static boolean isDuplicate(TransactionType uniqueType,
                                            java.lang.String key,
                                            java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates,
                                            boolean exclusive)

    - #### isDuplicate

          protected static boolean isDuplicate(TransactionType uniqueType,
                                               java.lang.String key,
                                               java.util.Map<TransactionType,java.util.Map<java.lang.String,java.lang.Integer>> duplicates,
                                               int maxCount)

    - #### isPruned

          public boolean isPruned(Chain chain,
                                  byte[] fullHash)

    - #### canHaveRecipient

          public abstract boolean canHaveRecipient()

    - #### mustHaveRecipient

          public boolean mustHaveRecipient()

    - #### isPhasingSafe

          public abstract boolean isPhasingSafe()

    - #### isPhasable

          public boolean isPhasable()

    - #### isGlobal

          public abstract boolean isGlobal()

    - #### getBaselineFee

          public abstract Fee getBaselineFee(Transaction transaction)

    - #### getNextFee

          public Fee getNextFee(Transaction transaction)

    - #### getBaselineFeeHeight

          public int getBaselineFeeHeight()

    - #### getNextFeeHeight

          public int getNextFeeHeight()

    - #### getName

          public abstract java.lang.String getName()

    - #### toString

          public final java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### validateId

          protected abstract void validateId(Transaction transaction)
                                      throws NxtException.ValidationException

      Throws:
        `NxtException.ValidationException`