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 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
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 | |
} |