View Javadoc
1   /*
2    * #%L
3    * wcm.io
4    * %%
5    * Copyright (C) 2017 wcm.io
6    * %%
7    * Licensed under the Apache License, Version 2.0 (the "License");
8    * you may not use this file except in compliance with the License.
9    * You may obtain a copy of the License at
10   *
11   *      http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing, software
14   * distributed under the License is distributed on an "AS IS" BASIS,
15   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   * See the License for the specific language governing permissions and
17   * limitations under the License.
18   * #L%
19   */
20  package io.wcm.tooling.commons.packmgr.install;
21  
22  import java.io.IOException;
23  
24  import org.apache.http.client.protocol.HttpClientContext;
25  import org.apache.http.impl.client.CloseableHttpClient;
26  
27  import io.wcm.tooling.commons.packmgr.PackageManagerException;
28  import io.wcm.tooling.commons.packmgr.PackageManagerHelper;
29  import io.wcm.tooling.commons.packmgr.PackageManagerProperties;
30  
31  /**
32   * Interface any Vendor Package Installer must provide
33   */
34  public interface VendorPackageInstaller {
35  
36    /**
37     * Install a Package
38     * @param packageFile Package to be installed
39     * @param replication Replicate package
40     * @param pkgmgr Package Manager
41     * @param httpClient Http Client
42     * @param packageManagerHttpClientContext Http Client context used to call the package manager
43     * @param consoleHttpClientContext Http Client context used to call the Felix console
44     * @param props Package manager properties
45     * @throws IOException If calls to the Web Service fail
46     * @throws PackageManagerException If the package installation failed
47     */
48    void installPackage(PackageFile packageFile, boolean replication, PackageManagerHelper pkgmgr,
49        CloseableHttpClient httpClient, HttpClientContext packageManagerHttpClientContext, HttpClientContext consoleHttpClientContext,
50        PackageManagerProperties props) throws IOException, PackageManagerException;
51  
52  }