org.artifactory.search
Interface Searches


public interface Searches

Public API for executing searches

Author:
Yoav Landman

Method Summary
 List<RepoPath> archiveEntriesByName(String query, String... repositories)
          Search the content of jar/zip archives
 List<RepoPath> artifactsByGavc(String groupId, String artifactId, String version, String classifier, String... repositories)
           
 List<RepoPath> artifactsByName(String query, String... repositories)
          Find artifacts by name
 Set<RepoPath> artifactsBySha1(String sha1, String... repositories)
          Find artifacts by their checksum values
 List<RepoPath> artifactsCreatedOrModifiedInRange(Calendar from, Calendar to, String... repositories)
          Find artifacts created or modified within a date range
 List<RepoPath> artifactsNotDownloadedSince(Calendar since, Calendar createdBefore, String... repositories)
          Find artifacts not downloaded since the specified date
 List<BuildRun> buildsByArtifactSha1(String sha1)
          Find all build runs that produced the artifact with the provided sha1 checksum
 List<BuildRun> buildsByDependencySha1(String sha1)
          Find all build runs that used a dependency with the provided sha1 checksum
 List<RepoPath> itemsByProperties(com.google.common.collect.SetMultimap<String,String> properties, String... repositories)
          Find artifacts by properties
 

Method Detail

artifactsByName

List<RepoPath> artifactsByName(String query,
                               String... repositories)
Find artifacts by name

Parameters:
query - The search query term for the artifact name
repositories - A list of repositories to search in. Can be null to search all repositories
Returns:
Artifacts found by the search, empty list if nothing was found

itemsByProperties

List<RepoPath> itemsByProperties(com.google.common.collect.SetMultimap<String,String> properties,
                                 String... repositories)
Find artifacts by properties

Parameters:
properties - A set of key-value properties to search for on artifacts or folders. All specified properties need to exist on found items. If multiple values are used a contains() semantic is applied
repositories - A list of repositories to search in. Can be null to search all repositories.
Returns:
Artifacts matching the criteria

archiveEntriesByName

List<RepoPath> archiveEntriesByName(String query,
                                    String... repositories)
Search the content of jar/zip archives

Parameters:
query - The search term for the archive of the entry
repositories - A list of repositories to search in. Can be null to search all repositories.
Returns:
List of zip resources repo path matching the criteria

artifactsByGavc

List<RepoPath> artifactsByGavc(@Nullable
                               String groupId,
                               @Nullable
                               String artifactId,
                               @Nullable
                               String version,
                               @Nullable
                               String classifier,
                               String... repositories)

artifactsBySha1

Set<RepoPath> artifactsBySha1(String sha1,
                              String... repositories)
Find artifacts by their checksum values

Parameters:
sha1 - The sha1 checksum of the artifact
repositories - A list of repositories to search in. Can be null to search all repositories
Returns:
Set of repo paths that comply with the given checksums

artifactsCreatedOrModifiedInRange

List<RepoPath> artifactsCreatedOrModifiedInRange(@Nullable
                                                 Calendar from,
                                                 @Nullable
                                                 Calendar to,
                                                 String... repositories)
Find artifacts created or modified within a date range

Parameters:
from - The time to start the search exclusive (eg, >). If empty will start from 1st Jan 1970
to - The time to end search inclusive (eg, <=), If null, will not use current time as the limit
repositories - A list of repositories to search in. Can be null to search all repositories.
Returns:
List of file repo paths that were created or modified between the input time range and the date the file was modified.

artifactsNotDownloadedSince

List<RepoPath> artifactsNotDownloadedSince(@Nullable
                                           Calendar since,
                                           @Nullable
                                           Calendar createdBefore,
                                           String... repositories)
Find artifacts not downloaded since the specified date

Parameters:
since - The time to start the search exclusive (eg, >). If null will start from 1st Jan 1970
createdBefore - Only include artifacts created before the specified time. If null will default to the value of since.
repositories - A list of repositories to search in. Can be null to search all repositories
Returns:
List of file repo paths that were not downloaded since the specified date

buildsByArtifactSha1

List<BuildRun> buildsByArtifactSha1(String sha1)
Find all build runs that produced the artifact with the provided sha1 checksum

Parameters:
sha1 - The sha1 cheksum of the build dependency to search
Returns:
A list of BuildRuns (may be empty)

buildsByDependencySha1

List<BuildRun> buildsByDependencySha1(String sha1)
Find all build runs that used a dependency with the provided sha1 checksum

Parameters:
sha1 - The sha1 cheksum of the build dependency to search
Returns:
A list of BuildRuns (may be empty)


Copyright © 2012. All Rights Reserved.