Class DefaultDestinationService<T extends AbstractDestinationModel>
java.lang.Object
de.hybris.platform.apiregistryservices.services.impl.DefaultDestinationService<T>
- Type Parameters:
T- the type parameter which extends theAbstractDestinationModeltype
- All Implemented Interfaces:
DestinationService
public class DefaultDestinationService<T extends AbstractDestinationModel>
extends Object
implements DestinationService
Default implementation of
DestinationService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.since 1905.getActiveExposedDestinationsByClientId(String clientId) Find the list of active destinations for specific clientIdgetActiveExposedDestinationsByDestinationTargetId(String destinationTargetId) Get the list of active exposed destinations for a specific destination targetGet all consumed destinationsGet all destinationsgetAllDestinationsByCredentialId(String credentialId) Get allDestinationModels by credential idgetDeletableCredentialsByDestinationTargetId(String destinationTargetId) Get all credentials that can be deleted A credential can be deleted means it is consumed by one destination or multiple destinations with same destination targetDeprecated, for removal: This API element is subject to removal in a future version.since 1905.getDestinationByIdAndByDestinationTargetId(String destinationId, String destinationTargetId) Get the destination for a specific destination and a specific destination idprotected DestinationDao<T>Deprecated, for removal: This API element is subject to removal in a future version.since 1905.getDestinationsByDestinationTargetId(String destinationTargetId) Find destinations for specific destinationTargetgetExposedDestinationsByCredentialId(String credentialId) Get all exposed destinations by credential idprotected org.springframework.web.client.RestTemplategetRestTemplate(AbstractDestinationModel destinationModel) voidsetDestinationDao(DestinationDao<T> destinationDao) voidtestDestinationUrl(AbstractDestinationModel destinationModel) Testing the consumed destination urlprotected StringvalidateExposedDestinationUrl(String exposedDestinationUrl)
-
Constructor Details
-
DefaultDestinationService
public DefaultDestinationService()
-
-
Method Details
-
getDestinationsByChannel
@Deprecated(since="1905", forRemoval=true) public 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:DestinationServiceFind destinations for specific channel- Specified by:
getDestinationsByChannelin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
channel- the channel of the destination- Returns:
- List of destinations for the given channel
-
getDestinationsByDestinationTargetId
Description copied from interface:DestinationServiceFind destinations for specific destinationTarget- Specified by:
getDestinationsByDestinationTargetIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
destinationTargetId- the id of the DestinationTarget- Returns:
- List of destinations for the given DestinationTarget
-
getActiveExposedDestinationsByClientId
Description copied from interface:DestinationServiceFind the list of active destinations for specific clientId- Specified by:
getActiveExposedDestinationsByClientIdin 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 List<ExposedDestinationModel> getActiveExposedDestinationsByChannel(DestinationChannel channel) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DestinationServiceFind the list of destinations for specific channel- Specified by:
getActiveExposedDestinationsByChannelin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
channel- The channel assigned to Destinations- Returns:
- a List of Destinations by the credential
-
getActiveExposedDestinationsByDestinationTargetId
public List<ExposedDestinationModel> getActiveExposedDestinationsByDestinationTargetId(String destinationTargetId) Description copied from interface:DestinationServiceGet the list of active exposed destinations for a specific destination target- Specified by:
getActiveExposedDestinationsByDestinationTargetIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
destinationTargetId- id of the destination target- Returns:
- a list of exposed destinations
-
getDestinationByIdAndByDestinationTargetId
public AbstractDestinationModel getDestinationByIdAndByDestinationTargetId(String destinationId, String destinationTargetId) Description copied from interface:DestinationServiceGet the destination for a specific destination and a specific destination id- Specified by:
getDestinationByIdAndByDestinationTargetIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
destinationId- id of the destinationdestinationTargetId- id of the destination target- Returns:
- a destination
-
getDestinationById
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DestinationServiceSince 1905, the id attribute of the destination is not unique, therefore, this gets the first item of the destinations for specific id.- Specified by:
getDestinationByIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
id- the id of the destination- Returns:
- The destination for the given id
-
getAllDestinations
Description copied from interface:DestinationServiceGet all destinations- Specified by:
getAllDestinationsin interfaceDestinationService<T extends AbstractDestinationModel>- Returns:
- the list of destinations
-
testDestinationUrl
public void testDestinationUrl(AbstractDestinationModel destinationModel) throws DestinationNotFoundException Description copied from interface:DestinationServiceTesting the consumed destination url- Specified by:
testDestinationUrlin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
destinationModel- given consumedDestination model or exposedDestination model- Throws:
DestinationNotFoundException- will be thrown in case of any exception during testing the consumed destination url
-
getDestinationDao
-
setDestinationDao
-
getAllConsumedDestinations
Description copied from interface:DestinationServiceGet all consumed destinations- Specified by:
getAllConsumedDestinationsin interfaceDestinationService<T extends AbstractDestinationModel>- Returns:
- the list of consumed destinations
-
getRestTemplate
protected org.springframework.web.client.RestTemplate getRestTemplate(AbstractDestinationModel destinationModel) throws CredentialException - Throws:
CredentialException
-
validateExposedDestinationUrl
-
getExposedDestinationsByCredentialId
Description copied from interface:DestinationServiceGet all exposed destinations by credential id- Specified by:
getExposedDestinationsByCredentialIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
credentialId- id of the credential- Returns:
- the list of exposed destinations
-
getAllDestinationsByCredentialId
Description copied from interface:DestinationServiceGet allDestinationModels by credential id- Specified by:
getAllDestinationsByCredentialIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
credentialId- id ofAbstractCredentialModel- Returns:
- list of destinations
-
getDeletableCredentialsByDestinationTargetId
public Set<AbstractCredentialModel> getDeletableCredentialsByDestinationTargetId(String destinationTargetId) Description copied from interface:DestinationServiceGet all credentials that can be deleted A credential can be deleted means it is consumed by one destination or multiple destinations with same destination target- Specified by:
getDeletableCredentialsByDestinationTargetIdin interfaceDestinationService<T extends AbstractDestinationModel>- Parameters:
destinationTargetId- id ofDestinationTargetModel- Returns:
- set of
AbstractCredentialModel
-