diff options
author | Olivier Lamy <olamy@apache.org> | 2012-02-24 21:18:34 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-02-24 21:18:34 +0000 |
commit | f1f0ceaf47e692c20a110a8f67990b5edcc5d707 (patch) | |
tree | 68eee3a8907589d5c6d6ad3252c6fd975b2f37b0 /archiva-modules/metadata/metadata-model/src | |
parent | b4bd369412569dec700aa9187a6b009cae0ba771 (diff) | |
download | archiva-f1f0ceaf47e692c20a110a8f67990b5edcc5d707.tar.gz archiva-f1f0ceaf47e692c20a110a8f67990b5edcc5d707.zip |
[MRM-1573] improve browse service with returning ProjectVersionMetadata (so add some annotation for REST exchange)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1293423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-model/src')
10 files changed, 30 insertions, 1 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java index bbee4efcf..d58936d77 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/CiManagement.java @@ -19,11 +19,14 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + /** * Information about the CI system used by the project. * * @todo considering moving this to a facet - avoid referring to it externally */ +@XmlRootElement( name = "ciManagement" ) public class CiManagement { /** diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java index a2658769d..772984fd9 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Dependency.java @@ -19,11 +19,14 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + /** * Information about a dependency that this project has on another project or artifact. * * @todo will be reviewing what is appropriate for the base here - rest should be in a maven dependency facet - avoid details on it externally */ +@XmlRootElement( name = "dependency" ) public class Dependency { /** diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java index 5e7d82d3c..387813e36 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/FacetedMetadata.java @@ -19,6 +19,7 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlElement; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -77,7 +78,7 @@ public abstract class FacetedMetadata /** * Get all available facets as a Map (typically used by bean rendering, such as in Archiva's JSPs). - + * * @return the map of facets * @see #facets */ diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java index 83eecda0d..12137ba43 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/IssueManagement.java @@ -19,11 +19,14 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + /** * Information about the issue management system used by the project. * * @todo considering moving this to a facet - avoid referring to it externally */ +@XmlRootElement( name = "issueManagement" ) public class IssueManagement { /** diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java index b1ce93b77..5fbb28015 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java @@ -19,9 +19,12 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + /** * A description of a particular license used by a project. */ +@XmlRootElement( name = "license" ) public class License { /** diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java index 129358d4a..922e2d5d8 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MailingList.java @@ -1,5 +1,6 @@ package org.apache.archiva.metadata.model; +import javax.xml.bind.annotation.XmlRootElement; import java.util.List; /* @@ -26,6 +27,7 @@ import java.util.List; * * @todo considering moving this to a facet - avoid referring to it externally */ +@XmlRootElement( name = "mailingList" ) public class MailingList { /** diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MetadataFacet.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MetadataFacet.java index ebc3dd2ff..d146efd2d 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MetadataFacet.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/MetadataFacet.java @@ -19,14 +19,20 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import java.util.Map; +@XmlRootElement( name = "metadataFacet" ) public interface MetadataFacet { + @XmlElement(name = "facetId") String getFacetId(); + @XmlElement(name = "name") String getName(); + @XmlElement(name = "properties") Map<String, String> toProperties(); void fromProperties( Map<String, String> properties ); diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java index f3d841d4c..23048cbed 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Organization.java @@ -19,6 +19,9 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement( name = "organization" ) public class Organization { private String name; diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java index b61135e78..d614bc990 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/ProjectVersionMetadata.java @@ -19,9 +19,11 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.List; +@XmlRootElement( name = "projectVersionMetadata" ) public class ProjectVersionMetadata extends FacetedMetadata { diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java index a3d8158fb..5e45e931f 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/Scm.java @@ -19,6 +19,9 @@ package org.apache.archiva.metadata.model; * under the License. */ +import javax.xml.bind.annotation.XmlRootElement; + +@XmlRootElement( name = "scm" ) public class Scm { private String connection; |