com.atlassian.connect.spring.AtlassianHostMappingRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of atlassian-connect-spring-boot-api Show documentation
Show all versions of atlassian-connect-spring-boot-api Show documentation
Provides the API of Atlassian Connect for Spring Boot
package com.atlassian.connect.spring;
import org.springframework.data.repository.CrudRepository;
import org.springframework.lang.NonNull;
import java.util.Optional;
/**
* A Spring Data repository for
* associating the Forge installation identifier with the corresponding Connect addon data
*
* For guidance on configuring persistence for your application, see {@link AtlassianHostRepository}
*
* @since 4.1.0
*/
public interface AtlassianHostMappingRepository extends CrudRepository {
/**
* Delete all the mappings that are associated with a specific clientKey
*
* @param clientKey the associated client key
* @return the amount of mappings that were deleted
*/
long deleteByClientKey(String clientKey);
/**
* Find the AtlassianHostMapping that is associated with a specific installationId
*
* @param installationId the associated installationId
* @return the clientKey that is associated with the installationId
*/
@Override
@NonNull
Optional findById(@NonNull String installationId);
}