mirror of https://github.com/apache/archiva.git
fixed formatting
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@951294 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a82088bc3f
commit
652118afbd
|
@ -48,14 +48,14 @@ import java.util.HashMap;
|
|||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* Browse the repository.
|
||||
*
|
||||
* TODO change name to ShowVersionedAction to conform to terminology.
|
||||
*
|
||||
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction" instantiation-strategy="per-lookup"
|
||||
* @plexus.component role="com.opensymphony.xwork2.Action" role-hint="showArtifactAction"
|
||||
* instantiation-strategy="per-lookup"
|
||||
*/
|
||||
public class ShowArtifactAction
|
||||
extends AbstractRepositoryBasedAction
|
||||
|
@ -118,11 +118,9 @@ public class ShowArtifactAction
|
|||
|
||||
private String propertyValue;
|
||||
|
||||
|
||||
/**
|
||||
* Show the versioned project information tab.
|
||||
* TODO: Change name to 'project' - we are showing project versions here, not specific artifact information (though
|
||||
* that is rendered in the download box).
|
||||
* Show the versioned project information tab. TODO: Change name to 'project' - we are showing project versions
|
||||
* here, not specific artifact information (though that is rendered in the download box).
|
||||
*/
|
||||
public String artifact()
|
||||
{
|
||||
|
@ -177,8 +175,9 @@ public class ShowArtifactAction
|
|||
{
|
||||
repositoryId = repoId;
|
||||
|
||||
List<ArtifactMetadata> artifacts = new ArrayList<ArtifactMetadata>(
|
||||
metadataResolver.getArtifacts( repoId, groupId, artifactId, version ) );
|
||||
List<ArtifactMetadata> artifacts =
|
||||
new ArrayList<ArtifactMetadata>( metadataResolver.getArtifacts( repoId, groupId, artifactId,
|
||||
version ) );
|
||||
Collections.sort( artifacts, new Comparator<ArtifactMetadata>()
|
||||
{
|
||||
public int compare( ArtifactMetadata o1, ArtifactMetadata o2 )
|
||||
|
@ -186,8 +185,9 @@ public class ShowArtifactAction
|
|||
// sort by version (reverse), then ID
|
||||
// TODO: move version sorting into repository handling (maven2 specific), and perhaps add a
|
||||
// way to get latest instead
|
||||
int result = new DefaultArtifactVersion( o2.getVersion() ).compareTo(
|
||||
new DefaultArtifactVersion( o1.getVersion() ) );
|
||||
int result =
|
||||
new DefaultArtifactVersion( o2.getVersion() ).compareTo( new DefaultArtifactVersion(
|
||||
o1.getVersion() ) );
|
||||
return result != 0 ? result : o1.getId().compareTo( o2.getId() );
|
||||
}
|
||||
} );
|
||||
|
@ -263,7 +263,8 @@ public class ShowArtifactAction
|
|||
|
||||
this.dependees = references;
|
||||
|
||||
// TODO: may need to note on the page that references will be incomplete if the other artifacts are not yet stored in the content repository
|
||||
// TODO: may need to note on the page that references will be incomplete if the other artifacts are not yet
|
||||
// stored in the content repository
|
||||
// (especially in the case of pre-population import)
|
||||
|
||||
return artifact();
|
||||
|
@ -277,7 +278,8 @@ public class ShowArtifactAction
|
|||
// temporarily use this as we only need the model for the tag to perform, but we should be resolving the
|
||||
// graph here instead
|
||||
|
||||
// TODO: may need to note on the page that tree will be incomplete if the other artifacts are not yet stored in the content repository
|
||||
// TODO: may need to note on the page that tree will be incomplete if the other artifacts are not yet stored in
|
||||
// the content repository
|
||||
// (especially in the case of pre-population import)
|
||||
|
||||
// TODO: a bit ugly, should really be mapping all these results differently now
|
||||
|
@ -323,7 +325,8 @@ public class ShowArtifactAction
|
|||
genericMetadata = projectMetadata.getFacet( GenericMetadataFacet.FACET_ID ).toProperties();
|
||||
}
|
||||
|
||||
if( propertyName == null || "".equals( propertyName.trim() ) || propertyValue == null || "".equals( propertyValue.trim() ) )
|
||||
if ( propertyName == null || "".equals( propertyName.trim() ) || propertyValue == null ||
|
||||
"".equals( propertyValue.trim() ) )
|
||||
{
|
||||
model = projectMetadata;
|
||||
addActionError( errorMsg != null ? errorMsg : "Property Name and Property Value are required." );
|
||||
|
|
Loading…
Reference in New Issue