You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/02/27 11:35:01 UTC
svn commit: r1294099 -
/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
Author: olamy
Date: Mon Feb 27 10:35:01 2012
New Revision: 1294099
URL: http://svn.apache.org/viewvc?rev=1294099&view=rev
Log:
add js mapping of search results
Modified:
archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js?rev=1294099&r1=1294098&r2=1294099&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/search.js Mon Feb 27 10:35:01 2012
@@ -407,6 +407,99 @@ $(function() {
//-----------------------------------------
// search part
//-----------------------------------------
+ Artifact=function(context,url,groupId,artifactId,repositoryId,version,prefix,goals,bundleVersion,bundleSymbolicName,
+ bundleExportPackage,bundleExportService,bundleDescription,bundleName,bundleLicense,bundleDocUrl,
+ bundleImportPackage,bundleRequireBundle,classifier,packaging,fileExtension){
+ //private String context;
+ this.context=context;
+
+ //private String url;
+ this.url=url;
+
+ //private String groupId;
+ this.groupId=groupId;
+
+ //private String artifactId;
+ this.artifactId=artifactId;
+
+ //private String repositoryId;
+ this.repositoryId=repositoryId;
+
+ //private String version;
+ this.version=version;
+
+ //Plugin goal prefix (only if packaging is "maven-plugin")
+ //private String prefix;
+ this.prefix=prefix;
+
+ //Plugin goals (only if packaging is "maven-plugin")
+ //private List<String> goals;
+ this.goals=goals;
+
+ //private String bundleVersion;
+ this.bundleVersion=bundleVersion;
+
+ // contains osgi metadata Bundle-SymbolicName if available
+ //private String bundleSymbolicName;
+ this.bundleSymbolicName=bundleSymbolicName;
+
+ //contains osgi metadata Export-Package if available
+ //private String bundleExportPackage;
+ this.bundleExportPackage=bundleExportPackage;
+
+ //contains osgi metadata Export-Service if available
+ //private String bundleExportService;
+ this.bundleExportService=bundleExportService;
+
+ ///contains osgi metadata Bundle-Description if available
+ //private String bundleDescription;
+ this.bundleDescription=bundleDescription;
+
+ // contains osgi metadata Bundle-Name if available
+ //private String bundleName;
+ this.bundleName=bundleName;
+
+ //contains osgi metadata Bundle-License if available
+ //private String bundleLicense;
+ this.bundleLicense=bundleLicense;
+
+ ///contains osgi metadata Bundle-DocURL if available
+ //private String bundleDocUrl;
+ this.bundleDocUrl=bundleDocUrl;
+
+ // contains osgi metadata Import-Package if available
+ //private String bundleImportPackage;
+ this.bundleImportPackage=bundleImportPackage;
+
+ ///contains osgi metadata Require-Bundle if available
+ //private String bundleRequireBundle;
+ this.bundleRequireBundle=bundleRequireBundle;
+
+ //private String classifier;
+ this.classifier=classifier;
+
+ //private String packaging;
+ this.packaging=packaging;
+
+ //file extension of the artifact
+ //private String fileExtension;
+ this.fileExtension=fileExtension;
+ }
+
+ mapArtifacts=function(data){
+ if (data.artifact){
+ return $.isArray(data.artifact )? $.map(data.artifact,function(item){return mapArtifact(item)}) : [data.artifact];
+ }
+ return [];
+ }
+
+ mapArtifact=function(data){
+ return new Artifact(data.context,data.url,data.groupId,data.artifactId,data.repositoryId,data.version,data.prefix,
+ data.goals,data.bundleVersion,data.bundleSymbolicName,
+ data.bundleExportPackage,data.bundleExportService,data.bundleDescription,data.bundleName,
+ data.bundleLicense,data.bundleDocUrl,
+ data.bundleImportPackage,data.bundleRequireBundle,data.classifier,data.packaging,data.fileExtension);
+ }
SearchRequest=function(){
//private String groupId;