You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by jo...@apache.org on 2007/02/27 23:48:38 UTC

svn commit: r512468 - in /maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model: ./ health/

Author: joakime
Date: Tue Feb 27 14:48:37 2007
New Revision: 512468

URL: http://svn.apache.org/viewvc?view=rev&rev=512468
Log:
Stab at model.

Added:
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java   (with props)
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java   (with props)
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java   (with props)
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java   (with props)
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java   (with props)
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java   (with props)
Modified:
    maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java

Modified: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java?view=diff&rev=512468&r1=512467&r2=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java (original)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaArtifact.java Tue Feb 27 14:48:37 2007
@@ -19,24 +19,11 @@
  * under the License.
  */
 
-import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.InvalidArtifactRTException;
-import org.apache.maven.artifact.handler.ArtifactHandler;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.versioning.ArtifactVersion;
-import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
-import org.apache.maven.artifact.versioning.VersionRange;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
-import java.util.regex.Matcher;
 
 /**
  * ArchivaArtifact 
@@ -47,84 +34,23 @@
  * @plexus.component role="org.apache.maven.archiva.model.ArchivaArtifact"
  */
 public class ArchivaArtifact
-    implements Artifact
+    implements RepositoryContent
 {
-    private ArtifactHandler artifactHandler;
-
-    private String artifactId;
-
     private Map attached;
 
-    private List availableVersions;
-
-    /**
-     * The resolved version for the artifact after conflict resolution, that has not been transformed.
-     *
-     * @todo should be final
-     */
-    private String baseVersion;
-
     private String classifier;
 
-    private ArtifactFilter dependencyFilter;
-
-    private List dependencyTrail;
-
-    private String downloadUrl;
-
-    private File file;
-
-    private String groupId;
-
-    private Map metadataMap;
-
-    private boolean optional;
-
-    private boolean release;
-
-    private ArtifactRepository repository;
-
-    private boolean resolved;
-
-    private String scope;
+    private RepositoryContentKey key;
 
     private String type;
 
-    private String version;
-
-    private VersionRange versionRange;
-
-    public ArchivaArtifact( String groupId, String artifactId, VersionRange versionRange, String scope, String type,
-                            String classifier, ArtifactHandler artifactHandler )
+    public ArchivaArtifact( ArtifactRepository repository, String groupId, String artifactId, String version, String classifier, String type )
     {
-        this( groupId, artifactId, versionRange, scope, type, classifier, artifactHandler, false );
-    }
-
-    public ArchivaArtifact( String groupId, String artifactId, VersionRange versionRange, String scope, String type,
-                            String classifier, ArtifactHandler artifactHandler, boolean optional )
-    {
-        this.groupId = groupId;
-
-        this.artifactId = artifactId;
-
-        this.versionRange = versionRange;
-
-        selectVersionFromNewRangeIfAvailable();
-
-        this.artifactHandler = artifactHandler;
-
-        this.scope = scope;
-
-        this.type = type;
-
-        if ( classifier == null )
-        {
-            classifier = artifactHandler.getClassifier();
-        }
+        this.key = new RepositoryContentKey( repository, groupId, artifactId, version );
 
         this.classifier = classifier;
 
-        this.optional = optional;
+        this.type = type;
 
         validateIdentity();
     }
@@ -136,216 +62,24 @@
         attachedArtifact.clearAttached();
     }
 
-    public void addMetadata( ArtifactMetadata metadata )
-    {
-        if ( metadataMap == null )
-        {
-            metadataMap = new HashMap();
-        }
-
-        ArtifactMetadata m = (ArtifactMetadata) metadataMap.get( metadata.getKey() );
-        if ( m != null )
-        {
-            m.merge( metadata );
-        }
-        else
-        {
-            metadataMap.put( metadata.getKey(), metadata );
-        }
-    }
-
     public void clearAttached()
     {
         attached.clear();
     }
 
