All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atlassian.connect.spring.AtlassianHostRepository Maven / Gradle / Ivy

There is a newer version: 5.1.3
Show newest version
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 information about Atlassian hosts
 * in which the add-on is or has been installed.
 *
 * 

NOTE: A component implementing this interface is required for your application to start. Such a * component is typically obtained by * including the appropriate {@code @Enable${store}Repositories} annotation. * *

Spring Data JPA Support

* *

For using Spring Data JPA, instead of including the * {@code @EnableJpaRepositories} annotation yourself, include the following dependency on the companion Spring Boot * starter in your Maven POM, which additionally provides integration with * Liquibase and enables Spring Data auditing: *

 <dependency>
 *     <groupId>com.atlassian.connect</groupId>
 *     <artifactId>atlassian-connect-spring-boot-jpa-starter</artifactId>
 *     <version>${atlassian-connect-spring-boot.version}</version>
 * </dependency>
* * @since 1.0.0 */ public interface AtlassianHostRepository extends CrudRepository { /** * Returns the host with the given base URL. If multiple hosts are found, the most recently modified host is * returned. * * @param baseUrl the base URL of the host application * @return the host with the given base URL or {@link Optional#empty()} * @see AtlassianHost#getBaseUrl() * @deprecated No replacement. Look up by {@link AtlassianHost#getClientKey()} using {@link #findById} */ @Deprecated Optional findFirstByBaseUrlOrderByLastModifiedDateDesc(String baseUrl); /** * Returns the host with the given client key. * * @param clientKey the clientKey of the host * @return Optional<AtlassianHost> */ @NonNull Optional findById(@NonNull String clientKey); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy