Project

General

Profile

Download (970 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2018 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.dataportal;
10

    
11
import java.util.ArrayList;
12
import java.util.List;
13

    
14
/**
15
 * @author a.kohlbecker
16
 * @since Apr 10, 2018
17
 *
18
 */
19
public class DataPortalSiteContextProvider implements DataPortalContextProvider {
20

    
21
    DataPortalSite[] dataPortalSites;
22

    
23
    public DataPortalSiteContextProvider(DataPortalSite[] dataPortalSites){
24
        this.dataPortalSites = dataPortalSites;
25
    }
26

    
27

    
28
    @Override
29
    public List<DataPortalContext> contexts() {
30
        List<DataPortalContext> contexts = new ArrayList<>(dataPortalSites.length);
31
        for (DataPortalSite dataPortalSite : dataPortalSites) {
32
            contexts.add(dataPortalSite.getContext());
33
        }
34
        return contexts;
35
    }
36

    
37

    
38
}
(7-7/13)