@ParametersAreNonnullByDefault public class JcrMetadataRepository extends AbstractMetadataRepository implements MetadataRepository, RepositoryStatisticsProvider
metadataService| Constructor and Description | 
|---|
| JcrMetadataRepository(MetadataService metadataService,
                     javax.jcr.Repository repository) | 
| 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,
                            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 repositoryId,
            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 repoId,
                       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,
                 QueryParameter queryParameter)Returns a stream of artifacts that are stored in the given repository. | 
| Stream<ArtifactMetadata> | getArtifactStream(RepositorySession session,
                 String repositoryId,
                 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 repositoryId,
                   String namespace,
                   String projectId,
                   String projectVersion)Returns all artifact version strings for a given project version. | 
| List<String> | getChildNamespaces(RepositorySession session,
                  String repositoryId,
                  String baseNamespace)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. | 
| 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,
                      QueryParameter queryParameter)Returns a stream of MetadataFacet elements that match the given facet class. | 
| ProjectMetadata | getProject(RepositorySession session,
          String repositoryId,
          String namespace,
          String projectId)Returns the metadata for the given project. | 
| List<ProjectVersionReference> | getProjectReferences(RepositorySession session,
                    String repositoryId,
                    String namespace,
                    String projectId,
                    String projectVersion)Retrieve project references from the metadata repository. | 
| List<String> | getProjects(RepositorySession session,
           String repositoryId,
           String namespace)Return the project names that of all projects stored under the given namespace. | 
| ProjectVersionMetadata | getProjectVersion(RepositorySession session,
                 String repositoryId,
                 String namespace,
                 String projectId,
                 String projectVersion)Returns the metadata for the project version. | 
| List<String> | getProjectVersions(RepositorySession session,
                  String repositoryId,
                  String namespace,
                  String projectId)Returns the names of all versions stored under the given project. | 
| List<String> | getRootNamespaces(RepositorySession session,
                 String repositoryId)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. | 
| static void | initializeNodeTypes(javax.jcr.Session session) | 
| javax.jcr.Session | login() | 
| void | populateStatistics(RepositorySession repositorySession,
                  MetadataRepository repository,
                  String repositoryId,
                  RepositoryStatistics repositoryStatistics)Populate the statistics object with the statistics data of this repository. | 
| void | removeArtifact(RepositorySession session,
              String repositoryId,
              String namespace,
              String projectId,
              String projectVersion,
              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 projectVersion,
                       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 projectId)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> | runJcrQuery(javax.jcr.Session jcrSession,
           String repositoryId,
           String q,
           Map<String,String> bindingParam) | 
| List<ArtifactMetadata> | runJcrQuery(javax.jcr.Session jcrSession,
           String repositoryId,
           String qParam,
           Map<String,String> bindingParam,
           boolean checkPath) | 
| javax.jcr.query.QueryResult | runNativeJcrQuery(javax.jcr.Session jcrSession,
                 String q,
                 Map<String,String> bindingParam) | 
| javax.jcr.query.QueryResult | runNativeJcrQuery(javax.jcr.Session jcrSession,
                 String q,
                 Map<String,String> bindingParam,
                 long offset,
                 long maxEntries) | 
| List<ArtifactMetadata> | searchArtifacts(RepositorySession session,
               String repositoryId,
               String text,
               boolean exact)Exact is ignored as we can't do exact search in any property, we need a key | 