-    public int compareTo( Object o )
-    {
-        Artifact a = (Artifact) o;
-
-        int result = groupId.compareTo( a.getGroupId() );
-        if ( result == 0 )
-        {
-            result = artifactId.compareTo( a.getArtifactId() );
-            if ( result == 0 )
-            {
-                result = type.compareTo( a.getType() );
-                if ( result == 0 )
-                {
-                    if ( classifier == null )
-                    {
-                        if ( a.getClassifier() != null )
-                        {
-                            result = 1;
-                        }
-                    }
-                    else
-                    {
-                        if ( a.getClassifier() != null )
-                        {
-                            result = classifier.compareTo( a.getClassifier() );
-                        }
-                        else
-                        {
-                            result = -1;
-                        }
-                    }
-                    if ( result == 0 )
-                    {
-                        // We don't consider the version range in the comparison, just the resolved version
-                        result = version.compareTo( a.getVersion() );
-                    }
-                }
-            }
-        }
-        return result;
-    }
-
-    public boolean equals( Object o )
-    {
-        if ( o == this )
-        {
-            return true;
-        }
-
-        if ( !( o instanceof Artifact ) )
-        {
-            return false;
-        }
-
-        Artifact a = (Artifact) o;
-
-        if ( !a.getGroupId().equals( groupId ) )
-        {
-            return false;
-        }
-        else if ( !a.getArtifactId().equals( artifactId ) )
-        {
-            return false;
-        }
-        else if ( !a.getVersion().equals( version ) )
-        {
-            return false;
-        }
-        else if ( !a.getType().equals( type ) )
-        {
-            return false;
-        }
-        else if ( a.getClassifier() == null ? classifier != null : !a.getClassifier().equals( classifier ) )
-        {
-            return false;
-        }
-
-        // We don't consider the version range in the comparison, just the resolved version
-
-        return true;
-    }
-
-    public ArtifactHandler getArtifactHandler()
-    {
-        return artifactHandler;
-    }
-
-    public String getArtifactId()
-    {
-        return artifactId;
-    }
-
     public Map getAttached()
     {
         return attached;
     }
 
-    public List getAvailableVersions()
-    {
-        return availableVersions;
-    }
-
-    public String getBaseVersion()
-    {
-        if ( baseVersion == null )
-        {
-            baseVersion = version;
-
-            if ( version == null )
-            {
-                throw new NullPointerException( "version was null for " + groupId + ":" + artifactId );
-            }
-        }
-        return baseVersion;
-    }
-
     public String getClassifier()
     {
         return classifier;
     }
 
-    public String getDependencyConflictId()
-    {
-        StringBuffer sb = new StringBuffer();
-        sb.append( getGroupId() );
-        sb.append( ":" );
-        appendArtifactTypeClassifierString( sb );
-        return sb.toString();
-    }
-
-    public ArtifactFilter getDependencyFilter()
-    {
-        return dependencyFilter;
-    }
-
-    public List getDependencyTrail()
-    {
-        return dependencyTrail;
-    }
-
-    // ----------------------------------------------------------------------
-    //
-    // ----------------------------------------------------------------------
-
-    public String getDownloadUrl()
-    {
-        return downloadUrl;
-    }
-
-    public File getFile()
-    {
-        return file;
-    }
-
-    public String getGroupId()
-    {
-        return groupId;
-    }
-
-    public String getId()
-    {
-        return getDependencyConflictId() + ":" + getBaseVersion();
-    }
-
-    public Collection getMetadataList()
-    {
-        return metadataMap == null ? Collections.EMPTY_LIST : metadataMap.values();
-    }
-
-    // ----------------------------------------------------------------------
-    // Object overrides
-    // ----------------------------------------------------------------------
-
-    public ArtifactRepository getRepository()
-    {
-        return repository;
-    }
-
-    public String getScope()
-    {
-        return scope;
-    }
-
-    public ArtifactVersion getSelectedVersion()
-        throws OverConstrainedVersionException
+    public RepositoryContentKey getRepositoryContentKey()
     {
-        return versionRange.getSelectedVersion( this );
+        return key;
     }
 
     public String getType()
