Package org.commonjava.indy.data
Interface ArtifactStoreQuery<T extends org.commonjava.indy.model.core.ArtifactStore>
-
- All Known Implementing Classes:
DelegatingArtifactStoreQuery
public interface ArtifactStoreQuery<T extends org.commonjava.indy.model.core.ArtifactStore>This query interface is intended to be reusable across anyStoreDataManagerimplementation. It contains logic for working with theArtifactStores contained in the StoreDataManager, but this logic is not tied directly to any data manager implementation. Separating these methods out and providing a singleStoreDataManager.query()method to provide access to an instance of this class drastically simplifies the task of implementing a new type of data manager.This class is intended to function as a fluent api. It does keep state on packageType, storeType(s), and enabled / disabled selection. However, methods that pertain to specific types of ArtifactStore (indicated by their names) DO NOT change the internal state of the query instance on which they are called.
Created by jdcasey on 5/10/17.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description ArtifactStoreQuery<T>concreteStores()ArtifactStoreQuery<T>enabledState(Boolean enabled)List<T>getAll()List<T>getAll(java.util.function.Predicate<org.commonjava.indy.model.core.ArtifactStore> filter)Deprecated.List<T>getAllByDefaultPackageTypes()List<org.commonjava.indy.model.core.Group>getAllGroups(String packageType)List<org.commonjava.indy.model.core.Group>getAllGroups(String packageType, Boolean enabled)List<org.commonjava.indy.model.core.HostedRepository>getAllHostedRepositories(String packageType)List<org.commonjava.indy.model.core.HostedRepository>getAllHostedRepositories(String packageType, Boolean enabled)List<org.commonjava.indy.model.core.RemoteRepository>getAllRemoteRepositories(String packageType)List<org.commonjava.indy.model.core.RemoteRepository>getAllRemoteRepositories(String packageType, Boolean enabled)TgetByName(String name)org.commonjava.indy.model.core.GroupgetGroup(String packageType, String name)Set<org.commonjava.indy.model.core.Group>getGroupsAffectedBy(Collection<org.commonjava.indy.model.core.StoreKey> keys)Set<org.commonjava.indy.model.core.Group>getGroupsAffectedBy(org.commonjava.indy.model.core.StoreKey... keys)Set<org.commonjava.indy.model.core.Group>getGroupsContaining(org.commonjava.indy.model.core.StoreKey storeKey)Set<org.commonjava.indy.model.core.Group>getGroupsContaining(org.commonjava.indy.model.core.StoreKey storeKey, Boolean enabled)org.commonjava.indy.model.core.HostedRepositorygetHostedRepository(String packageType, String name)List<org.commonjava.indy.model.core.ArtifactStore>getOrderedConcreteStoresInGroup(String packageType, String groupName)List<org.commonjava.indy.model.core.ArtifactStore>getOrderedConcreteStoresInGroup(String packageType, String groupName, Boolean enabled)List<org.commonjava.indy.model.core.ArtifactStore>getOrderedStoresInGroup(String packageType, String groupName)List<org.commonjava.indy.model.core.ArtifactStore>getOrderedStoresInGroup(String packageType, String groupName, Boolean enabled)org.commonjava.indy.model.core.RemoteRepositorygetRemoteRepository(String packageType, String name)List<org.commonjava.indy.model.core.RemoteRepository>getRemoteRepositoryByUrl(String packageType, String url)List<org.commonjava.indy.model.core.RemoteRepository>getRemoteRepositoryByUrl(String packageType, String url, Boolean enabled)ArtifactStoreQuery<T>noPackageType()<C extends org.commonjava.indy.model.core.ArtifactStore>
ArtifactStoreQuery<C>storeType(Class<C> storeCls)ArtifactStoreQuery<T>storeTypes(org.commonjava.indy.model.core.StoreType... types)
-
-
-
Method Detail
-
storeType
<C extends org.commonjava.indy.model.core.ArtifactStore> ArtifactStoreQuery<C> storeType(Class<C> storeCls)
-
storeTypes
ArtifactStoreQuery<T> storeTypes(org.commonjava.indy.model.core.StoreType... types)
-
concreteStores
ArtifactStoreQuery<T> concreteStores()
-
enabledState
ArtifactStoreQuery<T> enabledState(Boolean enabled)
-
getAll
List<T> getAll() throws IndyDataException
- Throws:
IndyDataException
-
getAll
@Deprecated List<T> getAll(java.util.function.Predicate<org.commonjava.indy.model.core.ArtifactStore> filter) throws IndyDataException
Deprecated.- Throws:
IndyDataException
-
getAllByDefaultPackageTypes
List<T> getAllByDefaultPackageTypes() throws IndyDataException
- Throws:
IndyDataException
-
getByName
T getByName(String name) throws IndyDataException
- Throws:
IndyDataException
-
getGroupsContaining
Set<org.commonjava.indy.model.core.Group> getGroupsContaining(org.commonjava.indy.model.core.StoreKey storeKey) throws IndyDataException
- Throws:
IndyDataException
-
getGroupsContaining
Set<org.commonjava.indy.model.core.Group> getGroupsContaining(org.commonjava.indy.model.core.StoreKey storeKey, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getRemoteRepositoryByUrl
List<org.commonjava.indy.model.core.RemoteRepository> getRemoteRepositoryByUrl(String packageType, String url) throws IndyDataException
- Throws:
IndyDataException
-
getRemoteRepositoryByUrl
List<org.commonjava.indy.model.core.RemoteRepository> getRemoteRepositoryByUrl(String packageType, String url, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getOrderedConcreteStoresInGroup
List<org.commonjava.indy.model.core.ArtifactStore> getOrderedConcreteStoresInGroup(String packageType, String groupName) throws IndyDataException
- Throws:
IndyDataException
-
getOrderedConcreteStoresInGroup
List<org.commonjava.indy.model.core.ArtifactStore> getOrderedConcreteStoresInGroup(String packageType, String groupName, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getOrderedStoresInGroup
List<org.commonjava.indy.model.core.ArtifactStore> getOrderedStoresInGroup(String packageType, String groupName) throws IndyDataException
- Throws:
IndyDataException
-
getOrderedStoresInGroup
List<org.commonjava.indy.model.core.ArtifactStore> getOrderedStoresInGroup(String packageType, String groupName, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getGroupsAffectedBy
Set<org.commonjava.indy.model.core.Group> getGroupsAffectedBy(org.commonjava.indy.model.core.StoreKey... keys) throws IndyDataException
- Throws:
IndyDataException
-
getGroupsAffectedBy
Set<org.commonjava.indy.model.core.Group> getGroupsAffectedBy(Collection<org.commonjava.indy.model.core.StoreKey> keys) throws IndyDataException
- Throws:
IndyDataException
-
getRemoteRepository
org.commonjava.indy.model.core.RemoteRepository getRemoteRepository(String packageType, String name) throws IndyDataException
- Throws:
IndyDataException
-
getHostedRepository
org.commonjava.indy.model.core.HostedRepository getHostedRepository(String packageType, String name) throws IndyDataException
- Throws:
IndyDataException
-
getGroup
org.commonjava.indy.model.core.Group getGroup(String packageType, String name) throws IndyDataException
- Throws:
IndyDataException
-
noPackageType
ArtifactStoreQuery<T> noPackageType()
-
getAllRemoteRepositories
List<org.commonjava.indy.model.core.RemoteRepository> getAllRemoteRepositories(String packageType) throws IndyDataException
- Throws:
IndyDataException
-
getAllRemoteRepositories
List<org.commonjava.indy.model.core.RemoteRepository> getAllRemoteRepositories(String packageType, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getAllHostedRepositories
List<org.commonjava.indy.model.core.HostedRepository> getAllHostedRepositories(String packageType) throws IndyDataException
- Throws:
IndyDataException
-
getAllHostedRepositories
List<org.commonjava.indy.model.core.HostedRepository> getAllHostedRepositories(String packageType, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
getAllGroups
List<org.commonjava.indy.model.core.Group> getAllGroups(String packageType) throws IndyDataException
- Throws:
IndyDataException
-
getAllGroups
List<org.commonjava.indy.model.core.Group> getAllGroups(String packageType, Boolean enabled) throws IndyDataException
- Throws:
IndyDataException
-
-