View Javadoc
1   /*
2    * #%L
3    * wcm.io
4    * %%
5    * Copyright (C) 2020 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.devops.conga.plugins.aem.maven.allpackage;
21  
22  import java.util.List;
23  
24  import io.wcm.devops.conga.plugins.aem.maven.model.ContentPackageFile;
25  
26  /**
27   * Set of content package files.
28   */
29  class ContentPackageFileSet implements FileSet<ContentPackageFile> {
30  
31    private final List<ContentPackageFile> contentPackages;
32    private final List<String> environmentRunModes;
33  
34    ContentPackageFileSet(List<ContentPackageFile> contentPackages, List<String> environmentRunModes) {
35      this.contentPackages = contentPackages;
36      this.environmentRunModes = environmentRunModes;
37    }
38  
39    @Override
40    public List<ContentPackageFile> getFiles() {
41      return this.contentPackages;
42    }
43  
44    @Override
45    public List<String> getEnvironmentRunModes() {
46      return this.environmentRunModes;
47    }
48  
49    @Override
50    public String toString() {
51      return environmentRunModes + ": " + contentPackages;
52    }
53  
54  }