1 | |
package com.aurea.maven.plugins.sonic.sdm.util; |
2 | |
|
3 | |
import java.util.ArrayList; |
4 | |
import java.util.List; |
5 | |
|
6 | |
import com.sonicsw.deploy.artifact.ESBArtifact; |
7 | |
|
8 | |
public class ESBProcessesContribution extends AbstractModelContribution { |
9 | |
|
10 | |
public ESBProcessesContribution(String name, ESBDeploymentModelBuilder builder) { |
11 | 0 | super(name, builder); |
12 | 0 | } |
13 | |
|
14 | |
@SuppressWarnings("unchecked") |
15 | |
public Object getContribution() throws Exception { |
16 | |
|
17 | 0 | ESBDeploymentModel model = getBuilder().getModel(); |
18 | |
|
19 | 0 | List<Process> result = (List<Process>)model.getModelObject(getContributionName()); |
20 | |
|
21 | 0 | if (result == null) { |
22 | 0 | result = new ArrayList<Process>(); |
23 | 0 | for(Object obj: getArtifactList(ESBArtifact.PROCESS, Process.class)) result.add((Process)obj); |
24 | |
} |
25 | 0 | return result; |
26 | |
} |
27 | |
|
28 | |
} |