@@ -353,213 +87,42 @@
         return type;
     }
 
-    public String getVersion()
-    {
-        return version;
-    }
-
-    public VersionRange getVersionRange()
-    {
-        return versionRange;
-    }
-
     public boolean hasClassifier()
     {
         return StringUtils.isNotEmpty( classifier );
     }
 
-    public int hashCode()
-    {
-        int result = 17;
-        result = 37 * result + groupId.hashCode();
-        result = 37 * result + artifactId.hashCode();
-        result = 37 * result + type.hashCode();
-        if ( version != null )
-        {
-            result = 37 * result + version.hashCode();
-        }
-        result = 37 * result + ( classifier != null ? classifier.hashCode() : 0 );
-        return result;
-    }
-
-    public boolean isOptional()
-    {
-        return optional;
-    }
-
-    public boolean isRelease()
-    {
-        return release;
-    }
-
-    public boolean isResolved()
-    {
-        return resolved;
-    }
-
-    public boolean isSelectedVersionKnown()
-        throws OverConstrainedVersionException
-    {
-        return versionRange.isSelectedVersionKnown( this );
-    }
-
-    public boolean isSnapshot()
-    {
-        if ( version != null || baseVersion != null )
-        {
-            Matcher m = VERSION_FILE_PATTERN.matcher( getBaseVersion() );
-            if ( m.matches() )
-            {
-                setBaseVersion( m.group( 1 ) + "-" + SNAPSHOT_VERSION );
-                return true;
-            }
-            else
-            {
-                return getBaseVersion().endsWith( SNAPSHOT_VERSION ) || getBaseVersion().equals( LATEST_VERSION );
-            }
-        }
-        else
-        {
-            return false;
-        }
-    }
-
-    public void selectVersion( String version )
-    {
-        this.version = version;
-        this.baseVersion = version;
-    }
-
-    public void setArtifactHandler( ArtifactHandler artifactHandler )
-    {
-        this.artifactHandler = artifactHandler;
-    }
-
-    public void setArtifactId( String artifactId )
-    {
-        this.artifactId = artifactId;
-    }
-
     public void setAttached( Map attached )
     {
         this.attached = attached;
     }
 
-    public void setAvailableVersions( List availableVersions )
-    {
-        this.availableVersions = availableVersions;
-    }
-
-    public void setBaseVersion( String baseVersion )
-    {
-        this.baseVersion = baseVersion;
-    }
-
-    public void setDependencyFilter( ArtifactFilter artifactFilter )
-    {
-        this.dependencyFilter = artifactFilter;
-    }
-
-    public void setDependencyTrail( List dependencyTrail )
-    {
-        this.dependencyTrail = dependencyTrail;
-    }
-
-    public void setDownloadUrl( String downloadUrl )
-    {
-        this.downloadUrl = downloadUrl;
-    }
-
-    public void setFile( File file )
-    {
-        this.file = file;
-    }
-
-    public void setGroupId( String groupId )
-    {
-        this.groupId = groupId;
-    }
-
-    public void setOptional( boolean optional )
-    {
-        this.optional = optional;
-    }
-
-    public void setRelease( boolean release )
-    {
-        this.release = release;
-    }
-
-    public void setRepository( ArtifactRepository repository )
-    {
-        this.repository = repository;
-    }
-
-    public void setResolved( boolean resolved )
-    {
-        this.resolved = resolved;
-    }
-
-    public void setResolvedVersion( String version )
-    {
-        this.version = version;
-        // retain baseVersion
-    }
-
-    public void setScope( String scope )
-    {
-        this.scope = scope;
-    }
-
-    public void setVersion( String version )
+    public void setRepositoryContentKey( RepositoryContentKey key )
     {
-        this.version = version;
-        this.baseVersion = version;
-        this.versionRange = null;
-    }
-
-    public void setVersionRange( VersionRange versionRange )
-    {
-        this.versionRange = versionRange;
-
-        selectVersionFromNewRangeIfAvailable();
+        this.key = key;
     }
 
     public String toString()
     {
         StringBuffer sb = new StringBuffer();
-        if ( getGroupId() != null )
+        if ( key.getGroupId() != null )
         {
-            sb.append( getGroupId() );
+            sb.append( key.getGroupId() );
             sb.append( ":" );
         }
         appendArtifactTypeClassifierString( sb );
         sb.append( ":" );
-        if ( version != null || baseVersion != null )
-        {
-            sb.append( getBaseVersion() );
-        }
-        else
+        if ( key.getVersion() != null )
         {
-            sb.append( versionRange.toString() );
-        }
-        if ( scope != null )
-        {
-            sb.append( ":" );
-            sb.append( scope );
+            sb.append( key.getVersion() );
         }
+
         return sb.toString();
     }
 
