@ParametersAreNonnullByDefault public interface MetadataRepository
The motivation for this API is to provide fast access to the repository metadata and fulltext search. Also dependencies are stored in this repository.
The methods here do not update the artifacts itself. They are only updating the data in the metadata repository. That means, if you want to update some artifact, you should make sure to update the artifact itself and the metadata repository (either directly or by repository scanning).
Currently we are providing JCR, File based and Cassandra as backend for the metadata.
The metadata repository uses sessions for accessing the data. Please make sure to always close the sessions after using it.
Best idiom for using the sessions:
try(RepositorySession session = sessionFactory.createSession() {
// do your stuff
}
It is implementation dependent, if the sessions are really used by the backend. E.g. the file based implementation ignores the sessions completely.
Sessions should be closed immediately after usage. If it is expensive to open a session for a given backend. The backend should provide a session pool if possible. There are methods for refreshing a session if needed.
You should avoid stacking sessions, which means, you should not create a new session in the same thread, when a session is opened already.
Some backend implementations (JCR) update the metadata in the background, that means update of the metadata is not reflected immediately.
The base metadata coordinates are:
As the repository connects to some backend either locally or remote, the access to the repository may fail. The methods capsule the
backend errors into
.
MetadataRepositoryException
Facets are the way to provide additional metadata that is not part of the base API. It depends on the repository type (e.g. Maven, NPM,
not the metadata backend) what facets are stored in addition to the standard metadata.
Facets have a specific facet ID that represents the schema for the data stored. For creating specific objects for a given
facet id the
is used.
For each facet id there may exist multiple facet instances on each level. Facet instances are identified by their name, which may be
a hierarchical path.
The data in each facet instance is stored in properties (key-value pairs). The properties are converted into / from the specific
facet object.
MetadataFacetFactory
Facets can be stored on repository, project, version and artifact level.
For retrieving artifacts there are methods that return lists and streaming based methods. Some implementations (e.g. JCR) use lazy loading for the retrieved objects. So the streaming methods may be faster and use less memory than the list based methods. But for some backends there is no difference.
Modifier and Type | Method and Description |
---|---|
void |
addMetadataFacet(RepositorySession session,
String repositoryId,
MetadataFacet metadataFacet)
Adds a facet to the repository level.
|
void |
close()
Closes the repository.
|
Stream<ArtifactMetadata> |
getArtifactByDateRangeStream(RepositorySession session,
String repositoryId,
ZonedDateTime startTime,
ZonedDateTime endTime)
Returns all the artifacts who's 'whenGathered' attribute value is inside the given time range (inclusive) as stream of objects.
|
Stream<ArtifactMetadata> |
getArtifactByDateRangeStream(RepositorySession session,
String repositoryId,
ZonedDateTime startTime,
ZonedDateTime endTime,
QueryParameter queryParameter)
Returns all the artifacts who's 'whenGathered' attribute value is inside the given time range (inclusive) as stream of objects.
|
List<ArtifactMetadata> |
getArtifacts(RepositorySession session,
String repositoryId)
Returns the metadata for all artifacts of the given repository.
|
List<ArtifactMetadata> |
getArtifacts(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Returns the metadata of all artifacts stored for the given project version.
|
List<ArtifactMetadata> |
getArtifactsByAttribute(RepositorySession session,
String key,
String value,
String repositoryId)
Get artifacts with an artifact metadata key that matches the passed value.
|
List<ArtifactMetadata> |
getArtifactsByChecksum(RepositorySession session,
String repositoryId,
String checksum)
Returns the artifacts that match the given checksum.
|
List<ArtifactMetadata> |
getArtifactsByDateRange(RepositorySession session,
String repositoryId,
ZonedDateTime startTime,
ZonedDateTime endTime)
Is the same as
getArtifactsByDateRange(RepositorySession, String, ZonedDateTime, ZonedDateTime, QueryParameter) , but
uses default query parameters. |
List<ArtifactMetadata> |
getArtifactsByDateRange(RepositorySession session,
String repositoryId,
ZonedDateTime startTime,
ZonedDateTime endTime,
QueryParameter queryParameter)
Searches for artifacts where the 'whenGathered' attribute value is between the given start and end time.
|
List<ArtifactMetadata> |
getArtifactsByProjectVersionAttribute(RepositorySession session,
String key,
String value,
String repositoryId)
Get artifacts with a attribute on project version level that matches the passed value.
|
List<ArtifactMetadata> |
getArtifactsByProjectVersionFacet(RepositorySession session,
String key,
String value,
String repositoryId)
Get artifacts with a project version metadata key that matches the passed value.
|
Stream<ArtifactMetadata> |
getArtifactStream(RepositorySession session,
String repositoryId)
Returns a stream of all the artifacts in the given repository using default query parameter.
|
Stream<ArtifactMetadata> |
getArtifactStream(RepositorySession session,
String repositoryId,
QueryParameter queryParameter)
Returns a stream of artifacts that are stored in the given repository.
|
Stream<ArtifactMetadata> |
getArtifactStream(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Returns a stream of artifacts found for the given artifact coordinates.
|
Stream<ArtifactMetadata> |
getArtifactStream(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion,
QueryParameter queryParameter)
Returns a stream of artifacts found for the given artifact coordinates and using the
queryParameter |
List<String> |
getArtifactVersions(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Returns all artifact version strings for a given project version.
|
List<String> |
getChildNamespaces(RepositorySession session,
String repoId,
String namespace)
Returns the list of namespace names that are children of the given namespace.
|
<T extends MetadataFacet> |
getMetadataFacet(RepositorySession session,
String repositoryId,
Class<T> clazz,
String name)
Returns the facet instance for the given class, which is stored on repository level for the given name.
|
MetadataFacet |
getMetadataFacet(RepositorySession session,
String repositoryId,
String facetId,
String name)
Returns the facet data stored on the repository level.
|
List<String> |
getMetadataFacets(RepositorySession session,
String repositoryId,
String facetId)
Return the facet names stored for the given facet id on the repository level.
|
<T extends MetadataFacet> |
getMetadataFacetStream(RepositorySession session,
String repositoryId,
Class<T> facetClazz)
The same as
getMetadataFacetStream(RepositorySession, String, Class, QueryParameter)
but uses default query parameters. |
<T extends MetadataFacet> |
getMetadataFacetStream(RepositorySession session,
String repositoryId,
Class<T> facetClazz,
QueryParameter queryParameter)
Returns a stream of MetadataFacet elements that match the given facet class.
|
ProjectMetadata |
getProject(RepositorySession session,
String repoId,
String namespace,
String projectId)
Returns the metadata for the given project.
|
List<ProjectVersionReference> |
getProjectReferences(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Retrieve project references from the metadata repository.
|
List<String> |
getProjects(RepositorySession session,
String repoId,
String namespace)
Return the project names that of all projects stored under the given namespace.
|
ProjectVersionMetadata |
getProjectVersion(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Returns the metadata for the project version.
|
List<String> |
getProjectVersions(RepositorySession session,
String repoId,
String namespace,
String projectId)
Returns the names of all versions stored under the given project.
|
List<String> |
getRootNamespaces(RepositorySession session,
String repoId)
Returns the names of the root namespaces stored for this repository.
|
boolean |
hasMetadataFacet(RepositorySession session,
String repositoryId,
String facetId)
Returns true, if there is facet data stored for the given facet id on the repository on repository level.
|
void |
removeArtifact(RepositorySession session,
String repositoryId,
String namespace,
String project,
String version,
String id)
Removes the data for the artifact with the given coordinates from the metadata repository.
|
void |
removeFacetFromArtifact(RepositorySession session,
String repositoryId,
String namespace,
String project,
String version,
MetadataFacet metadataFacet)
FIXME need a unit test!!!
|
void |
removeMetadataFacet(RepositorySession session,
String repositoryId,
String facetId,
String name)
Removes the given facet from the repository level, if it exists.
|
void |
removeMetadataFacets(RepositorySession session,
String repositoryId,
String facetId)
Removes all facets with the given facetId from the repository level.
|
void |
removeNamespace(RepositorySession session,
String repositoryId,
String namespace)
Removes the given namespace and its contents from the metadata repository.
|
void |
removeProject(RepositorySession session,
String repositoryId,
String namespace,
String projectId)
Removes the project metadata and metadata for all stored versions, artifacts and facets of this project.
|
void |
removeProjectVersion(RepositorySession session,
String repoId,
String namespace,
String projectId,
String projectVersion)
Removes a project version and all its artifact and facet metadata under it.
|
void |
removeRepository(RepositorySession session,
String repositoryId)
Deletes all metadata of the given repository.
|
void |
removeTimestampedArtifact(RepositorySession session,
ArtifactMetadata artifactMetadata,
String baseVersion)
Remove timestamped version of artifact.
|
List<ArtifactMetadata> |
searchArtifacts(RepositorySession session,
String repositoryId,
String text,
boolean exact)
Full text artifacts search.
|
List<ArtifactMetadata> |
searchArtifacts(RepositorySession session,
String repositoryId,
String key,
String text,
boolean exact)
Full text artifacts search inside the specified key.
|
void |
updateArtifact(RepositorySession session,
String repositoryId,
String namespace,
String projectId,
String projectVersion,
ArtifactMetadata artifactMeta)
Update the metadata of a given artifact.
|
void |
updateNamespace(RepositorySession session,
String repositoryId,
String namespace)
Create the namespace in the repository, if it does not exist.
|
void |
updateProject(RepositorySession session,
String repositoryId,
ProjectMetadata project)
Update metadata for a particular project in the metadata repository, or create it, if it does not already exist.
|
void |
updateProjectVersion(RepositorySession session,
String repositoryId,
String namespace,
String projectId,
ProjectVersionMetadata versionMetadata)
Updates the metadata for a specific version of a given project.
|
void updateProject(RepositorySession session, String repositoryId, ProjectMetadata project) throws MetadataRepositoryException
session
- The session used for updating.repositoryId
- the repository the project is inproject
- the project metadata to create or updateMetadataRepositoryException
- if the update failsvoid updateArtifact(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion, ArtifactMetadata artifactMeta) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idnamespace
- The namespace ('.' separated)projectId
- The project idprojectVersion
- The project versionartifactMeta
- Information about the artifact itself.MetadataRepositoryException
- if something goes wrong during update.void updateProjectVersion(RepositorySession session, String repositoryId, String namespace, String projectId, ProjectVersionMetadata versionMetadata) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idnamespace
- The namespace ('.' separated)projectId
- The project idversionMetadata
- The metadata for the versionMetadataRepositoryException
- if something goes wrong during updatevoid updateNamespace(RepositorySession session, String repositoryId, String namespace) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idnamespace
- The namespace ('.' separated)MetadataRepositoryException
- if something goes wrong during updateList<String> getMetadataFacets(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idfacetId
- The facet idMetadataRepositoryException
- if something goes wrong<T extends MetadataFacet> Stream<T> getMetadataFacetStream(RepositorySession session, String repositoryId, Class<T> facetClazz) throws MetadataRepositoryException
getMetadataFacetStream(RepositorySession, String, Class, QueryParameter)
but uses default query parameters.
There is no limitation of the number of result objects returned, but implementations may have a hard upper bound for the number of results.
T
- The facet typesession
- The repository session.repositoryId
- The repository id.facetClazz
- The facet classMetadataRepositoryException
- if the facet retrieval fails.<T extends MetadataFacet> Stream<T> getMetadataFacetStream(RepositorySession session, String repositoryId, Class<T> facetClazz, QueryParameter queryParameter) throws MetadataRepositoryException
T
- The facet typesession
- The repository sessionrepositoryId
- The repository idfacetClazz
- The class of the facetMetadataRepositoryException
- if the facet retrieval failsboolean hasMetadataFacet(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idfacetId
- The facet idMetadataRepositoryException
- if something goes wrongMetadataFacet getMetadataFacet(RepositorySession session, String repositoryId, String facetId, String name) throws MetadataRepositoryException
MetadataFacetFactory
.session
- The repository sessionrepositoryId
- The repository idfacetId
- The facet idname
- The attribute nameMetadataRepositoryException
- if something goes wrong.<T extends MetadataFacet> T getMetadataFacet(RepositorySession session, String repositoryId, Class<T> clazz, String name) throws MetadataRepositoryException
null
will be returned.
If the facet is not found the method returns null
.T
- The type of the facet objectsession
- The repository sessionrepositoryId
- The id of the repositoryclazz
- The facet object classname
- The name of the facet (name or path)MetadataRepositoryException
- if the data cannot be retrieved from the backendvoid addMetadataFacet(RepositorySession session, String repositoryId, MetadataFacet metadataFacet) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The id of the repositorymetadataFacet
- The facet to addMetadataRepositoryException
- if the facet cannot be stored.void removeMetadataFacets(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The id of the repositoryfacetId
- The facet idMetadataRepositoryException
- if the removal failsvoid removeMetadataFacet(RepositorySession session, String repositoryId, String facetId, String name) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The id of the repositoryfacetId
- The facet idname
- The facet name or pathMetadataRepositoryException
List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repositoryId, @Nullable ZonedDateTime startTime, @Nullable ZonedDateTime endTime) throws MetadataRepositoryException
getArtifactsByDateRange(RepositorySession, String, ZonedDateTime, ZonedDateTime, QueryParameter)
, but
uses default query parameters.MetadataRepositoryException
List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repositoryId, @Nullable ZonedDateTime startTime, @Nullable ZonedDateTime endTime, QueryParameter queryParameter) throws MetadataRepositoryException
null
, the time range for the search is unbounded for this parameter.session
- The repository sessionrepositoryId
- The repository idstartTime
- The start time/date as zoned date, can be null
endTime
- The end time/date as zoned date, can be null
queryParameter
- Additional parameters for the query that affect ordering and returned resultsMetadataRepositoryException
- if the query fails.Stream<ArtifactMetadata> getArtifactByDateRangeStream(RepositorySession session, String repositoryId, @Nullable ZonedDateTime startTime, @Nullable ZonedDateTime endTime) throws MetadataRepositoryException
Implementations should return a stream of sorted objects. The objects should be sorted by the 'whenGathered' date in ascending order.
session
- The repository sessionrepositoryId
- The repository idstartTime
- The start time, can be null
endTime
- The end time, can be null
MetadataRepositoryException
- if the artifact retrieval fails.Stream<ArtifactMetadata> getArtifactByDateRangeStream(RepositorySession session, String repositoryId, @Nullable ZonedDateTime startTime, @Nullable ZonedDateTime endTime, QueryParameter queryParameter) throws MetadataRepositoryException
If no sort attributes are given by the queryParameter, the result is sorted by the 'whenGathered' date.
session
- The repository sessionrepositoryId
- The repository idstartTime
- The start time, can be null
endTime
- The end time, can be null
queryParameter
- Additional parameters for the query that affect ordering and number of returned results.MetadataRepositoryException
- if the artifact retrieval fails.List<ArtifactMetadata> getArtifactsByChecksum(RepositorySession session, String repositoryId, String checksum) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idchecksum
- The checksum as string of numbersMetadataRepositoryException
- if the artifact retrieval failsList<ArtifactMetadata> getArtifactsByProjectVersionFacet(RepositorySession session, String key, String value, @Nullable String repositoryId) throws MetadataRepositoryException
session
- The repository sessionkey
- The attribute key to searchvalue
- The attribute value used for searchrepositoryId
- can be null
, meaning search in all repositoriesMetadataRepositoryException
- if the artifact retrieval fails.List<ArtifactMetadata> getArtifactsByAttribute(RepositorySession session, String key, String value, @Nullable String repositoryId) throws MetadataRepositoryException
key
ist the string representation of one of the metadata attributes. Only artifacts are returned where
the attribute value matches exactly the given search value.session
- The repository session.key
- The string representation of the artifact metadata attribute.value
- The search value.repositoryId
- can be null
, meaning search in all repositoriesMetadataRepositoryException
- if the artifact retrieval fails.List<ArtifactMetadata> getArtifactsByProjectVersionAttribute(RepositorySession session, String key, String value, @Nullable String repositoryId) throws MetadataRepositoryException
session
- the repository session.key
- The name of the attribute (may be nested like scm.url, mailinglist.0.name)value
- The value to search forrepositoryId
- can be null
, which means to search in all repositoriesMetadataRepositoryException
- if the artifact retrieval failsvoid removeArtifact(RepositorySession session, String repositoryId, String namespace, String project, String version, String id) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idnamespace
- The namespace of the projectproject
- The project nameversion
- The project versionid
- The artifact idMetadataRepositoryException
- if the artifact retrieval fails, or if the artifact cannot be found.void removeTimestampedArtifact(RepositorySession session, ArtifactMetadata artifactMetadata, String baseVersion) throws MetadataRepositoryException
session
- The repository sessionartifactMetadata
- the artifactMetadata with the timestamped version (2.0-20120618.214135-2)baseVersion
- the base version of the snapshot (2.0-SNAPSHOT)MetadataRepositoryException
- if the removal fails.void removeFacetFromArtifact(RepositorySession session, String repositoryId, String namespace, String project, String version, MetadataFacet metadataFacet) throws MetadataRepositoryException
MetadataFacet
of the given artifact.session
- The repository sessionrepositoryId
- The repository id.namespace
- The namespaceproject
- The project nameversion
- The project versionmetadataFacet
- The facet dataMetadataRepositoryException
- if the removal failedvoid removeRepository(RepositorySession session, String repositoryId) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- the repository to deleteMetadataRepositoryException
- if the removal failedvoid removeNamespace(RepositorySession session, String repositoryId, String namespace) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idnamespace
- The namespace '.' separated ( it's the groupId for maven )MetadataRepositoryException
- if the removal failedList<ArtifactMetadata> getArtifacts(RepositorySession session, String repositoryId) throws MetadataRepositoryException
session
- The repository sessionrepositoryId
- The repository idMetadataRepositoryException
- if the retrieval failed.Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repositoryId, QueryParameter queryParameter) throws MetadataResolutionException
queryParameter
.
The efficiency of ordering of elements is dependent on the implementation.
There may be some implementations that have to put a hard limit on the elements returned.
If there are no sortFields
defined in the query parameter, the order of elements in the stream is undefined and depends
on the implementation.session
- The repository session.repositoryId
- The repository id.MetadataResolutionException
Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repositoryId) throws MetadataResolutionException
getArtifactStream(RepositorySession, String, QueryParameter)
session
- The repository sessionrepositoryId
- The repository idMetadataResolutionException
getArtifactStream(RepositorySession, String, QueryParameter)
Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion, QueryParameter queryParameter) throws MetadataResolutionException
queryParameter
session
- The repository session. May not be null
.repoId
- The repository id. May not be null
.namespace
- The namespace. May not be null
.projectId
- The project id. May not be null
.projectVersion
- The project version. May not be null
.queryParameter
.MetadataResolutionException
- if there are no elements for the given artifact coordinates.Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
session
- The repository session. May not be null
.repoId
- The repository id. May not be null
.namespace
- The namespace. May not be null
.projectId
- The project id. May not be null
.projectVersion
- The project version. May not be null
.queryParameter
.MetadataResolutionException
- if there are no elements for the given artifact coordinates.ProjectMetadata getProject(RepositorySession session, String repoId, String namespace, String projectId) throws MetadataResolutionException
ProjectMetadata
object with the data provided by parameters.session
- The session idrepoId
- The repository idnamespace
- The namespace '.'-separated.projectId
- The project namenull
if not found.MetadataResolutionException
- if the metadata retrieval failedProjectVersionMetadata getProjectVersion(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separatedprojectId
- The project nameprojectVersion
- The project versionnull
, if not found.MetadataResolutionException
- if the retrieval of the metadata failed.List<String> getArtifactVersions(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separatedprojectId
- The project name.projectVersion
- The project version.MetadataResolutionException
- if the retrieval of the metadata failed.List<ProjectVersionReference> getProjectReferences(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
session
- The repository session.repoId
- The repository ID to look withinnamespace
- The namespace of the project to get references toprojectId
- The identifier of the project to get references toprojectVersion
- The version of the project to get references toMetadataResolutionException
- if the version could not be found.List<String> getRootNamespaces(RepositorySession session, String repoId) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.MetadataResolutionException
- If the retrieval failed.List<String> getChildNamespaces(RepositorySession session, String repoId, String namespace) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The parent namespace '.'-separated.List
of child namespace names, or a empty list, if there are no children for the given parent namespace.MetadataResolutionException
- if the retrieval failed.List<String> getProjects(RepositorySession session, String repoId, String namespace) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separated.MetadataResolutionException
- if the retrieval failed.List<String> getProjectVersions(RepositorySession session, String repoId, String namespace, String projectId) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separated.projectId
- The project name.MetadataResolutionException
- if the retrieval failed.void removeProjectVersion(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataRepositoryException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separated.projectId
- The project nameprojectVersion
- The project version.MetadataRepositoryException
- if the removal failed.List<ArtifactMetadata> getArtifacts(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
session
- The repository session.repoId
- The repository id.namespace
- The namespace '.'-separated.projectId
- The project name.projectVersion
- The project version.MetadataResolutionException
- if the retrieval failed.void removeProject(RepositorySession session, String repositoryId, String namespace, String projectId) throws MetadataRepositoryException
session
- The repository session.repositoryId
- The repository id.namespace
- The namespace '.'-separated.projectId
- The project name.MetadataRepositoryException
- if the removal failed.void close() throws MetadataRepositoryException
MetadataRepositoryException
- if the something went wrong or if the repository was closed already.List<ArtifactMetadata> searchArtifacts(RepositorySession session, String repositoryId, String text, boolean exact) throws MetadataRepositoryException
session
- The repository session.repositoryId
- can be null
to search in all repositoriestext
- The search textexact
- if true, the value must exactly match the text.MetadataRepositoryException
- if the retrieval failed.List<ArtifactMetadata> searchArtifacts(RepositorySession session, String repositoryId, String key, String text, boolean exact) throws MetadataRepositoryException
session
- The repository session.repositoryId
- can be null
to search in all repositorieskey
- search only inside this attribute.text
- The search string.exact
- if true, the value must exactly match the text.MetadataRepositoryException
- if the retrieval failed.Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.