View Javadoc
1   package org.apache.maven.settings.crypto;
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.List;
23  
24  import org.apache.maven.settings.Proxy;
25  import org.apache.maven.settings.Server;
26  import org.apache.maven.settings.building.SettingsProblem;
27  
28  /**
29   * Collects the output of the settings decrypter.
30   *
31   * @author Benjamin Bentmann
32   */
33  public interface SettingsDecryptionResult
34  {
35  
36      /**
37       * Gets the decrypted server. This is a convenience method to retrieve the first element from {@link #getServers()}.
38       *
39       * @return The decrypted server or {@code null}.
40       */
41      Server getServer();
42  
43      /**
44       * Gets the decrypted servers.
45       *
46       * @return The decrypted server, can be empty but never {@code null}.
47       */
48      List<Server> getServers();
49  
50      /**
51       * Gets the decrypted proxy. This is a convenience method to retrieve the first element from {@link #getProxies()}.
52       *
53       * @return The decrypted proxy or {@code null}.
54       */
55      Proxy getProxy();
56  
57      /**
58       * Gets the decrypted proxies.
59       *
60       * @return The decrypted proxy, can be empty but never {@code null}.
61       */
62      List<Proxy> getProxies();
63  
64      /**
65       * Gets the problems that were encountered during the settings decryption.
66       *
67       * @return The problems that were encountered during the decryption, can be empty but never {@code null}.
68       */
69      List<SettingsProblem> getProblems();
70  
71  }