nxt.messaging

## Class PrunableEncryptedMessageAppendix

- java.lang.Object
- - nxt.blockchain.Appendix.AbstractAppendix
  - - nxt.messaging.PrunableEncryptedMessageAppendix

- All Implemented Interfaces:
    Appendix, Appendix.Prunable
  Direct Known Subclasses:
    UnencryptedPrunableEncryptedMessageAppendix

      public class PrunableEncryptedMessageAppendix
      extends Appendix.AbstractAppendix
      implements Appendix.Prunable

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface nxt.blockchain.Appendix

      `Appendix.AbstractAppendix, Appendix.Encryptable, Appendix.Parser, Appendix.Prunable`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `appendixName`
    `static Appendix.Parser` | `appendixParser`
    `static int` | `appendixType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PrunableEncryptedMessageAppendix(EncryptedData encryptedData, boolean isText, boolean isCompressed)`
    `PrunableEncryptedMessageAppendix(org.json.simple.JSONObject attachmentJSON)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Transaction transaction, Account senderAccount, Account recipientAccount)`
    `java.lang.String` | `getAppendixName()`
    `int` | `getAppendixType()`
    `Fee` | `getBaselineFee(Transaction transaction)`
    `EncryptedData` | `getEncryptedData()`
    `byte[]` | `getHash()`
    `int` | `getMyFullSize()`
    `protected int` | `getMySize()`
    `boolean` | `hasPrunableData()`
    `boolean` | `isAllowed(Chain chain)`
    `boolean` | `isCompressed()`
    `boolean` | `isPhasable()`
    `boolean` | `isText()`
    `void` | `loadPrunable(Transaction transaction, boolean includeExpiredPrunable)`
    `protected void` | `putMyBytes(java.nio.ByteBuffer buffer)`
    `protected void` | `putMyJSON(org.json.simple.JSONObject json)`
    `void` | `putMyPrunableBytes(java.nio.ByteBuffer buffer)`
    `void` | `restorePrunableData(Transaction transaction, int blockTimestamp, int height)`
    `void` | `validate(Transaction transaction)`

    - ### Methods inherited from class nxt.blockchain.Appendix.AbstractAppendix

      `getBaselineFeeHeight, getFee, getFullSize, getJSONObject, getNextFee, getNextFeeHeight, getSize, getVersion, isPhased, loadPrunable, putBytes, validateAtFinish, validateId, verifyVersion`

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

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

    - ### Methods inherited from interface nxt.blockchain.Appendix.Prunable

      `shouldLoadPrunable`

    - ### Methods inherited from interface nxt.blockchain.Appendix

      `hasAppendix`

- - ### Field Detail

    - #### appendixType

          public static final int appendixType

      See Also:
        Constant Field Values

    - #### appendixName

          public static final java.lang.String appendixName

      See Also:
        Constant Field Values

    - #### appendixParser

          public static final Appendix.Parser appendixParser

  - ### Constructor Detail

    - #### PrunableEncryptedMessageAppendix

          public PrunableEncryptedMessageAppendix(org.json.simple.JSONObject attachmentJSON)

    - #### PrunableEncryptedMessageAppendix

          public PrunableEncryptedMessageAppendix(EncryptedData encryptedData,
                                                  boolean isText,
                                                  boolean isCompressed)

  - ### Method Detail

    - #### getBaselineFee

          public final Fee getBaselineFee(Transaction transaction)

      Specified by:
        `getBaselineFee` in interface `Appendix`
      Overrides:
        `getBaselineFee` in class `Appendix.AbstractAppendix`

    - #### getMySize

          protected final int getMySize()

      Specified by:
        `getMySize` in class `Appendix.AbstractAppendix`

    - #### getMyFullSize

          public int getMyFullSize()

      Specified by:
        `getMyFullSize` in interface `Appendix.Prunable`

    - #### putMyBytes

          protected void putMyBytes(java.nio.ByteBuffer buffer)

      Specified by:
        `putMyBytes` in class `Appendix.AbstractAppendix`

    - #### putMyPrunableBytes

          public void putMyPrunableBytes(java.nio.ByteBuffer buffer)

      Specified by:
        `putMyPrunableBytes` in interface `Appendix.Prunable`

    - #### putMyJSON

          protected void putMyJSON(org.json.simple.JSONObject json)

      Specified by:
        `putMyJSON` in class `Appendix.AbstractAppendix`

    - #### getAppendixType

          public int getAppendixType()

      Specified by:
        `getAppendixType` in interface `Appendix`

    - #### getAppendixName

          public final java.lang.String getAppendixName()

      Specified by:
        `getAppendixName` in class `Appendix.AbstractAppendix`

    - #### validate

          public void validate(Transaction transaction)
                        throws NxtException.ValidationException

      Specified by:
        `validate` in class `Appendix.AbstractAppendix`
      Throws:
        `NxtException.ValidationException`

    - #### apply

          public void apply(Transaction transaction,
                            Account senderAccount,
                            Account recipientAccount)

      Specified by:
        `apply` in class `Appendix.AbstractAppendix`

    - #### getEncryptedData

          public final EncryptedData getEncryptedData()

    - #### isText

          public final boolean isText()

    - #### isCompressed

          public final boolean isCompressed()

    - #### getHash

          public final byte[] getHash()

      Specified by:
        `getHash` in interface `Appendix.Prunable`

    - #### loadPrunable

          public void loadPrunable(Transaction transaction,
                                   boolean includeExpiredPrunable)

      Overrides:
        `loadPrunable` in class `Appendix.AbstractAppendix`

    - #### isPhasable

          public final boolean isPhasable()

      Specified by:
        `isPhasable` in class `Appendix.AbstractAppendix`

    - #### isAllowed

          public boolean isAllowed(Chain chain)

      Specified by:
        `isAllowed` in interface `Appendix`

    - #### hasPrunableData

          public final boolean hasPrunableData()

      Specified by:
        `hasPrunableData` in interface `Appendix.Prunable`

    - #### restorePrunableData

          public void restorePrunableData(Transaction transaction,
                                          int blockTimestamp,
                                          int height)

      Specified by:
        `restorePrunableData` in interface `Appendix.Prunable`