| 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. | 
getArtifactByDateRangeStream, getArtifactMetadataComparator, getArtifactsByDateRange, getArtifactStream, getArtifactStream, getFacetFactory, getFacetFactory, getFactoryClassForId, getMetadataFacet, getMetadataFacetStream, getSupportedFacetsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetArtifactByDateRangeStream, getArtifactsByDateRange, getArtifactStream, getArtifactStream, getMetadataFacet, getMetadataFacetStreampublic JcrMetadataRepository(MetadataService metadataService, javax.jcr.Repository repository) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static void initializeNodeTypes(javax.jcr.Session session) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic void updateProject(RepositorySession session, String repositoryId, ProjectMetadata project) throws MetadataRepositoryException
MetadataRepositoryupdateProject in interface MetadataRepositoryupdateProject in class AbstractMetadataRepositorysession - The session used for updating.repositoryId - the repository the project is inproject - the project metadata to create or updateMetadataRepositoryException - if the update failspublic void updateArtifact(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion, ArtifactMetadata artifactMeta) throws MetadataRepositoryException
MetadataRepositoryupdateArtifact in interface MetadataRepositoryupdateArtifact in class AbstractMetadataRepositorysession - 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.public void updateProjectVersion(RepositorySession session, String repositoryId, String namespace, String projectId, ProjectVersionMetadata versionMetadata) throws MetadataRepositoryException
MetadataRepositoryupdateProjectVersion in interface MetadataRepositoryupdateProjectVersion in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idnamespace - The namespace ('.' separated)projectId - The project idversionMetadata - The metadata for the versionMetadataRepositoryException - if something goes wrong during updatepublic void updateNamespace(RepositorySession session, String repositoryId, String namespace) throws MetadataRepositoryException
MetadataRepositoryupdateNamespace in interface MetadataRepositoryupdateNamespace in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idnamespace - The namespace ('.' separated)MetadataRepositoryException - if something goes wrong during updatepublic void removeProject(RepositorySession session, String repositoryId, String namespace, String projectId) throws MetadataRepositoryException
MetadataRepositoryremoveProject in interface MetadataRepositoryremoveProject in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separated.projectId - The project name.MetadataRepositoryException - if the removal failed.public boolean hasMetadataFacet(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
MetadataRepositoryhasMetadataFacet in interface MetadataRepositoryhasMetadataFacet in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idfacetId - The facet idMetadataRepositoryException - if something goes wrongpublic List<String> getMetadataFacets(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
MetadataRepositorygetMetadataFacets in interface MetadataRepositorygetMetadataFacets in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idfacetId - The facet idMetadataRepositoryException - if something goes wrongpublic <T extends MetadataFacet> Stream<T> getMetadataFacetStream(RepositorySession session, String repositoryId, Class<T> facetClazz, QueryParameter queryParameter) throws MetadataRepositoryException
MetadataRepositorygetMetadataFacetStream in interface MetadataRepositorygetMetadataFacetStream in class AbstractMetadataRepositoryT - The facet typesession - The repository sessionrepositoryId - The repository idfacetClazz - The class of the facetMetadataRepositoryException - if the facet retrieval failspublic <T extends MetadataFacet> T getMetadataFacet(RepositorySession session, String repositoryId, Class<T> clazz, String name) throws MetadataRepositoryException
MetadataRepositorynull will be returned.
 If the facet is not found the method returns null.getMetadataFacet in interface MetadataRepositorygetMetadataFacet in class AbstractMetadataRepositoryT - 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 backendpublic void addMetadataFacet(RepositorySession session, String repositoryId, MetadataFacet metadataFacet) throws MetadataRepositoryException
MetadataRepositoryaddMetadataFacet in interface MetadataRepositoryaddMetadataFacet in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The id of the repositorymetadataFacet - The facet to addMetadataRepositoryException - if the facet cannot be stored.public void removeNamespace(RepositorySession session, String repositoryId, String projectId) throws MetadataRepositoryException
MetadataRepositoryremoveNamespace in interface MetadataRepositoryremoveNamespace in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idprojectId - The namespace '.' separated  ( it's the groupId for maven )MetadataRepositoryException - if the removal failedpublic void removeMetadataFacets(RepositorySession session, String repositoryId, String facetId) throws MetadataRepositoryException
MetadataRepositoryremoveMetadataFacets in interface MetadataRepositoryremoveMetadataFacets in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The id of the repositoryfacetId - The facet idMetadataRepositoryException - if the removal failspublic void removeMetadataFacet(RepositorySession session, String repositoryId, String facetId, String name) throws MetadataRepositoryException
MetadataRepositoryremoveMetadataFacet in interface MetadataRepositoryremoveMetadataFacet in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The id of the repositoryfacetId - The facet idname - The facet name or pathMetadataRepositoryExceptionpublic List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repoId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter) throws MetadataRepositoryException
MetadataRepositorynull, the time range for the search is unbounded for this parameter.getArtifactsByDateRange in interface MetadataRepositorygetArtifactsByDateRange in class AbstractMetadataRepositorysession - The repository sessionrepoId - The repository idstartTime - The start time/date as zoned date, can be nullendTime - The end time/date as zoned date, can be nullqueryParameter - Additional parameters for the query that affect ordering and returned resultsMetadataRepositoryException - if the query fails.public Stream<ArtifactMetadata> getArtifactByDateRangeStream(RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter) throws MetadataRepositoryException
MetadataRepositoryIf no sort attributes are given by the queryParameter, the result is sorted by the 'whenGathered' date.
getArtifactByDateRangeStream in interface MetadataRepositorygetArtifactByDateRangeStream in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idstartTime - The start time, can be nullendTime - The end time, can be nullqueryParameter - Additional parameters for the query that affect ordering and number of returned results.MetadataRepositoryException - if the artifact retrieval fails.public List<ArtifactMetadata> getArtifactsByChecksum(RepositorySession session, String repositoryId, String checksum) throws MetadataRepositoryException
MetadataRepositorygetArtifactsByChecksum in interface MetadataRepositorygetArtifactsByChecksum in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idchecksum - The checksum as string of numbersMetadataRepositoryException - if the artifact retrieval failspublic List<ArtifactMetadata> runJcrQuery(javax.jcr.Session jcrSession, String repositoryId, String q, Map<String,String> bindingParam) throws MetadataRepositoryException
MetadataRepositoryExceptionpublic List<ArtifactMetadata> runJcrQuery(javax.jcr.Session jcrSession, String repositoryId, String qParam, Map<String,String> bindingParam, boolean checkPath) throws MetadataRepositoryException
MetadataRepositoryExceptionpublic javax.jcr.query.QueryResult runNativeJcrQuery(javax.jcr.Session jcrSession, String q, Map<String,String> bindingParam) throws MetadataRepositoryException
MetadataRepositoryExceptionpublic javax.jcr.query.QueryResult runNativeJcrQuery(javax.jcr.Session jcrSession, String q, Map<String,String> bindingParam, long offset, long maxEntries) throws MetadataRepositoryException
MetadataRepositoryExceptionpublic List<ArtifactMetadata> getArtifactsByProjectVersionFacet(RepositorySession session, String key, String value, String repositoryId) throws MetadataRepositoryException
MetadataRepositorygetArtifactsByProjectVersionFacet in interface MetadataRepositorygetArtifactsByProjectVersionFacet in class AbstractMetadataRepositorysession - 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.public List<ArtifactMetadata> getArtifactsByAttribute(RepositorySession session, String key, String value, String repositoryId) throws MetadataRepositoryException
MetadataRepositorykey ist the string representation of one of the metadata attributes. Only artifacts are returned where
 the attribute value matches exactly the given search value.getArtifactsByAttribute in interface MetadataRepositorygetArtifactsByAttribute in class AbstractMetadataRepositorysession - 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.public List<ArtifactMetadata> getArtifactsByProjectVersionAttribute(RepositorySession session, String key, String value, String repositoryId) throws MetadataRepositoryException
MetadataRepositorygetArtifactsByProjectVersionAttribute in interface MetadataRepositorygetArtifactsByProjectVersionAttribute in class AbstractMetadataRepositorysession - 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 failspublic void removeRepository(RepositorySession session, String repositoryId) throws MetadataRepositoryException
MetadataRepositoryremoveRepository in interface MetadataRepositoryremoveRepository in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - the repository to deleteMetadataRepositoryException - if the removal failedpublic List<ArtifactMetadata> getArtifacts(RepositorySession session, String repositoryId) throws MetadataRepositoryException
MetadataRepositorygetArtifacts in interface MetadataRepositorygetArtifacts in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idMetadataRepositoryException - if the retrieval failed.public ProjectMetadata getProject(RepositorySession session, String repositoryId, String namespace, String projectId) throws MetadataResolutionException
MetadataRepositoryProjectMetadata object with the data provided by parameters.getProject in interface MetadataRepositorygetProject in class AbstractMetadataRepositorysession - The session idrepositoryId - The repository idnamespace - The namespace '.'-separated.projectId - The project namenull if not found.MetadataResolutionException - if the metadata retrieval failedpublic ProjectVersionMetadata getProjectVersion(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
MetadataRepositorygetProjectVersion in interface MetadataRepositorygetProjectVersion in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separatedprojectId - The project nameprojectVersion - The project versionnull, if not found.MetadataResolutionException - if the retrieval of the metadata failed.public List<String> getArtifactVersions(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
MetadataRepositorygetArtifactVersions in interface MetadataRepositorygetArtifactVersions in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separatedprojectId - The project name.projectVersion - The project version.MetadataResolutionException - if the retrieval of the metadata failed.public List<ProjectVersionReference> getProjectReferences(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
MetadataRepositorygetProjectReferences in interface MetadataRepositorygetProjectReferences in class AbstractMetadataRepositorysession - The repository session.repositoryId - 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.public List<String> getRootNamespaces(RepositorySession session, String repositoryId) throws MetadataResolutionException
MetadataRepositorygetRootNamespaces in interface MetadataRepositorygetRootNamespaces in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.MetadataResolutionException - If the retrieval failed.public List<String> getChildNamespaces(RepositorySession session, String repositoryId, String baseNamespace) throws MetadataResolutionException
MetadataRepositorygetChildNamespaces in interface MetadataRepositorygetChildNamespaces in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.baseNamespace - 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.public List<String> getProjects(RepositorySession session, String repositoryId, String namespace) throws MetadataResolutionException
MetadataRepositorygetProjects in interface MetadataRepositorygetProjects in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separated.MetadataResolutionException - if the retrieval failed.public List<String> getProjectVersions(RepositorySession session, String repositoryId, String namespace, String projectId) throws MetadataResolutionException
MetadataRepositorygetProjectVersions in interface MetadataRepositorygetProjectVersions in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separated.projectId - The project name.MetadataResolutionException - if the retrieval failed.public void removeTimestampedArtifact(RepositorySession session, ArtifactMetadata artifactMetadata, String baseVersion) throws MetadataRepositoryException
MetadataRepositoryremoveTimestampedArtifact in interface MetadataRepositoryremoveTimestampedArtifact in class AbstractMetadataRepositorysession - 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.public void removeProjectVersion(RepositorySession session, String repoId, String namespace, String projectId, String projectVersion) throws MetadataRepositoryException
MetadataRepositoryremoveProjectVersion in interface MetadataRepositoryremoveProjectVersion in class AbstractMetadataRepositorysession - The repository session.repoId - The repository id.namespace - The namespace '.'-separated.projectId - The project nameprojectVersion - The project version.MetadataRepositoryException - if the removal failed.public void removeArtifact(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion, String id) throws MetadataRepositoryException
MetadataRepositoryremoveArtifact in interface MetadataRepositoryremoveArtifact in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository idnamespace - The namespace of the projectprojectId - The project nameprojectVersion - The project versionid - The artifact idMetadataRepositoryException - if the artifact retrieval fails, or if the artifact cannot be found.public void removeFacetFromArtifact(RepositorySession session, String repositoryId, String namespace, String project, String projectVersion, MetadataFacet metadataFacet) throws MetadataRepositoryException
MetadataRepositoryMetadataFacet of the given artifact.removeFacetFromArtifact in interface MetadataRepositoryremoveFacetFromArtifact in class AbstractMetadataRepositorysession - The repository sessionrepositoryId - The repository id.namespace - The namespaceproject - The project nameprojectVersion - The project versionmetadataFacet - The facet dataMetadataRepositoryException - if the removal failedpublic List<ArtifactMetadata> getArtifacts(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion) throws MetadataResolutionException
MetadataRepositorygetArtifacts in interface MetadataRepositorygetArtifacts in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.namespace - The namespace '.'-separated.projectId - The project name.projectVersion - The project version.MetadataResolutionException - if the retrieval failed.public void close() throws MetadataRepositoryException
MetadataRepositoryclose in interface MetadataRepositoryclose in class AbstractMetadataRepositoryMetadataRepositoryException - if the something went wrong or if the repository was closed already.public List<ArtifactMetadata> searchArtifacts(RepositorySession session, String repositoryId, String text, boolean exact) throws MetadataRepositoryException
searchArtifacts in interface MetadataRepositorysearchArtifacts in class AbstractMetadataRepositorysession - 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.public List<ArtifactMetadata> searchArtifacts(RepositorySession session, String repositoryId, String key, String text, boolean exact) throws MetadataRepositoryException
MetadataRepositorysearchArtifacts in interface MetadataRepositorysearchArtifacts in class AbstractMetadataRepositorysession - 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.public void populateStatistics(RepositorySession repositorySession, MetadataRepository repository, String repositoryId, RepositoryStatistics repositoryStatistics) throws MetadataRepositoryException
RepositoryStatisticsProviderpopulateStatistics in interface RepositoryStatisticsProviderrepository - The current metadata repository implementationrepositoryId - The repository IdrepositoryStatistics - The statistics object that should be filled.MetadataRepositoryException - Is thrown, if an error occurs while accessing the repositorypublic javax.jcr.Session login() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion, QueryParameter queryParameter) throws MetadataResolutionException
MetadataRepositoryqueryParametergetArtifactStream in interface MetadataRepositorygetArtifactStream in class AbstractMetadataRepositorysession - The repository session. May not be null.repositoryId - 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.public Stream<ArtifactMetadata> getArtifactStream(RepositorySession session, String repositoryId, QueryParameter queryParameter) throws MetadataResolutionException
MetadataRepositoryqueryParameter.
 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.getArtifactStream in interface MetadataRepositorygetArtifactStream in class AbstractMetadataRepositorysession - The repository session.repositoryId - The repository id.MetadataResolutionExceptionCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.