aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata/metadata-model
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-11-25 16:24:55 +0000
committerBrett Porter <brett@apache.org>2009-11-25 16:24:55 +0000
commit9062810001dc4a4f2a20bf59e576c33d20043563 (patch)
treed268914f99a25df4737ada4d3611b9263a244383 /archiva-modules/metadata/metadata-model
parent9c2b960aeac54f29677b8ba87d30c4a4a7a2f631 (diff)
downloadarchiva-9062810001dc4a4f2a20bf59e576c33d20043563.tar.gz
archiva-9062810001dc4a4f2a20bf59e576c33d20043563.zip
[MRM-1282] store more of the content in the file metadata repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@884177 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-model')
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionFacet.java4
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java19
2 files changed, 17 insertions, 6 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionFacet.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionFacet.java
index 8cb109fcb..a0ac18736 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionFacet.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionFacet.java
@@ -1,5 +1,7 @@
package org.apache.archiva.metadata.model;
+import java.util.Map;
+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
@@ -22,4 +24,6 @@ package org.apache.archiva.metadata.model;
public interface ProjectVersionFacet
{
String getFacetId();
+
+ Map<String, String> toProperties();
}
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
index 08f4b5a9c..159afd15c 100644
--- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java
@@ -20,6 +20,7 @@ package org.apache.archiva.metadata.model;
*/
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -44,7 +45,7 @@ public class ProjectVersionMetadata
private List<License> licenses;
- private Map<String, ProjectVersionFacet> facets;
+ private Map<String, ProjectVersionFacet> facets = new HashMap<String, ProjectVersionFacet>();;
public String getId()
{
@@ -147,15 +148,21 @@ public class ProjectVersionMetadata
public void addFacet( ProjectVersionFacet mavenProjectFacet )
{
- if ( this.facets == null )
- {
- this.facets = new HashMap<String, ProjectVersionFacet>();
- }
this.facets.put( mavenProjectFacet.getFacetId(), mavenProjectFacet );
}
public ProjectVersionFacet getFacet( String facetId )
{
- return this.facets != null ? this.facets.get( facetId ) : null;
+ return this.facets.get( facetId );
+ }
+
+ public Collection<ProjectVersionFacet> getAllFacets()
+ {
+ return this.facets.values();
+ }
+
+ public Collection<String> getAllFacetIds()
+ {
+ return this.facets.keySet();
}
}