Search in sources :

Example 1 with AliasAction

use of io.nem.symbol.sdk.model.namespace.AliasAction in project nem2-sdk-java by nemtech.

the class AddressAliasTransactionMapper method createFactory.

@Override
protected AddressAliasTransactionFactory createFactory(NetworkType networkType, Deadline deadline, AddressAliasTransactionDTO transaction) {
    NamespaceId namespaceId = MapperUtils.toNamespaceId(transaction.getNamespaceId());
    AliasAction aliasAction = AliasAction.rawValueOf(transaction.getAliasAction().getValue().byteValue());
    return AddressAliasTransactionFactory.create(networkType, deadline, aliasAction, namespaceId, MapperUtils.toAddress(transaction.getAddress()));
}
Also used : AliasAction(io.nem.symbol.sdk.model.namespace.AliasAction) NamespaceId(io.nem.symbol.sdk.model.namespace.NamespaceId)

Example 2 with AliasAction

use of io.nem.symbol.sdk.model.namespace.AliasAction in project nem2-sdk-java by nemtech.

the class AddressAliasTransactionMapper method createFactory.

@Override
protected AddressAliasTransactionFactory createFactory(NetworkType networkType, Deadline deadline, AddressAliasTransactionDTO transaction) {
    NamespaceId namespaceId = MapperUtils.toNamespaceId(transaction.getNamespaceId());
    AliasAction aliasAction = AliasAction.rawValueOf(transaction.getAliasAction().getValue().byteValue());
    return AddressAliasTransactionFactory.create(networkType, deadline, aliasAction, namespaceId, toAddress(transaction.getAddress()));
}
Also used : AliasAction(io.nem.symbol.sdk.model.namespace.AliasAction) NamespaceId(io.nem.symbol.sdk.model.namespace.NamespaceId)

Example 3 with AliasAction

use of io.nem.symbol.sdk.model.namespace.AliasAction in project nem2-sdk-java by nemtech.

the class MosaicAliasTransactionMapper method createFactory.

@Override
protected TransactionFactory<MosaicAliasTransaction> createFactory(NetworkType networkType, Deadline deadline, MosaicAliasTransactionDTO transaction) {
    NamespaceId namespaceId = MapperUtils.toNamespaceId(transaction.getNamespaceId());
    AliasAction aliasAction = AliasAction.rawValueOf(transaction.getAliasAction().getValue().byteValue());
    return MosaicAliasTransactionFactory.create(networkType, deadline, aliasAction, namespaceId, MapperUtils.toMosaicId(transaction.getMosaicId()));
}
Also used : AliasAction(io.nem.symbol.sdk.model.namespace.AliasAction) NamespaceId(io.nem.symbol.sdk.model.namespace.NamespaceId)

Example 4 with AliasAction

use of io.nem.symbol.sdk.model.namespace.AliasAction in project nem2-sdk-java by nemtech.

the class MosaicAliasTransactionMapper method createFactory.

@Override
protected TransactionFactory<MosaicAliasTransaction> createFactory(NetworkType networkType, Deadline deadline, MosaicAliasTransactionDTO transaction) {
    NamespaceId namespaceId = MapperUtils.toNamespaceId(transaction.getNamespaceId());
    AliasAction aliasAction = AliasAction.rawValueOf(transaction.getAliasAction().getValue().byteValue());
    return MosaicAliasTransactionFactory.create(networkType, deadline, aliasAction, namespaceId, MapperUtils.toMosaicId(transaction.getMosaicId()));
}
Also used : AliasAction(io.nem.symbol.sdk.model.namespace.AliasAction) NamespaceId(io.nem.symbol.sdk.model.namespace.NamespaceId)

Aggregations

AliasAction (io.nem.symbol.sdk.model.namespace.AliasAction)4 NamespaceId (io.nem.symbol.sdk.model.namespace.NamespaceId)4