Project

General

Profile

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

    
12
import java.util.Map;
13

    
14
import org.springframework.beans.factory.annotation.Autowired;
15
import org.springframework.stereotype.Service;
16
import org.springframework.transaction.annotation.Transactional;
17

    
18
import eu.etaxonomy.cdm.config.CdmSourceException;
19
import eu.etaxonomy.cdm.model.metadata.CdmMetaData.MetaDataPropertyName;
20

    
21
/**
22
 * Provides metadata information corresponding ti the underlying CDM Datasource.
23
 *
24
 * @author cmathew
25
 * @date 20 Nov 2015
26
 *
27
 */
28
@Service
29
@Transactional(readOnly = true)
30
public class MetadataServiceImpl implements IMetadataService {
31

    
32

    
33
    private IDatabaseService databaseService;
34

    
35
    @Autowired
36
    public void setDatabaseService(IDatabaseService databaseService) {
37
        this.databaseService = databaseService;
38
    }
39

    
40
    /**
41
     * {@inheritDoc}
42
     */
43
    @Override
44
    public  String getDbSchemaVersion() throws CdmSourceException  {
45
        return databaseService.getDbSchemaVersion();
46

    
47
    }
48

    
49
    /**
50
     * {@inheritDoc}
51
     */
52
    @Override
53
    public boolean isDbEmpty() throws CdmSourceException {
54
        return databaseService.isDbEmpty();
55
    }
56

    
57
    /**
58
     * {@inheritDoc}
59
     */
60
    @Override
61
    public Map<MetaDataPropertyName, String> getCdmMetadataMap() throws CdmSourceException {
62
        return databaseService.getCdmMetadataMap();
63
    }
64

    
65
}
(72-72/97)