aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2008-11-03 22:23:23 +0000
committerMaria Odea B. Ching <oching@apache.org>2008-11-03 22:23:23 +0000
commit9d345b6c945cbffa3ed35f3e0420ae9c661dcf6d (patch)
tree1450a9beee75f206b2cc4a63cb9b77cc58bf6416 /archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api
parent5e04d6c1a2c85b2f20c2fdbe6ec5fffcf00d82dd (diff)
downloadarchiva-9d345b6c945cbffa3ed35f3e0420ae9c661dcf6d.tar.gz
archiva-9d345b6c945cbffa3ed35f3e0420ae9c661dcf6d.zip
[MRM-206]
-added search + test cases in web services git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@710189 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api')
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml4
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java30
-rw-r--r--archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java124
3 files changed, 158 insertions, 0 deletions
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
index ac145568f..8dc30b5d3 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/pom.xml
@@ -33,6 +33,10 @@
<name>Archiva Web :: XML-RPC API</name>
<dependencies>
<dependency>
+ <groupId>org.apache.archiva</groupId>
+ <artifactId>archiva-indexer</artifactId>
+ </dependency>
+ <dependency>
<groupId>com.atlassian.xmlrpc</groupId>
<artifactId>atlassian-xmlrpc-binder-annotations</artifactId>
</dependency>
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java
index cbc47547f..d820be458 100644
--- a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/SearchService.java
@@ -19,10 +19,40 @@ package org.apache.archiva.web.xmlrpc.api;
* under the License.
*/
+import java.util.Date;
+import java.util.List;
+
+import org.apache.archiva.web.xmlrpc.api.beans.Artifact;
import com.atlassian.xmlrpc.ServiceObject;
@ServiceObject("Search")
public interface SearchService
{
+ /*
+ * quick/general text search which returns a list of artifacts
+ * query for an artifact based on a checksum
+ * query for all available versions of an artifact, sorted in version significance order
+ * query for all available versions of an artifact since a given date
+ * query for an artifact's direct dependencies
+ * query for an artifact's dependency tree (as with mvn dependency:tree - no duplicates should be included)
+ * query for all artifacts that depend on a given artifact
+ */
+
+ public List<Artifact> quickSearch( String queryString )
+ throws Exception;
+
+ public List<Artifact> getArtifactByChecksum( String checksum) throws Exception;
+
+ public List<Artifact> getArtifactVersions( String groupId, String artifactId ) throws Exception;
+
+ public List<Artifact> getArtifactVersionsByDate( String groupId, String artifactId, String version, Date whenGathered )
+ throws Exception;
+ public List<Artifact> getDirectDependencies( String repositoryId, String groupId, String artifactId, String version )
+ throws Exception;
+
+ public List<Artifact> getDependencyTree( String groupId, String artifactId, String version ) throws Exception;
+
+ public List<Artifact> getDependees( String groupId, String artifactId, String version )
+ throws Exception;
}
diff --git a/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
new file mode 100644
index 000000000..bc553e3cd
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-xmlrpc/archiva-xmlrpc-api/src/main/java/org/apache/archiva/web/xmlrpc/api/beans/Artifact.java
@@ -0,0 +1,124 @@
+package org.apache.archiva.web.xmlrpc.api.beans;
+
+/*
+ * 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.
+ */
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.atlassian.xmlrpc.ServiceBean;
+import com.atlassian.xmlrpc.ServiceBeanField;
+
+@ServiceBean
+public class Artifact
+ implements Serializable
+{
+ private String repositoryId;
+
+ private String groupId;
+
+ private String artifactId;
+
+ private String version;
+
+ private String type;
+
+ private Date whenGathered;
+
+ public Artifact()
+ {
+
+ }
+
+ public Artifact( String repositoryId, String groupId, String artifactId, String version,
+ String type, Date whenGathered )
+ {
+ this.repositoryId = repositoryId;
+ this.groupId = groupId;
+ this.artifactId = artifactId;
+ this.version = version;
+ this.type = type;
+ this.whenGathered = whenGathered;
+ }
+
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public String getType()
+ {
+ return type;
+ }
+
+ public Date getWhenGathered()
+ {
+ return whenGathered;
+ }
+
+ @ServiceBeanField( "groupId" )
+ public void setGroupId( String groupId )
+ {
+ this.groupId = groupId;
+ }
+
+ @ServiceBeanField( "artifactId" )
+ public void setArtifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ }
+
+ @ServiceBeanField( "version" )
+ public void setVersion( String version )
+ {
+ this.version = version;
+ }
+
+ @ServiceBeanField( "type" )
+ public void setType( String type )
+ {
+ this.type = type;
+ }
+
+ @ServiceBeanField( "whenGathered" )
+ public void setWhenGathered( Date whenGathered )
+ {
+ this.whenGathered = whenGathered;
+ }
+
+ public String getRepositoryId()
+ {
+ return repositoryId;
+ }
+
+ public void setRepositoryId( String repositoryId )
+ {
+ this.repositoryId = repositoryId;
+ }
+}