Class DefaultDestinationService<T extends AbstractDestinationModel>
- java.lang.Object
-
- de.hybris.platform.apiregistryservices.services.impl.DefaultDestinationService<T>
-
- Type Parameters:
T
- the type parameter which extends theAbstractDestinationModel
type
- All Implemented Interfaces:
DestinationService
public class DefaultDestinationService<T extends AbstractDestinationModel> extends java.lang.Object implements DestinationService
Default implementation ofDestinationService
-
-
Constructor Summary
Constructors Constructor Description DefaultDestinationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<ExposedDestinationModel>
getActiveExposedDestinationsByChannel(DestinationChannel channel)
Deprecated, for removal: This API element is subject to removal in a future version.since 1905.java.util.List<ExposedDestinationModel>
getActiveExposedDestinationsByClientId(java.lang.String clientId)
Find the list of active destinations for specific clientIdjava.util.List<ExposedDestinationModel>
getActiveExposedDestinationsByDestinationTargetId(java.lang.String destinationTargetId)
Get the list of active exposed destinations for a specific destination targetjava.util.List<ConsumedDestinationModel>
getAllConsumedDestinations()
Get all consumed destinationsjava.util.List
getAllDestinations()
Get all destinationsT
getDestinationById(java.lang.String id)
Deprecated, for removal: This API element is subject to removal in a future version.since 1905.AbstractDestinationModel
getDestinationByIdAndByDestinationTargetId(java.lang.String destinationId, java.lang.String destinationTargetId)
Get the destination for a specific destination and a specific destination idprotected DestinationDao<T>
getDestinationDao()
java.util.List<T>
getDestinationsByChannel(DestinationChannel channel)
Deprecated, for removal: This API element is subject to removal in a future version.since 1905.java.util.List<T>
getDestinationsByDestinationTargetId(java.lang.String destinationTargetId)
Find destinations for specific destinationTargetprotected org.springframework.web.client.RestTemplate
getRestTemplate(ConsumedDestinationModel consumedDestination)
void
setDestinationDao(DestinationDao<T> destinationDao)
void
testDestinationUrl(ConsumedDestinationModel consumedDestination)
Testing the consumed destination url
-
-
-
Method Detail
-
getDestinationsByChannel
@Deprecated(since="1905", forRemoval=true) public java.util.List<T> getDestinationsByChannel(DestinationChannel channel)
Deprecated, for removal: This API element is subject to removal in a future version.since 1905. UseDestinationService.getDestinationsByDestinationTargetId(String)
Description copied from interface:DestinationService
Find destinations for specific channel- Specified by:
getDestinationsByChannel
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
channel
- the channel of the destination- Returns:
- List of destinations for the given channel
-
getDestinationsByDestinationTargetId
public java.util.List<T> getDestinationsByDestinationTargetId(java.lang.String destinationTargetId)
Description copied from interface:DestinationService
Find destinations for specific destinationTarget- Specified by:
getDestinationsByDestinationTargetId
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
destinationTargetId
- the id of the DestinationTarget- Returns:
- List of destinations for the given DestinationTarget
-
getActiveExposedDestinationsByClientId
public java.util.List<ExposedDestinationModel> getActiveExposedDestinationsByClientId(java.lang.String clientId)
Description copied from interface:DestinationService
Find the list of active destinations for specific clientId- Specified by:
getActiveExposedDestinationsByClientId
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
clientId
- The clientId of OAuthClientDetails- Returns:
- a List of Destinations by the ExposedOAuthCredential clientId
-
getActiveExposedDestinationsByChannel
@Deprecated(since="1905", forRemoval=true) public java.util.List<ExposedDestinationModel> getActiveExposedDestinationsByChannel(DestinationChannel channel)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DestinationService
Find the list of destinations for specific channel- Specified by:
getActiveExposedDestinationsByChannel
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
channel
- The channel assigned to Destinations- Returns:
- a List of Destinations by the credential
-
getActiveExposedDestinationsByDestinationTargetId
public java.util.List<ExposedDestinationModel> getActiveExposedDestinationsByDestinationTargetId(java.lang.String destinationTargetId)
Description copied from interface:DestinationService
Get the list of active exposed destinations for a specific destination target- Specified by:
getActiveExposedDestinationsByDestinationTargetId
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
destinationTargetId
- id of the destination target- Returns:
- a list of exposed destinations
-
getDestinationByIdAndByDestinationTargetId
public AbstractDestinationModel getDestinationByIdAndByDestinationTargetId(java.lang.String destinationId, java.lang.String destinationTargetId)
Description copied from interface:DestinationService
Get the destination for a specific destination and a specific destination id- Specified by:
getDestinationByIdAndByDestinationTargetId
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
destinationId
- id of the destinationdestinationTargetId
- id of the destination target- Returns:
- a destination
-
getDestinationById
@Deprecated(since="1905", forRemoval=true) public T getDestinationById(java.lang.String id)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DestinationService
Since 1905, the id attribute of the destination is not unique, therefore, this gets the first item of the destinations for specific id.- Specified by:
getDestinationById
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
id
- the id of the destination- Returns:
- The destination for the given id
-
getAllDestinations
public java.util.List getAllDestinations()
Description copied from interface:DestinationService
Get all destinations- Specified by:
getAllDestinations
in interfaceDestinationService<T extends AbstractDestinationModel>
- Returns:
- the list of destinations
-
testDestinationUrl
public void testDestinationUrl(ConsumedDestinationModel consumedDestination) throws DestinationNotFoundException
Description copied from interface:DestinationService
Testing the consumed destination url- Specified by:
testDestinationUrl
in interfaceDestinationService<T extends AbstractDestinationModel>
- Parameters:
consumedDestination
- given consumedDestination model- Throws:
DestinationNotFoundException
- will be thrown in case of any exception during testing the consumed destination url
-
getDestinationDao
protected DestinationDao<T> getDestinationDao()
-
setDestinationDao
public void setDestinationDao(DestinationDao<T> destinationDao)
-
getAllConsumedDestinations
public java.util.List<ConsumedDestinationModel> getAllConsumedDestinations()
Description copied from interface:DestinationService
Get all consumed destinations- Specified by:
getAllConsumedDestinations
in interfaceDestinationService<T extends AbstractDestinationModel>
- Returns:
- the list of consumed destinations
-
getRestTemplate
protected org.springframework.web.client.RestTemplate getRestTemplate(ConsumedDestinationModel consumedDestination) throws CredentialException
- Throws:
CredentialException
-
-