1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.repository.legacy.metadata;
20
21 import java.util.List;
22
23 import org.apache.maven.artifact.Artifact;
24 import org.apache.maven.artifact.repository.ArtifactRepository;
25 import org.apache.maven.artifact.repository.RepositoryRequest;
26
27 /**
28 * Forms a request to retrieve artifact metadata.
29 *
30 */
31 @Deprecated
32 public interface MetadataResolutionRequest extends RepositoryRequest {
33
34 /**
35 * Indicates whether network access to remote repositories has been disabled.
36 *
37 * @return {@code true} if remote access has been disabled, {@code false} otherwise.
38 */
39 @Override
40 boolean isOffline();
41
42 /**
43 * Enables/disables network access to remote repositories.
44 *
45 * @param offline {@code true} to disable remote access, {@code false} to allow network access.
46 * @return This request, never {@code null}.
47 */
48 @Override
49 MetadataResolutionRequest setOffline(boolean offline);
50
51 /**
52 * Gets the artifact to resolve metadata for.
53 *
54 * @return The artifact to resolve metadata for or {@code null} if not set.
55 */
56 Artifact getArtifact();
57
58 /**
59 * Sets the artifact for which to resolve metadata.
60 *
61 * @param artifact The artifact for which to resolve metadata.
62 * @return This request, never {@code null}.
63 */
64 MetadataResolutionRequest setArtifact(Artifact artifact);
65
66 /**
67 * Gets the local repository to use for the resolution.
68 *
69 * @return The local repository to use for the resolution or {@code null} if not set.
70 */
71 @Override
72 ArtifactRepository getLocalRepository();
73
74 /**
75 * Sets the local repository to use for the resolution.
76 *
77 * @param localRepository The local repository to use for the resolution.
78 * @return This request, never {@code null}.
79 */
80 @Override
81 MetadataResolutionRequest setLocalRepository(ArtifactRepository localRepository);
82
83 /**
84 * Gets the remote repositories to use for the resolution.
85 *
86 * @return The remote repositories to use for the resolution, never {@code null}.
87 */
88 @Override
89 List<ArtifactRepository> getRemoteRepositories();
90
91 /**
92 * Sets the remote repositories to use for the resolution.
93 *
94 * @param remoteRepositories The remote repositories to use for the resolution.
95 * @return This request, never {@code null}.
96 */
97 @Override
98 MetadataResolutionRequest setRemoteRepositories(List<ArtifactRepository> remoteRepositories);
99
100 /**
101 * Determines whether the managed version information should be retrieved.
102 *
103 * @return {@code true} if the dependency management information should be retrieved, {@code false} otherwise.
104 */
105 boolean isResolveManagedVersions();
106
107 /**
108 * Enables/disables resolution of the dependency management information.
109 *
110 * @param resolveManagedVersions {@code true} if the dependency management information should be retrieved, {@code
111 * false} otherwise.
112 * @return This request, never {@code null}.
113 */
114 MetadataResolutionRequest setResolveManagedVersions(boolean resolveManagedVersions);
115 }