@Test public void testGetMetadataFacet( ) throws Exception { try ( RepositorySession session = getSessionFactory( ).createSession( ) ) { getRepository( ).addMetadataFacet( session, TEST_REPO_ID, new TestMetadataFacet( TEST_VALUE ) ); TestMetadataFacet test = (TestMetadataFacet) getRepository( ).getMetadataFacet( session, TEST_REPO_ID, TEST_FACET_ID, TEST_NAME ); assertEquals( new TestMetadataFacet( TEST_VALUE ), test ); } }
@Override public MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ) throws MetadataRepositoryException { return getMetadataFacet( session, repositoryId, getFactoryClassForId( facetId ), name ); }
AbstractMetadataRepository implements MetadataRepository { @Override public MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ) throws MetadataRepositoryException { return getMetadataFacet( session, repositoryId, getFactoryClassForId( facetId ), name ); } }
AbstractMetadataRepository implements MetadataRepository { @Override public MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ) throws MetadataRepositoryException { return getMetadataFacet( session, repositoryId, getFactoryClassForId( facetId ), name ); } AbstractMetadataRepository();  AbstractMetadataRepository( MetadataService metadataService ); }
AbstractMetadataRepository implements MetadataRepository { @Override public MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ) throws MetadataRepositoryException { return getMetadataFacet( session, repositoryId, getFactoryClassForId( facetId ), name ); } AbstractMetadataRepository();  AbstractMetadataRepository( MetadataService metadataService ); @Override void updateProject( RepositorySession session, String repositoryId, ProjectMetadata project ); @Override void updateArtifact( RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion,
                                ArtifactMetadata artifactMeta ); @Override void updateProjectVersion( RepositorySession session, String repositoryId, String namespace, String projectId,
                                      ProjectVersionMetadata versionMetadata ); @Override void updateNamespace( RepositorySession session, String repositoryId, String namespace ); @Override List<String> getMetadataFacets( RepositorySession session, String repositoryId, String facetId ); @Override boolean hasMetadataFacet( RepositorySession session, String repositoryId, String facetId ); @Override void addMetadataFacet( RepositorySession session, String repositoryId, MetadataFacet metadataFacet ); @Override void removeMetadataFacets( RepositorySession session, String repositoryId, String facetId ); @Override void removeMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ); @Override List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter ); @Override List<ArtifactMetadata> getArtifactsByChecksum(RepositorySession session, String repositoryId, String checksum ); @Override List<ArtifactMetadata> getArtifactsByProjectVersionFacet( RepositorySession session, String key, String value, String repositoryId ); @Override List<ArtifactMetadata> getArtifactsByAttribute( RepositorySession session, String key, String value, String repositoryId ); @Override List<ArtifactMetadata> getArtifactsByProjectVersionAttribute( RepositorySession session, String key, String value, String repositoryId ); @Override void removeArtifact( RepositorySession session, String repositoryId, String namespace, String project, String version, String id ); @Override void removeTimestampedArtifact( RepositorySession session, ArtifactMetadata artifactMetadata, String baseVersion ); @Override void removeFacetFromArtifact( RepositorySession session, String repositoryId, String namespace, String project, String version,
                                         MetadataFacet metadataFacet ); @Override void removeRepository( RepositorySession session, String repositoryId ); @Override void removeNamespace( RepositorySession session, String repositoryId, String namespace ); @Override List<ArtifactMetadata> getArtifacts( RepositorySession session, String repositoryId ); @Override ProjectMetadata getProject( RepositorySession session, String repoId, String namespace, String projectId ); @Override ProjectVersionMetadata getProjectVersion( RepositorySession session, String repoId, String namespace, String projectId,
                                                     String projectVersion ); @Override List<String> getArtifactVersions( RepositorySession session, String repoId, String namespace, String projectId,
                                             String projectVersion ); @Override List<ProjectVersionReference> getProjectReferences( RepositorySession session, String repoId, String namespace, String projectId,
                                                               String projectVersion ); @Override List<String> getRootNamespaces( RepositorySession session, String repoId ); @Override List<String> getChildNamespaces( RepositorySession session, String repoId, String namespace ); @Override List<String> getProjects( RepositorySession session, String repoId, String namespace ); @Override List<String> getProjectVersions( RepositorySession session, String repoId, String namespace, String projectId ); @Override void removeProjectVersion( RepositorySession session, String repoId, String namespace, String projectId, String projectVersion ); @Override List<ArtifactMetadata> getArtifacts( RepositorySession session, String repoId, String namespace, String projectId,
                                                String projectVersion ); @Override void removeProject( RepositorySession session, String repositoryId, String namespace, String projectId ); @Override void close(); @Override List<ArtifactMetadata> searchArtifacts( RepositorySession session, String repositoryId, String text, boolean exact ); @Override List<ArtifactMetadata> searchArtifacts( RepositorySession session, String repositoryId, String key, String text, boolean exact ); @Override Stream<T> getMetadataFacetStream( RepositorySession session, String repositoryId, Class<T> facetClazz ); @Override Stream<ArtifactMetadata> getArtifactByDateRangeStream( RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime ); @Override MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ); @Override Stream<T> getMetadataFacetStream(RepositorySession session, String repositoryId, Class<T> facetClazz, QueryParameter queryParameter); @Override T getMetadataFacet( RepositorySession session, String repositoryId, Class<T> clazz, String name ); @Override Stream<ArtifactMetadata> getArtifactByDateRangeStream( RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter); @Override List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repoId, ZonedDateTime startTime, ZonedDateTime endTime); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repositoryId ); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repoId,
                                                       final String namespace, final String projectId,
                                                       final String projectVersion); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repositoryId, QueryParameter queryParameter ); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repoId,
                                                       final String namespace, final String projectId,
                                                       final String projectVersion, final QueryParameter queryParameter ); }
