1 package org
.argeo
.slc
.cms
.distribution
;
3 import java
.util
.ArrayList
;
4 import java
.util
.Iterator
;
7 import org
.argeo
.api
.a2
.A2Branch
;
8 import org
.argeo
.api
.a2
.A2Component
;
9 import org
.argeo
.api
.a2
.A2Contribution
;
10 import org
.argeo
.api
.a2
.A2Module
;
11 import org
.argeo
.api
.a2
.A2Source
;
12 import org
.argeo
.slc
.CategoryNameVersion
;
13 import org
.argeo
.slc
.DefaultCategoryNameVersion
;
14 import org
.argeo
.slc
.NameVersion
;
15 import org
.argeo
.slc
.build
.Distribution
;
16 import org
.argeo
.slc
.build
.ModularDistribution
;
18 public class A2Distribution
implements ModularDistribution
{
19 private List
<A2Source
> a2Sources
= new ArrayList
<>();
22 public String
getDistributionId() {
23 // TODO Auto-generated method stub
28 public String
getName() {
29 // TODO Auto-generated method stub
34 public String
getVersion() {
35 // TODO Auto-generated method stub
40 public Iterator
<?
extends NameVersion
> nameVersions() {
41 List
<CategoryNameVersion
> nameVersions
= new ArrayList
<>();
42 for (A2Source a2Source
: a2Sources
) {
43 for (A2Contribution a2Contribution
: a2Source
.listContributions(null)) {
44 for (A2Component a2Component
: a2Contribution
.listComponents(null)) {
45 for (A2Branch a2Branch
: a2Component
.listBranches(null)) {
46 for (A2Module a2Module
: a2Branch
.listModules(null)) {
47 CategoryNameVersion nameVersion
= new DefaultCategoryNameVersion(a2Contribution
.getId(),
48 a2Component
.getId(), a2Module
.getVersion().toString());
49 nameVersions
.add(nameVersion
);
55 return nameVersions
.iterator();
59 public Distribution
getModuleDistribution(String moduleName
, String moduleVersion
) {
60 // TODO Auto-generated method stub
65 public Object
getModulesDescriptor(String descriptorType
) {
66 // TODO Auto-generated method stub
70 public List
<A2Source
> getA2Sources() {