archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r525951 [5/5] - in /maven/archiva/branches/archiva-jpox-database-refactor: archiva-base/archiva-common/ archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/ archiva-base/archiva-consumers/archiva-database-consume...
Date Thu, 05 Apr 2007 20:11:30 GMT
Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom
(added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom
Thu Apr  5 13:11:19 2007
@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Copyright 2005-2006 The Apache Software Foundation.
+  ~
+  ~ Licensed 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache</groupId>
+    <artifactId>apache</artifactId>
+    <version>3</version>
+    <relativePath>../asf/pom.xml</relativePath>
+  </parent>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>maven-parent</artifactId>
+  <version>4</version>
+  <packaging>pom</packaging>
+  <name>Apache Maven</name>
+  <description>
+    Maven is a software project management and comprehension tool. Based on the concept of
a project object model
+    (POM), Maven can manage a project's build, reporting and documentation from a central
piece of information.
+  </description>
+  <url>http://maven.apache.org/</url>
+  <issueManagement>
+    <system>jira</system>
+    <url>http://jira.codehaus.org/browse/MPA</url>
+  </issueManagement>
+  <ciManagement>
+    <system>continuum</system>
+    <url>http://maven.zones.apache.org:8080/continuum</url>
+    <notifiers>
+      <notifier>
+        <type>mail</type>
+        <configuration>
+          <address>notifications@maven.apache.org</address>
+        </configuration>
+      </notifier>
+    </notifiers>
+  </ciManagement>
+  <inceptionYear>2002</inceptionYear>
+  <mailingLists>
+    <mailingList>
+      <name>Maven Announcements List</name>
+      <post>announce@maven.apache.org</post>
+      <subscribe>announce-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Issues List</name>
+      <post>issues@maven.apache.org</post>
+      <subscribe>issues-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+    </mailingList>
+    <mailingList>
+      <name>Maven Notifications List</name>
+      <post>notifications@maven.apache.org</post>
+      <subscribe>notifications-subscribe@maven.apache.org</subscribe>
+      <unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
+      <archive>http://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+    </mailingList>
+  </mailingLists>
+
+  <developers>
+    <developer>
+      <id>jvanzyl</id>
+      <name>Jason van Zyl</name>
+      <email>jason@maven.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Chair</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+    <developer>
+      <id>brett</id>
+      <name>Brett Porter</name>
+      <email>brett@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+10</timezone>
+    </developer>
+    <developer>
+      <id>evenisse</id>
+      <name>Emmanuel Venisse</name>
+      <email>evenisse@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>kenney</id>
+      <name>Kenney Westerhof</name>
+      <email>kenney@apache.org</email>
+      <organization>Neonics</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+    </developer>
+    <developer>
+      <id>snicoll</id>
+      <name>Stephane Nicoll</name>
+      <email>snicoll@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>vmassol</id>
+      <name>Vincent Massol</name>
+      <email>vmassol@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>fgiust</id>
+      <name>Fabrizio Giustina</name>
+      <email>fgiust@apache.org</email>
+      <organization>openmind</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>epunzalan</id>
+      <name>Edwin Punzalan</name>
+      <email>epunzalan@mergere.com</email>
+      <organization>Mergere</organization>
+      <roles>
+        <role>Committer</role>
+      </roles>
+      <timezone>+8</timezone>
+    </developer>
+    <developer>
+      <id>mperham</id>
+      <name>Mike Perham</name>
+      <email>mperham@gmail.com</email>
+      <organization>IBM</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>-6</timezone>
+    </developer>
+    <developer>
+      <id>jdcasey</id>
+      <name>John Casey</name>
+      <email>jdcasey@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+    <developer>
+      <id>trygvis</id>
+      <name>Trygve Laugstol</name>
+      <email>trygvis@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>vsiveton</id>
+      <name>Vincent Siveton</name>
+      <email>vsiveton@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>-5</timezone>
+    </developer>
+    <developer>
+      <id>carlos</id>
+      <name>Carlos Sanchez</name>
+      <email>carlos@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+    <developer>
+      <id>dennisl</id>
+      <name>Dennis Lundberg</name>
+      <email>dennisl@apache.org</email>
+      <organization>ASF</organization>
+      <roles>
+        <role>PMC Member</role>
+      </roles>
+      <timezone>+1</timezone>
+    </developer>
+  </developers>
+
+  <distributionManagement>
+    <site>
+      <id>apache.website</id>
+      <url>scp://people.apache.org/www/maven.apache.org</url>
+    </site>
+  </distributionManagement>
+
+<!-- Disabled until projects have been made to comply
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>cpd-check</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+-->
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <configLocation>http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven_checks.xml</configLocation>
+          <headerLocation>http://svn.apache.org/repos/asf/maven/plugins/trunk/maven-checkstyle-plugin/src/main/resources/config/maven-header.txt</headerLocation>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>taglist-maven-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <configuration>
+          <links>
+            <link>http://java.sun.com/j2ee/1.4/docs/api</link>
+            <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
+            <link>http://jakarta.apache.org/commons/collections/apidocs-COLLECTIONS_3_0/</link>
+            <link>http://jakarta.apache.org/commons/dbcp/apidocs/</link>
+            <link>http://jakarta.apache.org/commons/fileupload/apidocs/</link>
+            <link>http://jakarta.apache.org/commons/httpclient/apidocs/</link>
+            <link>http://jakarta.apache.org/commons/logging/apidocs/</link>
+            <link>http://jakarta.apache.org/commons/pool/apidocs/</link>
+            <link>http://www.junit.org/junit/javadoc/</link>
+            <link>http://logging.apache.org/log4j/docs/api/</link>
+            <link>http://jakarta.apache.org/regexp/apidocs/</link>
+            <link>http://jakarta.apache.org/velocity/api/</link>
+          </links>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/pom/maven/tags/maven-parent-4</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/pom/maven/tags/maven-parent-4</developerConnection>
+    <url>http://svn.apache.org/viewvc/maven/pom/maven/tags/maven-parent-4</url>
+  </scm>
+</project>
+

Added: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1?view=auto&rev=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1
(added)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-repository-layer/src/test/repositories/default-repository/org/apache/maven/maven-parent/4/maven-parent-4.pom.sha1
Thu Apr  5 13:11:19 2007
@@ -0,0 +1 @@
+0fc039b0bd4d17d7c147a30e1d83994629c5297c
\ No newline at end of file

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-xml-tools/src/main/java/org/apache/maven/archiva/xml/XMLReader.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-xml-tools/src/main/java/org/apache/maven/archiva/xml/XMLReader.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-xml-tools/src/main/java/org/apache/maven/archiva/xml/XMLReader.java
(original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-base/archiva-xml-tools/src/main/java/org/apache/maven/archiva/xml/XMLReader.java
Thu Apr  5 13:11:19 2007
@@ -20,10 +20,13 @@
  */
 
 import org.apache.commons.lang.StringUtils;
+import org.dom4j.Attribute;
 import org.dom4j.Document;
 import org.dom4j.DocumentException;
 import org.dom4j.Element;
+import org.dom4j.Namespace;
 import org.dom4j.Node;
+import org.dom4j.QName;
 import org.dom4j.XPath;
 import org.dom4j.io.SAXReader;
 
@@ -34,8 +37,10 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 /**
  * XMLReader - a set of common xml utility methods for reading content out of an xml file.

@@ -51,6 +56,8 @@
 
     private Document document;
 
+    private Map namespaceMap = new HashMap();
+
     public XMLReader( String type, File file )
         throws XMLException
     {
@@ -121,10 +128,21 @@
         }
     }
 
+    public String getDefaultNamespaceURI()
+    {
+        Namespace namespace = this.document.getRootElement().getNamespace();
+        return namespace.getURI();
+    }
+
+    public void addNamespaceMapping( String elementName, String uri )
+    {
+        this.namespaceMap.put( elementName, uri );
+    }
+
     public Element getElement( String xpathExpr )
         throws XMLException
     {
-        XPath xpath = document.createXPath( xpathExpr );
+        XPath xpath = createXPath( xpathExpr );
         Object evaluated = xpath.selectSingleNode( document );
 
         if ( evaluated == null )
@@ -145,10 +163,20 @@
         }
     }
 
+    private XPath createXPath( String xpathExpr )
+    {
+        XPath xpath = document.createXPath( xpathExpr );
+        if ( !this.namespaceMap.isEmpty() )
+        {
+            xpath.setNamespaceURIs( this.namespaceMap );
+        }
+        return xpath;
+    }
+
     public boolean hasElement( String xpathExpr )
         throws XMLException
     {
-        XPath xpath = document.createXPath( xpathExpr );
+        XPath xpath = createXPath( xpathExpr );
         Object evaluated = xpath.selectSingleNode( document );
 
         if ( evaluated == null )
@@ -159,10 +187,44 @@
         return true;
     }
 
+    /**
+     * Remove namespaces from entire document.
+     */
+    public void removeNamespaces()
+    {
+        removeNamespaces( this.document.getRootElement() );
+    }
+
+    /**
+     * Remove namespaces from element recursively.
+     */
+    public void removeNamespaces( Element elem )
+    {
+        elem.setQName( QName.get( elem.getName(), Namespace.NO_NAMESPACE, elem.getQualifiedName()
) );
+
+        Node n;
+
+        Iterator it = elem.elementIterator();
+        while ( it.hasNext() )
+        {
+            n = (Node) it.next();
+
+            switch ( n.getNodeType() )
+            {
+                case Node.ATTRIBUTE_NODE:
+                    ( (Attribute) n ).setNamespace( Namespace.NO_NAMESPACE );
+                    break;
+                case Node.ELEMENT_NODE:
+                    removeNamespaces( (Element) n );
+                    break;
+            }
+        }
+    }
+
     public String getElementText( Node context, String xpathExpr )
         throws XMLException
     {
-        XPath xpath = document.createXPath( xpathExpr );
+        XPath xpath = createXPath( xpathExpr );
         Object evaluated = xpath.selectSingleNode( context );
 
         if ( evaluated == null )
@@ -186,7 +248,7 @@
     public String getElementText( String xpathExpr )
         throws XMLException
     {
-        XPath xpath = document.createXPath( xpathExpr );
+        XPath xpath = createXPath( xpathExpr );
         Object evaluated = xpath.selectSingleNode( document );
 
         if ( evaluated == null )
@@ -210,7 +272,7 @@
     public List getElementList( String xpathExpr )
         throws XMLException
     {
-        XPath xpath = document.createXPath( xpathExpr );
+        XPath xpath = createXPath( xpathExpr );
         Object evaluated = xpath.evaluate( document );
 
         if ( evaluated == null )
@@ -230,7 +292,7 @@
         else if ( evaluated instanceof Node )
         {
             List ret = new ArrayList();
-            ret.add( (Node) evaluated );
+            ret.add( evaluated );
             return ret;
         }
         else

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
(original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-cli/src/main/java/org/apache/maven/archiva/cli/ProjectReaderConsumer.java
Thu Apr  5 13:11:19 2007
@@ -23,9 +23,9 @@
 import org.apache.maven.archiva.consumers.RepositoryContentConsumer;
 import org.apache.maven.archiva.model.ArchivaProjectModel;
 import org.apache.maven.archiva.model.ArchivaRepository;
-import org.apache.maven.archiva.repository.project.ProjectModel400Reader;
 import org.apache.maven.archiva.repository.project.ProjectModelException;
 import org.apache.maven.archiva.repository.project.ProjectModelReader;
+import org.apache.maven.archiva.repository.project.readers.ProjectModel400Reader;
 
 import java.io.File;
 import java.util.ArrayList;

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/ArchivaDAO.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/ArchivaDAO.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/ArchivaDAO.java
(original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/ArchivaDAO.java
Thu Apr  5 13:11:19 2007
@@ -21,7 +21,6 @@
 
 import org.apache.maven.archiva.model.ArchivaArtifactModel;
 import org.apache.maven.archiva.model.ArchivaRepositoryModel;
-import org.apache.maven.archiva.model.RepositoryContent;
 
 import java.util.List;
 
@@ -73,29 +72,13 @@
     public void deleteRepository( ArchivaRepositoryModel repository )
         throws ArchivaDatabaseException;
 
-    /* .\ Repository Content \.____________________________________________________________
*/
-
-    public RepositoryContent createRepositoryContent( String groupId, String artifactId,
String version,
-                                                      String repositoryId );
-
-    public RepositoryContent getRepositoryContent( String groupId, String artifactId, String
version,
-                                                   String repositoryId )
-        throws ObjectNotFoundException, ArchivaDatabaseException;
-
-    public List /*<RepositoryContent>*/queryRepositoryContents( Constraint constraint
)
-        throws ObjectNotFoundException, ArchivaDatabaseException;
-
-    public RepositoryContent saveRepositoryContent( RepositoryContent repoContent )
-        throws ArchivaDatabaseException;
-
-    public void deleteRepositoryContent( RepositoryContent repoContent )
-        throws ArchivaDatabaseException;
-
     /* .\ Archiva Artifact \. _____________________________________________________________
*/
 
-    public ArchivaArtifactModel createArtifact( RepositoryContent repoContent, String classifier,
String type );
+    public ArchivaArtifactModel createArtifact( String groupId, String artifactId, String
version, String classifier,
+                                                String type );
 
-    public ArchivaArtifactModel getArtifact( RepositoryContent repoContent, String classifier,
String type )
+    public ArchivaArtifactModel getArtifact( String groupId, String artifactId, String version,
String classifier,
+                                             String type )
         throws ObjectNotFoundException, ArchivaDatabaseException;
 
     public List /*<ArchivaArtifactModel>*/queryArtifacts( Constraint constraint )

Modified: maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java
URL: http://svn.apache.org/viewvc/maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java?view=diff&rev=525951&r1=525950&r2=525951
==============================================================================
--- maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java
(original)
+++ maven/archiva/branches/archiva-jpox-database-refactor/archiva-database/src/main/java/org/apache/maven/archiva/database/jdo/JdoArchivaDAO.java
Thu Apr  5 13:11:19 2007
@@ -6,8 +6,6 @@
 import org.apache.maven.archiva.database.ObjectNotFoundException;
 import org.apache.maven.archiva.model.ArchivaArtifactModel;
 import org.apache.maven.archiva.model.ArchivaRepositoryModel;
-import org.apache.maven.archiva.model.RepositoryContent;
-import org.apache.maven.archiva.model.RepositoryContentKey;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 import java.util.List;
@@ -78,70 +76,22 @@
         jdo.removeObject( repository );
     }
 
-    /* .\ Repository Content \.____________________________________________________________
*/
-
-    public RepositoryContent createRepositoryContent( String groupId, String artifactId,
String version,
-                                                      String repositoryId )
-    {
-        RepositoryContent repoContent;
-
-        try
-        {
-            repoContent = getRepositoryContent( groupId, artifactId, version, repositoryId
);
-        }
-        catch ( ArchivaDatabaseException e )
-        {
-            repoContent = new RepositoryContent( repositoryId, groupId, artifactId, version
);
-        }
-
-        return repoContent;
-    }
-
-    public RepositoryContent getRepositoryContent( String groupId, String artifactId, String
version,
-                                                   String repositoryId )
-        throws ObjectNotFoundException, ArchivaDatabaseException
-    {
-        RepositoryContentKey key = new RepositoryContentKey();
-        key.groupId = groupId;
-        key.artifactId = artifactId;
-        key.version = version;
-        key.repositoryId = repositoryId;
-
-        return (RepositoryContent) jdo.getObjectById( RepositoryContent.class, key, null
);
-    }
-
-    public List queryRepositoryContents( Constraint constraint )
-        throws ObjectNotFoundException, ArchivaDatabaseException
-    {
-        return jdo.getAllObjects( RepositoryContent.class, constraint );
-    }
-
-    public RepositoryContent saveRepositoryContent( RepositoryContent repoContent )
-        throws ArchivaDatabaseException
-    {
-        return (RepositoryContent) jdo.saveObject( repoContent );
-    }
-
-    public void deleteRepositoryContent( RepositoryContent repoContent )
-        throws ArchivaDatabaseException
-    {
-        jdo.removeObject( repoContent );
-    }
-
     /* .\ Archiva Artifact \. _____________________________________________________________
*/
 
-    public ArchivaArtifactModel createArtifact( RepositoryContent repoContent, String classifier,
String type )
+    public ArchivaArtifactModel createArtifact( String groupId, String artifactId, String
version, String classifier, String type )
     {
         ArchivaArtifactModel artifact;
 
         try
         {
-            artifact = getArtifact( repoContent, classifier, type );
+            artifact = getArtifact( groupId, artifactId, version, classifier, type );
         }
         catch ( ArchivaDatabaseException e )
         {
             artifact = new ArchivaArtifactModel();
-            artifact.setContentKey( repoContent );
+            artifact.setGroupId( groupId );
+            artifact.setArtifactId( artifactId );
+            artifact.setVersion( version );
             artifact.setClassifier( classifier );
             artifact.setType( type );
         }
@@ -149,7 +99,7 @@
         return artifact;
     }
 
-    public ArchivaArtifactModel getArtifact( RepositoryContent repoContent, String classifier,
String type )
+    public ArchivaArtifactModel getArtifact( String groupId, String artifactId, String version,
String classifier, String type )
         throws ObjectNotFoundException, ArchivaDatabaseException
     {
         



Mime
View raw message