ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.vci.client.omd.btm.toOutside;
 
import java.util.ArrayList;
import java.util.List;
 
public class InterBtmManager {
    
    private static InterBtmManager interBtmManager= null;
    private List<InterBtm> interBtmList = new ArrayList<InterBtm>();
    
    private InterBtmManager(){
        
    }
    
    public static InterBtmManager getInstance(){
        if(interBtmManager == null){
            interBtmManager = new InterBtmManager();
        }
        return interBtmManager;
    }
    
    public void registerInter(InterBtm interBtm){
        interBtmList.add(interBtm);
    }
    
    public List<InterBtm> getInterAPList(){
        return interBtmList;
    }
    
    public List<String> getUsedNameList(String btmName){
        if(interBtmList == null || interBtmList.size() < 1){
            return null;
        }
        List<String> nameList = new ArrayList<String>();
        for(int i = 0; i < interBtmList.size(); i++){
            InterBtm interBtm = interBtmList.get(i);
            List<String> usedNameList = interBtm.getUsedNameList(btmName);
            if(usedNameList != null && usedNameList.size() > 0){
                nameList.addAll(usedNameList);
            }
        }
        return nameList;
    }
}