-    public void updateVersion( String version, ArtifactRepository localRepository )
-    {
-        setResolvedVersion( version );
-        setFile( new File( localRepository.getBasedir(), localRepository.pathOf( this ) ) );
-    }
-    
     private void appendArtifactTypeClassifierString( StringBuffer sb )
     {
-        sb.append( getArtifactId() );
+        sb.append( key.getArtifactId() );
         sb.append( ":" );
         sb.append( getType() );
         if ( hasClassifier() )
@@ -574,41 +137,29 @@
         return value == null || value.trim().length() < 1;
     }
 
-    private void selectVersionFromNewRangeIfAvailable()
-    {
-        if ( versionRange != null && versionRange.getRecommendedVersion() != null )
-        {
-            selectVersion( versionRange.getRecommendedVersion().toString() );
-        }
-        else
-        {
-            this.version = null;
-            this.baseVersion = null;
-        }
-    }
-
     private void validateIdentity()
     {
-        if ( empty( groupId ) )
+        if ( empty( key.getGroupId() ) )
         {
-            throw new InvalidArtifactRTException( groupId, artifactId, getVersion(), type,
+            throw new InvalidArtifactRTException( key.getGroupId(), key.getArtifactId(), key.getVersion(), type,
                                                   "The groupId cannot be empty." );
         }
 
-        if ( artifactId == null )
+        if ( key.getArtifactId() == null )
         {
-            throw new InvalidArtifactRTException( groupId, artifactId, getVersion(), type,
+            throw new InvalidArtifactRTException( key.getGroupId(), key.getArtifactId(), key.getVersion(), type,
                                                   "The artifactId cannot be empty." );
         }
 
         if ( type == null )
         {
-            throw new InvalidArtifactRTException( groupId, artifactId, getVersion(), type, "The type cannot be empty." );
+            throw new InvalidArtifactRTException( key.getGroupId(), key.getArtifactId(), key.getVersion(), type,
+                                                  "The type cannot be empty." );
         }
 
-        if ( version == null && versionRange == null )
+        if ( key.getVersion() == null )
         {
-            throw new InvalidArtifactRTException( groupId, artifactId, getVersion(), type,
+            throw new InvalidArtifactRTException( key.getGroupId(), key.getArtifactId(), key.getVersion(), type,
                                                   "The version cannot be empty." );
         }
     }

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,77 @@
+package org.apache.maven.archiva.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * ArchivaRepositoryMetadata 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class ArchivaRepositoryMetadata
+    implements RepositoryContent
+{
+    private List availableVersions = new ArrayList();
+    
+    private RepositoryContentKey key;
+    
+    private String releasedVersion;
+
+    public ArchivaRepositoryMetadata( ArtifactRepository repository, String groupId, String artifactId, String version )
+    {
+        this.key = new RepositoryContentKey( repository, groupId, artifactId, version );
+    }
+
+    public List getAvailableVersions()
+    {
+        return availableVersions;
+    }
+
+    public String getReleasedVersion()
+    {
+        return releasedVersion;
+    }
+
+    public RepositoryContentKey getRepositoryContentKey()
+    {
+        return this.key;
+    }
+
+    public void setAvailableVersions( List availableVersions )
+    {
+        this.availableVersions = availableVersions;
+    }
+
+    public void setReleasedVersion( String releasedVersion )
+    {
+        this.releasedVersion = releasedVersion;
+    }
+
+    public void setRepositoryContentKey( RepositoryContentKey key )
+    {
+        this.key = key;
+    }
+
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/ArchivaRepositoryMetadata.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,33 @@
+package org.apache.maven.archiva.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * RepositoryContent 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface RepositoryContent
+{
+    public RepositoryContentKey getRepositoryContentKey();
+
+    public void setRepositoryContentKey( RepositoryContentKey key );
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContent.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,87 @@
+package org.apache.maven.archiva.model;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+
+/**
+ * RepositoryContentKey - the golden key for all content within the repository. 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class RepositoryContentKey
+{
+    private String artifactId;
+    
+    private String groupId;
+
+    private ArtifactRepository repository;
+
+    private String version;
+
+    public RepositoryContentKey( ArtifactRepository repository, String groupId, String artifactId, String version )
+    {
+        this.repository = repository;
+        this.groupId = groupId;
+        this.artifactId = artifactId;
+        this.version = version;
+    }
+
+    public String getArtifactId()
+    {
+        return artifactId;
+    }
+
+    public String getGroupId()
+    {
+        return groupId;
+    }
+
+    public ArtifactRepository getRepository()
+    {
+        return repository;
+    }
+
+    public String getVersion()
+    {
+        return version;
+    }
+
+    public void setArtifactId( String artifactId )
+    {
+        this.artifactId = artifactId;
+    }
+
+    public void setGroupId( String groupId )
+    {
+        this.groupId = groupId;
+    }
+
+    public void setRepository( ArtifactRepository repository )
+    {
+        this.repository = repository;
+    }
+
+    public void setVersion( String version )
+    {
+        this.version = version;
+    }
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/RepositoryContentKey.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,6 @@
+package org.apache.maven.archiva.model.health;
+
+public class ArtifactHealth
+{
+
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/ArtifactHealth.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,77 @@
+package org.apache.maven.archiva.model.health;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * HealthProblem 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class HealthProblem
+{
+    private String type;
+
+    private String origin;
+
+    private String message;
+
+    public HealthProblem()
+    {
+
+    }
+
+    public HealthProblem( String type, String origin, String message )
+    {
+        this.type = type;
+        this.origin = origin;
+        this.message = message;
+    }
+
+    public String getMessage()
+    {
+        return message;
+    }
+
+    public void setMessage( String message )
+    {
+        this.message = message;
+    }
+
+    public String getOrigin()
+    {
+        return origin;
+    }
+
+    public void setOrigin( String origin )
+    {
+        this.origin = origin;
+    }
+
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/HealthProblem.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java?view=auto&rev=512468
==============================================================================
--- maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java (added)
+++ maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java Tue Feb 27 14:48:37 2007
@@ -0,0 +1,63 @@
+package org.apache.maven.archiva.model.health;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.archiva.model.ArchivaRepositoryMetadata;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * RepositoryMetadataHealth 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class RepositoryMetadataHealth
+{
+    private ArchivaRepositoryMetadata repositoryMetadata;
+
+    private List problems = new ArrayList();
+
+    public void addProblem( HealthProblem problem )
+    {
+        this.problems.add( problem );
+    }
+
+    public List getProblems()
+    {
+        return problems;
+    }
+
+    public void setProblems( List problems )
+    {
+        this.problems = problems;
+    }
+
+    public ArchivaRepositoryMetadata getRepositoryMetadata()
+    {
+        return repositoryMetadata;
+    }
+
+    public void setRepositoryMetadata( ArchivaRepositoryMetadata repositoryMetadata )
+    {
+        this.repositoryMetadata = repositoryMetadata;
+    }
+}

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Propchange: maven/archiva/trunk/archiva-model/src/main/java/org/apache/maven/archiva/model/health/RepositoryMetadataHealth.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain