package org.eclipse.aether;

View Javadoc

2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * “License”); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 /
21
22 import java.util.Map;
23
24 import org.eclipse.aether.artifact.ArtifactTypeRegistry;
25 import org.eclipse.aether.collection.DependencyGraphTransformer;
26 import org.eclipse.aether.collection.DependencyManager;
27 import org.eclipse.aether.collection.DependencySelector;
28 import org.eclipse.aether.collection.DependencyTraverser;
29 import org.eclipse.aether.collection.VersionFilter;
30 import org.eclipse.aether.repository.AuthenticationSelector;
31 import org.eclipse.aether.repository.LocalRepository;
32 import org.eclipse.aether.repository.LocalRepositoryManager;
33 import org.eclipse.aether.repository.MirrorSelector;
34 import org.eclipse.aether.repository.ProxySelector;
35 import org.eclipse.aether.repository.WorkspaceReader;
36 import org.eclipse.aether.resolution.ArtifactDescriptorPolicy;
37 import org.eclipse.aether.resolution.ResolutionErrorPolicy;
38 import org.eclipse.aether.transfer.TransferListener;
39 import org.eclipse.aether.transform.FileTransformerManager;
40
41 /
*
42 * A special repository system session to enable decorating or proxying another session. To do so, clients have to
43 * create a subclass and implement {@link #getSession()}.
44 /
45 public abstract class AbstractForwardingRepositorySystemSession
46 implements RepositorySystemSession
47 {
48
49 /
*
50 * Creates a new forwarding session.
51 /
52 protected AbstractForwardingRepositorySystemSession()
53 {
54 }
55
56 /
*
57 * Gets the repository system session to which this instance forwards calls. It’s worth noting that this class does
58 * not save/cache the returned reference but queries this method before each forwarding. Hence, the session
59 * forwarded to may change over time or depending on the context (e.g. calling thread).
60 *
61 * @return The repository system session to forward calls to, never {@code null}.
62 */
63 protected abstract RepositorySystemSession getSession();
64
65 @Override
66 public boolean isOffline()
67 {
68 return getSession().isOffline();
69 }
70
71 @Override
72 public boolean isIgnoreArtifactDescriptorRepositories()
73 {
74 return getSession().isIgnoreArtifactDescriptorRepositories();
75 }
76
77 @Override
78 public ResolutionErrorPolicy getResolutionErrorPolicy()
79 {
80 return getSession().getResolutionErrorPolicy();
81 }
82
83 @Override
84 public ArtifactDescriptorPolicy getArtifactDescriptorPolicy()
85 {
86 return getSession().getArtifactDescriptorPolicy();
87 }
88
89 @Override
90 public String getChecksumPolicy()
91 {
92 return getSession().getChecksumPolicy();
93 }
94
95 @Override
96 public String getUpdatePolicy()
97 {
98 return getSession().getUpdatePolicy();
99 }
100
101 @Override
102 public LocalRepository getLocalRepository()
103 {
104 return getSession().getLocalRepository();
105 }
106
107 @Override
108 public LocalRepositoryManager getLocalRepositoryManager()
109 {
110 return getSession().getLocalRepositoryManager();
111 }
112
113 @Override
114 public WorkspaceReader getWorkspaceReader()
115 {
116 return getSession().getWorkspaceReader();
117 }
118
119 @Override
120 public RepositoryListener getRepositoryListener()
121 {
122 return getSession().getRepositoryListener();
123 }
124
125 @Override
126 public TransferListener getTransferListener()
127 {
128 return getSession().getTransferListener();
129 }
130
131 @Override
132 public Map<String, String> getSystemProperties()
133 {
134 return getSession().getSystemProperties();
135 }
136
137 @Override
138 public Map<String, String> getUserProperties()
139 {
140 return getSession().getUserProperties();
141 }
142
143 @Override
144 public Map<String, Object> getConfigProperties()
145 {
146 return getSession().getConfigProperties();
147 }
148
149 @Override
150 public MirrorSelector getMirrorSelector()
151 {
152 return getSession().getMirrorSelector();
153 }
154
155 @Override
156 public ProxySelector getProxySelector()
157 {
158 return getSession().getProxySelector();
159 }
160
161 @Override
162 public AuthenticationSelector getAuthenticationSelector()
163 {
164 return getSession().getAuthenticationSelector();
165 }
166
167 @Override
168 public ArtifactTypeRegistry getArtifactTypeRegistry()
169 {
170 return getSession().getArtifactTypeRegistry();
171 }
172
173 @Override
174 public DependencyTraverser getDependencyTraverser()
175 {
176 return getSession().getDependencyTraverser();
177 }
178
179 @Override
180 public DependencyManager getDependencyManager()
181 {
182 return getSession().getDependencyManager();
183 }
184
185 @Override
186 public DependencySelector getDependencySelector()
187 {
188 return getSession().getDependencySelector();
189 }
190
191 @Override
192 public VersionFilter getVersionFilter()
193 {
194 return getSession().getVersionFilter();
195 }
196
197 @Override
198 public DependencyGraphTransformer getDependencyGraphTransformer()
199 {
200 return getSession().getDependencyGraphTransformer();
201 }
202
203 @Override
204 public SessionData getData()
205 {
206 return getSession().getData();
207 }
208
209 @Override
210 public RepositoryCache getCache()
211 {
212 return getSession().getCache();
213 }
214
215 @Override
216 public FileTransformerManager getFileTransformerManager()
217 {
218 return getSession().getFileTransformerManager();
219 }
220
221 }

Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.

发布了133 篇原创文章 · 获赞 191 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/blog_programb/article/details/105631400