summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-web/archiva-webapp
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2008-07-25 11:57:38 +0000
committerMaria Odea B. Ching <oching@apache.org>2008-07-25 11:57:38 +0000
commit6eab73646ed19f23324d3c995f28542e0729c946 (patch)
treeaca00c4483d9ff74cf8bee3f40c5088f24a369d6 /archiva-modules/archiva-web/archiva-webapp
parent4aa6c9bab02fbdc90f23cbf7b8b324546f8213b4 (diff)
downloadarchiva-6eab73646ed19f23324d3c995f28542e0729c946.tar.gz
archiva-6eab73646ed19f23324d3c995f28542e0729c946.zip
[MRM-817]
submitted by Gwen Harold Autencio -in the artifact information tab, display the repo id where the artifact came from git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@679767 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-web/archiva-webapp')
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java12
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java38
-rw-r--r--archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf4
3 files changed, 43 insertions, 11 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java
index fc0f4757d..7dee82270 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/BrowseAction.java
@@ -57,6 +57,8 @@ public class BrowseAction
private String groupId;
private String artifactId;
+
+ private String repositoryId;
public String browse()
{
@@ -168,4 +170,14 @@ public class BrowseAction
{
return results;
}
+
+ public String getRepositoryId(){
+
+ return repositoryId;
+ }
+
+ public void setRepositoryId(String repositoryId){
+
+ this.repositoryId = repositoryId;
+ }
}
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
index 286d32561..97dca610e 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
@@ -38,9 +38,10 @@ import com.opensymphony.xwork.ActionContext;
import com.opensymphony.xwork.Validateable;
/**
- * Browse the repository.
- *
+ * Browse the repository.
+ *
* TODO change name to ShowVersionedAction to conform to terminology.
+ *
* @plexus.component role="com.opensymphony.xwork.Action" role-hint="showArtifactAction"
*/
public class ShowArtifactAction
@@ -53,12 +54,12 @@ public class ShowArtifactAction
* @plexus.requirement role-hint="default"
*/
private RepositoryBrowsing repoBrowsing;
-
+
/**
* @plexus.requirement
*/
private UserRepositories userRepositories;
-
+
/* .\ Input Parameters \.________________________________________ */
private String groupId;
@@ -67,6 +68,8 @@ public class ShowArtifactAction
private String version;
+ private String repositoryId;
+
/* .\ Exposed Output Objects \.__________________________________ */
/**
@@ -89,16 +92,17 @@ public class ShowArtifactAction
private List dependencies;
/**
- * Show the versioned project information tab.
- *
- * TODO: Change name to 'project'
+ * Show the versioned project information tab. TODO: Change name to 'project'
*/
public String artifact()
throws ObjectNotFoundException, ArchivaDatabaseException
{
try
{
- this.model = repoBrowsing.selectVersion( getPrincipal(), getObservableRepos(), groupId, artifactId, version );
+ this.model =
+ repoBrowsing.selectVersion( getPrincipal(), getObservableRepos(), groupId, artifactId, version );
+ this.repositoryId =
+ repoBrowsing.getRepositoryId( getPrincipal(), getObservableRepos(), groupId, artifactId, version );
}
catch ( ObjectNotFoundException oe )
{
@@ -142,7 +146,8 @@ public class ShowArtifactAction
throws ObjectNotFoundException, ArchivaDatabaseException
{
System.out.println( "#### In reports." );
- // TODO: hook up reports on project - this.reports = artifactsDatabase.findArtifactResults( groupId, artifactId, version );
+ // TODO: hook up reports on project - this.reports = artifactsDatabase.findArtifactResults( groupId, artifactId,
+ // version );
System.out.println( "#### Found " + reports.size() + " reports." );
return SUCCESS;
@@ -171,12 +176,12 @@ public class ShowArtifactAction
return SUCCESS;
}
-
+
private String getPrincipal()
{
return ArchivaXworkUser.getActivePrincipal( ActionContext.getContext().getSession() );
}
-
+
private List<String> getObservableRepos()
{
try
@@ -271,4 +276,15 @@ public class ShowArtifactAction
{
return dependees;
}
+
+ public String getRepositoryId()
+ {
+ return repositoryId;
+ }
+
+ public void setRepositoryId( String repositoryId )
+ {
+ this.repositoryId = repositoryId;
+ }
+
}
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
index 124968aa5..c440fea84 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
@@ -45,6 +45,10 @@
<table class="infoTable">
<tr>
+ <th>Repository</th>
+ <td>${repositoryId}</td>
+ </tr>
+ <tr>
<th>Group ID</th>
<td>${model.groupId}</td>
</tr>