summaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata/metadata-model/src
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2009-11-26 11:49:56 +0000
committerBrett Porter <brett@apache.org>2009-11-26 11:49:56 +0000
commitcd4c3cb104aa2ed4153e14a60c322b7845a922da (patch)
tree8d0d9914311be8aa8ccb3cd9ab16b41c3c9bd50a /archiva-modules/metadata/metadata-model/src
parenta9d2d7116490a1cdf87fd189037a6191cf9d6a14 (diff)
downloadarchiva-cd4c3cb104aa2ed4153e14a60c322b7845a922da.tar.gz
archiva-cd4c3cb104aa2ed4153e14a60c322b7845a922da.zip
[MRM-1283] migrate dependencies() method to metadata repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@884536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-model/src')
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java122
-rw-r--r--archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java21
2 files changed, 143 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java
new file mode 100644
index 000000000..034bce463
--- /dev/null
+++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java
@@ -0,0 +1,122 @@
+package org.apache.archiva.metadata.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * TODO: review what is appropriate for the base here - rest should be in a maven dependency facet
+ */
+public class Dependency
+{
+ private String classifier;
+
+ private boolean optional;
+
+ private String scope;
+
+ private String systemPath;
+
+ private String type;
+
+ private String artifactId;
+
+ private String groupId;
+
+ private String version;
+
+ public void setClassifier( String classifier )
+ {
+ this.classifier = classifier;
+ }
+
+ public String getClassifier()
+ {
+ return classifier;
+ }
+
+ public void setOptional( boolean optional )
+ {
+ this.optional = optional;
+ }
+
+ public boolean isOptional()
+ {
+ return optional;
+ }
+
+ public void setScope( String scope )
+ {
+ this.scope = scope;
+ }
+
+ public String getScope()
+ {
+ return scope;
+ }
+
+ public void setSystemPath( String systemPath )
+ {
+ this.systemPath = systemPath;
+ }
+
+ public String getSystemPath()
+ {
+ return systemPath;
+ }
+
+ public void setType( String type )
+ {
+ this.type = type;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public void setArtifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ }
+
+ public void setGroupId( String groupId )
+ {
+ this.groupId = groupId;
+ }
+
+ public void setVersion( String version )
+ {
+ this.version = version;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+}
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 ff78fcd76..0f60d601e 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
@@ -49,6 +49,8 @@ public class ProjectVersionMetadata
private List<MailingList> mailingLists;
+ private List<Dependency> dependencies;
+
public String getId()
{
return id;
@@ -186,4 +188,23 @@ public class ProjectVersionMetadata
}
this.mailingLists.add( mailingList );
}
+
+ public void setDependencies( List<Dependency> dependencies )
+ {
+ this.dependencies = dependencies;
+ }
+
+ public List<Dependency> getDependencies()
+ {
+ return dependencies;
+ }
+
+ public void addDependency( Dependency dependency )
+ {
+ if ( this.dependencies == null )
+ {
+ this.dependencies = new ArrayList<Dependency>();
+ }
+ this.dependencies.add( dependency );
+ }
}