mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
indent
This commit is contained in:
@@ -337,12 +337,31 @@ public class PluginInformation implements Validateable, Cloneable, Serializable
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getId()
|
public String getId()
|
||||||
|
{
|
||||||
|
return getId(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method description
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param withVersion
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* @since 1.21
|
||||||
|
*/
|
||||||
|
public String getId(boolean withVersion)
|
||||||
{
|
{
|
||||||
StringBuilder id = new StringBuilder(groupId);
|
StringBuilder id = new StringBuilder(groupId);
|
||||||
|
|
||||||
id.append(":").append(artifactId).append(":");
|
id.append(":").append(artifactId);
|
||||||
|
|
||||||
return id.append(version).toString();
|
if (withVersion)
|
||||||
|
{
|
||||||
|
id.append(":").append(version);
|
||||||
|
}
|
||||||
|
|
||||||
|
return id.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ package sonia.scm.api.rest.resources;
|
|||||||
|
|
||||||
//~--- non-JDK imports --------------------------------------------------------
|
//~--- non-JDK imports --------------------------------------------------------
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import com.google.inject.Singleton;
|
import com.google.inject.Singleton;
|
||||||
|
|
||||||
@@ -56,7 +57,6 @@ import com.sun.jersey.multipart.FormDataParam;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -295,9 +295,11 @@ public class PluginResource
|
|||||||
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
|
||||||
public Collection<PluginInformation> getOverview()
|
public Collection<PluginInformation> getOverview()
|
||||||
{
|
{
|
||||||
List<PluginInformation> plugins = new ArrayList<PluginInformation>(
|
//J-
|
||||||
pluginManager.get(
|
List<PluginInformation> plugins = Lists.newArrayList(
|
||||||
OverviewPluginFilter.INSTANCE));
|
pluginManager.get(OverviewPluginFilter.INSTANCE)
|
||||||
|
);
|
||||||
|
//J+
|
||||||
|
|
||||||
Collections.sort(plugins, PluginInformationComparator.INSTANCE);
|
Collections.sort(plugins, PluginInformationComparator.INSTANCE);
|
||||||
|
|
||||||
@@ -307,7 +309,7 @@ public class PluginResource
|
|||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
PluginInformation pi = it.next();
|
PluginInformation pi = it.next();
|
||||||
String id = pi.getGroupId().concat(":").concat(pi.getArtifactId());
|
String id = pi.getId(false);
|
||||||
|
|
||||||
if ((last != null) && id.equals(last))
|
if ((last != null) && id.equals(last))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user