AbstractMetadataRepository implements MetadataRepository { @Override public MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ) throws MetadataRepositoryException { return getMetadataFacet( session, repositoryId, getFactoryClassForId( facetId ), name ); } AbstractMetadataRepository();  AbstractMetadataRepository( MetadataService metadataService ); @Override void updateProject( RepositorySession session, String repositoryId, ProjectMetadata project ); @Override void updateArtifact( RepositorySession session, String repositoryId, String namespace, String projectId, String projectVersion,
                                ArtifactMetadata artifactMeta ); @Override void updateProjectVersion( RepositorySession session, String repositoryId, String namespace, String projectId,
                                      ProjectVersionMetadata versionMetadata ); @Override void updateNamespace( RepositorySession session, String repositoryId, String namespace ); @Override List<String> getMetadataFacets( RepositorySession session, String repositoryId, String facetId ); @Override boolean hasMetadataFacet( RepositorySession session, String repositoryId, String facetId ); @Override void addMetadataFacet( RepositorySession session, String repositoryId, MetadataFacet metadataFacet ); @Override void removeMetadataFacets( RepositorySession session, String repositoryId, String facetId ); @Override void removeMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ); @Override List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter ); @Override List<ArtifactMetadata> getArtifactsByChecksum(RepositorySession session, String repositoryId, String checksum ); @Override List<ArtifactMetadata> getArtifactsByProjectVersionFacet( RepositorySession session, String key, String value, String repositoryId ); @Override List<ArtifactMetadata> getArtifactsByAttribute( RepositorySession session, String key, String value, String repositoryId ); @Override List<ArtifactMetadata> getArtifactsByProjectVersionAttribute( RepositorySession session, String key, String value, String repositoryId ); @Override void removeArtifact( RepositorySession session, String repositoryId, String namespace, String project, String version, String id ); @Override void removeTimestampedArtifact( RepositorySession session, ArtifactMetadata artifactMetadata, String baseVersion ); @Override void removeFacetFromArtifact( RepositorySession session, String repositoryId, String namespace, String project, String version,
                                         MetadataFacet metadataFacet ); @Override void removeRepository( RepositorySession session, String repositoryId ); @Override void removeNamespace( RepositorySession session, String repositoryId, String namespace ); @Override List<ArtifactMetadata> getArtifacts( RepositorySession session, String repositoryId ); @Override ProjectMetadata getProject( RepositorySession session, String repoId, String namespace, String projectId ); @Override ProjectVersionMetadata getProjectVersion( RepositorySession session, String repoId, String namespace, String projectId,
                                                     String projectVersion ); @Override List<String> getArtifactVersions( RepositorySession session, String repoId, String namespace, String projectId,
                                             String projectVersion ); @Override List<ProjectVersionReference> getProjectReferences( RepositorySession session, String repoId, String namespace, String projectId,
                                                               String projectVersion ); @Override List<String> getRootNamespaces( RepositorySession session, String repoId ); @Override List<String> getChildNamespaces( RepositorySession session, String repoId, String namespace ); @Override List<String> getProjects( RepositorySession session, String repoId, String namespace ); @Override List<String> getProjectVersions( RepositorySession session, String repoId, String namespace, String projectId ); @Override void removeProjectVersion( RepositorySession session, String repoId, String namespace, String projectId, String projectVersion ); @Override List<ArtifactMetadata> getArtifacts( RepositorySession session, String repoId, String namespace, String projectId,
                                                String projectVersion ); @Override void removeProject( RepositorySession session, String repositoryId, String namespace, String projectId ); @Override void close(); @Override List<ArtifactMetadata> searchArtifacts( RepositorySession session, String repositoryId, String text, boolean exact ); @Override List<ArtifactMetadata> searchArtifacts( RepositorySession session, String repositoryId, String key, String text, boolean exact ); @Override Stream<T> getMetadataFacetStream( RepositorySession session, String repositoryId, Class<T> facetClazz ); @Override Stream<ArtifactMetadata> getArtifactByDateRangeStream( RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime ); @Override MetadataFacet getMetadataFacet( RepositorySession session, String repositoryId, String facetId, String name ); @Override Stream<T> getMetadataFacetStream(RepositorySession session, String repositoryId, Class<T> facetClazz, QueryParameter queryParameter); @Override T getMetadataFacet( RepositorySession session, String repositoryId, Class<T> clazz, String name ); @Override Stream<ArtifactMetadata> getArtifactByDateRangeStream( RepositorySession session, String repositoryId, ZonedDateTime startTime, ZonedDateTime endTime, QueryParameter queryParameter); @Override List<ArtifactMetadata> getArtifactsByDateRange(RepositorySession session, String repoId, ZonedDateTime startTime, ZonedDateTime endTime); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repositoryId ); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repoId,
                                                       final String namespace, final String projectId,
                                                       final String projectVersion); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repositoryId, QueryParameter queryParameter ); @Override Stream<ArtifactMetadata> getArtifactStream( final RepositorySession session, final String repoId,
                                                       final String namespace, final String projectId,
                                                       final String projectVersion, final QueryParameter queryParameter );  }