private boolean project;
+ /**
+ * @since 2.0.0
+ */
+ private String groupId;
+
+ /**
+ * @since 2.0.0
+ */
+ private String artifactId;
+
public BrowseResultEntry()
{
// no op
return this.name.compareTo( browseGroupResultEntry.name );
}
+ public String getGroupId()
+ {
+ return groupId;
+ }
+
+ public void setGroupId( String groupId )
+ {
+ this.groupId = groupId;
+ }
+
+ public BrowseResultEntry groupId( String groupId )
+ {
+ this.groupId = groupId;
+ return this;
+ }
+
+ public String getArtifactId()
+ {
+ return artifactId;
+ }
+
+ public void setArtifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ }
+
+ public BrowseResultEntry artifactId( String artifactId )
+ {
+ this.artifactId = artifactId;
+ return this;
+ }
+
@Override
public String toString()
{
- final StringBuilder sb = new StringBuilder();
- sb.append( "BrowseResultEntry" );
- sb.append( "{name='" ).append( name ).append( '\'' );
+ final StringBuilder sb = new StringBuilder( "BrowseResultEntry{" );
+ sb.append( "name='" ).append( name ).append( '\'' );
sb.append( ", project=" ).append( project );
+ sb.append( ", groupId='" ).append( groupId ).append( '\'' );
+ sb.append( ", artifactId='" ).append( artifactId ).append( '\'' );
sb.append( '}' );
return sb.toString();
}
new ArrayList<BrowseResultEntry>( namespaces.size() + projects.size() );
for ( String namespace : namespaces )
{
- browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ) );
+ browseGroupResultEntries.add( new BrowseResultEntry( namespace, false ).groupId( namespace ) );
}
for ( String project : projects )
{
- browseGroupResultEntries.add( new BrowseResultEntry( groupId + '.' + project, true ) );
+ browseGroupResultEntries.add( new BrowseResultEntry( groupId + '.' + project, true ).groupId( groupId ).artifactId( project ) );
}
Collections.sort( browseGroupResultEntries );
return new BrowseResult( browseGroupResultEntries );
//window.sammyArchivaApplication.setLocation("#quicksearch~" + datum.artifactId);
if (datum.project){
- goToArtifactDetail(theGroupId,datum.name);
+ goToArtifactDetail(datum.groupId,datum.artifactId);
} else {
var selectedRepo=getSelectedBrowsingRepository();
var location ="#browse";
if (data.browseResultEntries) {
return $.isArray(data.browseResultEntries) ?
$.map(data.browseResultEntries,function(item){
- return new BrowseResultEntry(item.name, item.project);
+ return new BrowseResultEntry(item.name, item.project,item.groupId,item.artifactId);
} ).sort(function(a, b){return a.name.localeCompare(b.name)}): [data.browseResultEntries];
}
return [];
}
- BrowseResultEntry=function(name,project){
+ BrowseResultEntry=function(name,project,groupId,artifactId){
this.name=name;
this.project=project;
+ this.groupId=groupId;
+ this.artifactId=artifactId;
}
BreadCrumbEntry=function(groupId,displayValue){