1 package org.apache.maven.repository.legacy.metadata;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.List;
23
24 import org.apache.maven.artifact.Artifact;
25 import org.apache.maven.artifact.repository.ArtifactRepository;
26 import org.apache.maven.artifact.repository.DefaultRepositoryRequest;
27 import org.apache.maven.artifact.repository.RepositoryRequest;
28 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
29
30
31
32
33
34
35 public class DefaultMetadataResolutionRequest
36 implements MetadataResolutionRequest
37 {
38
39 private Artifact artifact;
40
41 private boolean resolveManagedVersions;
42
43 private RepositoryRequest repositoryRequest;
44
45 public DefaultMetadataResolutionRequest()
46 {
47 repositoryRequest = new DefaultRepositoryRequest();
48 }
49
50 public DefaultMetadataResolutionRequest( RepositoryRequest repositoryRequest )
51 {
52 this.repositoryRequest = new DefaultRepositoryRequest( repositoryRequest );
53 }
54
55 public DefaultMetadataResolutionRequest( ArtifactResolutionRequest resolutionRequest )
56 {
57 this.repositoryRequest = new DefaultRepositoryRequest( resolutionRequest );
58 }
59
60 public Artifact getArtifact()
61 {
62 return artifact;
63 }
64
65 public DefaultMetadataResolutionRequest setArtifact( Artifact artifact )
66 {
67 this.artifact = artifact;
68
69 return this;
70 }
71
72 public ArtifactRepository getLocalRepository()
73 {
74 return repositoryRequest.getLocalRepository();
75 }
76
77 public DefaultMetadataResolutionRequest setLocalRepository( ArtifactRepository localRepository )
78 {
79 repositoryRequest.setLocalRepository( localRepository );
80
81 return this;
82 }
83
84 public List<ArtifactRepository> getRemoteRepositories()
85 {
86 return repositoryRequest.getRemoteRepositories();
87 }
88
89 public DefaultMetadataResolutionRequest setRemoteRepositories( List<ArtifactRepository> remoteRepositories )
90 {
91 repositoryRequest.setRemoteRepositories( remoteRepositories );
92
93 return this;
94 }
95
96 public boolean isResolveManagedVersions()
97 {
98 return resolveManagedVersions;
99 }
100
101 public DefaultMetadataResolutionRequest setResolveManagedVersions( boolean resolveManagedVersions )
102 {
103 this.resolveManagedVersions = resolveManagedVersions;
104
105 return this;
106 }
107
108 public boolean isOffline()
109 {
110 return repositoryRequest.isOffline();
111 }
112
113 public DefaultMetadataResolutionRequest setOffline( boolean offline )
114 {
115 repositoryRequest.setOffline( offline );
116
117 return this;
118 }
119
120 public boolean isForceUpdate()
121 {
122 return repositoryRequest.isForceUpdate();
123 }
124
125 public DefaultMetadataResolutionRequest setForceUpdate( boolean forceUpdate )
126 {
127 repositoryRequest.setForceUpdate( forceUpdate );
128
129 return this;
130 }
131
132 }