1
|
/**
|
2
|
* Copyright (C) 2015 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.cdm.api.service;
|
10
|
|
11
|
import java.util.Map;
|
12
|
|
13
|
import org.springframework.beans.factory.annotation.Autowired;
|
14
|
import org.springframework.stereotype.Service;
|
15
|
import org.springframework.transaction.annotation.Transactional;
|
16
|
|
17
|
import eu.etaxonomy.cdm.config.CdmSourceException;
|
18
|
import eu.etaxonomy.cdm.model.metadata.CdmMetaDataPropertyName;
|
19
|
|
20
|
/**
|
21
|
* Provides metadata information corresponding to the underlying CDM Datasource.
|
22
|
*
|
23
|
* @author cmathew
|
24
|
* @since 20 Nov 2015
|
25
|
*/
|
26
|
@Service
|
27
|
@Transactional(readOnly = true)
|
28
|
public class MetadataServiceImpl implements IMetadataService {
|
29
|
|
30
|
|
31
|
private IDatabaseService databaseService;
|
32
|
|
33
|
@Autowired
|
34
|
public void setDatabaseService(IDatabaseService databaseService) {
|
35
|
this.databaseService = databaseService;
|
36
|
}
|
37
|
|
38
|
@Override
|
39
|
public String getDbSchemaVersion() throws CdmSourceException {
|
40
|
return databaseService.getDbSchemaVersion();
|
41
|
|
42
|
}
|
43
|
|
44
|
@Override
|
45
|
public boolean isDbEmpty() throws CdmSourceException {
|
46
|
return databaseService.isDbEmpty();
|
47
|
}
|
48
|
|
49
|
@Override
|
50
|
public Map<CdmMetaDataPropertyName, String> getCdmMetadataMap() throws CdmSourceException {
|
51
|
return databaseService.getCdmMetadataMap();
|
52
|
}
|
53
|
}
|