Coverage Report - org.apache.maven.archiva.scheduled.tasks.RepositoryTask
 
Classes in this File Line Coverage Branch Coverage Complexity
RepositoryTask
0%
0/38
0%
0/22
0
 
 1  
 package org.apache.maven.archiva.scheduled.tasks;
 2  
 
 3  
 import java.io.File;
 4  
 
 5  
 import org.codehaus.plexus.taskqueue.Task;
 6  
 
 7  
 /*
 8  
  * Licensed to the Apache Software Foundation (ASF) under one
 9  
  * or more contributor license agreements.  See the NOTICE file
 10  
  * distributed with this work for additional information
 11  
  * regarding copyright ownership.  The ASF licenses this file
 12  
  * to you under the Apache License, Version 2.0 (the
 13  
  * "License"); you may not use this file except in compliance
 14  
  * with the License.  You may obtain a copy of the License at
 15  
  *
 16  
  *   http://www.apache.org/licenses/LICENSE-2.0
 17  
  *
 18  
  * Unless required by applicable law or agreed to in writing,
 19  
  * software distributed under the License is distributed on an
 20  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 21  
  * KIND, either express or implied.  See the License for the
 22  
  * specific language governing permissions and limitations
 23  
  * under the License.
 24  
  */
 25  
 
 26  
 /**
 27  
  * DataRefreshTask - task for discovering changes in the repository 
 28  
  * and updating all associated data. 
 29  
  *
 30  
  * @version $Id: DataRefreshTask.java 525176 2007-04-03 15:21:33Z joakime $
 31  
  */
 32  0
 public class RepositoryTask
 33  
     implements Task
 34  
 {
 35  
     @Override
 36  
     public int hashCode()
 37  
     {
 38  0
         final int prime = 31;
 39  0
         int result = 1;
 40  0
         result = prime * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() );
 41  0
         result = prime * result + ( ( resourceFile == null ) ? 0 : resourceFile.hashCode() );
 42  0
         return result;
 43  
     }
 44  
 
 45  
     @Override
 46  
     public boolean equals( Object obj )
 47  
     {
 48  0
         if ( this == obj )
 49  0
             return true;
 50  0
         if ( obj == null )
 51  0
             return false;
 52  0
         if ( getClass() != obj.getClass() )
 53  0
             return false;
 54  0
         RepositoryTask other = (RepositoryTask) obj;
 55  0
         if ( repositoryId == null )
 56  
         {
 57  0
             if ( other.repositoryId != null )
 58  0
                 return false;
 59  
         }
 60  0
         else if ( !repositoryId.equals( other.repositoryId ) )
 61  0
             return false;
 62  0
         if ( resourceFile == null )
 63  
         {
 64  0
             if ( other.resourceFile != null )
 65  0
                 return false;
 66  
         }
 67  0
         else if ( !resourceFile.equals( other.resourceFile ) )
 68  0
             return false;
 69  0
         return true;
 70  
     }
 71  
 
 72  
     private String repositoryId;
 73  
     
 74  
     private File resourceFile;
 75  
     
 76  
     private boolean updateRelatedArtifacts;
 77  
     
 78  
     private boolean scanAll;
 79  
     
 80  
     public boolean isScanAll()
 81  
     {
 82  0
         return scanAll;
 83  
     }
 84  
 
 85  
     public void setScanAll( boolean scanAll )
 86  
     {
 87  0
         this.scanAll = scanAll;
 88  0
     }
 89  
 
 90  
     public String getRepositoryId()
 91  
     {
 92  0
         return repositoryId;
 93  
     }
 94  
 
 95  
     public void setRepositoryId( String repositoryId )
 96  
     {
 97  0
         this.repositoryId = repositoryId;
 98  0
     }
 99  
 
 100  
     public long getMaxExecutionTime()
 101  
     {
 102  0
         return 0;
 103  
     }
 104  
 
 105  
     public File getResourceFile()
 106  
     {
 107  0
         return resourceFile;
 108  
     }
 109  
 
 110  
     public void setResourceFile( File resourceFile )
 111  
     {
 112  0
         this.resourceFile = resourceFile;
 113  0
     }
 114  
 
 115  
     public boolean isUpdateRelatedArtifacts()
 116  
     {
 117  0
         return updateRelatedArtifacts;
 118  
     }
 119  
 
 120  
     public void setUpdateRelatedArtifacts( boolean updateRelatedArtifacts )
 121  
     {
 122  0
         this.updateRelatedArtifacts = updateRelatedArtifacts;
 123  0
     }
 124  
 
 125  
     @Override
 126  
     public String toString()
 127  
     {
 128  0
         return "RepositoryTask [repositoryId=" + repositoryId + ", resourceFile=" + resourceFile + ", scanAll="
 129  
             + scanAll + ", updateRelatedArtifacts=" + updateRelatedArtifacts + "]";
 130  
     }
 131  
 }