1 package org.apache.archiva.scheduler.repository;
3 import org.apache.archiva.redback.components.taskqueue.Task;
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
16 * http://www.apache.org/licenses/LICENSE-2.0
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
27 * DataRefreshTask - task for discovering changes in the repository
28 * and updating all associated data.
32 public class RepositoryTask
35 private String repositoryId;
37 private File resourceFile;
39 private boolean updateRelatedArtifacts;
41 private boolean scanAll;
43 public boolean isScanAll()
48 public void setScanAll( boolean scanAll )
50 this.scanAll = scanAll;
53 public String getRepositoryId()
58 public void setRepositoryId( String repositoryId )
60 this.repositoryId = repositoryId;
63 public long getMaxExecutionTime()
68 public File getResourceFile()
73 public void setResourceFile( File resourceFile )
75 this.resourceFile = resourceFile;
78 public boolean isUpdateRelatedArtifacts()
80 return updateRelatedArtifacts;
83 public void setUpdateRelatedArtifacts( boolean updateRelatedArtifacts )
85 this.updateRelatedArtifacts = updateRelatedArtifacts;
89 public String toString()
91 return "RepositoryTask [repositoryId=" + repositoryId + ", resourceFile=" + resourceFile + ", scanAll="
92 + scanAll + ", updateRelatedArtifacts=" + updateRelatedArtifacts + "]";
100 result = prime * result + ( ( repositoryId == null ) ? 0 : repositoryId.hashCode() );
101 result = prime * result + ( ( resourceFile == null ) ? 0 : resourceFile.hashCode() );
106 public boolean equals( Object obj )
116 if ( getClass() != obj.getClass() )
120 RepositoryTask other = (RepositoryTask) obj;
121 if ( repositoryId == null )
123 if ( other.repositoryId != null )
128 else if ( !repositoryId.equals( other.repositoryId ) )
132 if ( resourceFile == null )
134 if ( other.resourceFile != null )
139 else if ( !resourceFile.equals( other.resourceFile ) )