Class DestinationTargetBuilder
- java.lang.Object
-
- de.hybris.platform.outboundservices.DestinationTargetBuilder
-
public class DestinationTargetBuilder extends java.lang.ObjectA helper to be used in integration tests for creating and persistingDestinationTargetModel
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DestinationTargetModelbuild()static DestinationTargetBuilderdestinationTarget()Instantiates a new builder initialized to default state.static java.util.Optional<DestinationTargetModel>getDestinationTargetById(java.lang.String id)Looks up a destination target in the persistence storage.DestinationTargetBuilderwithDestinationChannel(DestinationChannel channel)Specifies the destination channel for the destination target being built.DestinationTargetBuilderwithId(java.lang.String id)Specifies ID for the destination target to build.DestinationTargetBuilderwithRegistrationStatus(RegistrationStatus status)Specifies registration status for the destination target.
-
-
-
Method Detail
-
destinationTarget
public static DestinationTargetBuilder destinationTarget()
Instantiates a new builder initialized to default state.- Returns:
- new destination target builder
-
withId
public DestinationTargetBuilder withId(java.lang.String id)
Specifies ID for the destination target to build.- Parameters:
id- identifier of the destination target to create. If the value is- Returns:
- the builder with the ID specified
-
withDestinationChannel
public DestinationTargetBuilder withDestinationChannel(DestinationChannel channel)
Specifies the destination channel for the destination target being built.- Parameters:
channel- destination channel to be used by the destination target. If the channel value isnullor this method was not called, then the platform default channel will be used.- Returns:
- a builder with the destination channel specified.
-
withRegistrationStatus
public DestinationTargetBuilder withRegistrationStatus(RegistrationStatus status)
Specifies registration status for the destination target.- Parameters:
status- a status to be used by the destination target being built by this builder. If the value isnullor this method was not called, then destination target will be created without the registration status.- Returns:
- a builder with the registration status specified.
-
build
public DestinationTargetModel build() throws ImpExException
- Throws:
ImpExException
-
getDestinationTargetById
public static java.util.Optional<DestinationTargetModel> getDestinationTargetById(java.lang.String id)
Looks up a destination target in the persistence storage.- Parameters:
id- ID of the destination target to find.- Returns:
- an optional containing the matching destination target or
Optional.empty(), if such destination target does not exist.
-
-