Project

General

Profile

Revision 4109

Added by daigle over 12 years ago

Add method to return a map of db script suffixes from metacat.properties

View differences:

src/edu/ucsb/nceas/metacat/util/DatabaseUtil.java
26 26

  
27 27
package edu.ucsb.nceas.metacat.util;
28 28

  
29
import java.util.Map;
29 30
import java.util.TreeSet;
30 31
import java.util.Vector;
31 32

  
......
34 35
import edu.ucsb.nceas.metacat.DBVersion;
35 36
import edu.ucsb.nceas.metacat.service.PropertyService;
36 37
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
37
import edu.ucsb.nceas.utilities.StringUtil;
38 38

  
39 39
public class DatabaseUtil {
40 40
	
......
86 86

  
87 87
		return versionSet;
88 88
	}
89
	
90
	/**
91
	 * Gets the available upgrade versions for metacat by getting a list of 
92
	 * upgrade script from properties in metacat.properties that start with 
93
	 * "database.upgradeVersion". It then creats a DBVersion object for each 
94
	 * upgrade version.
95
	 * 
96
	 * @return a TreeSet of DBVersion objects holding individual version information
97
	 */
98
	public static Map<String, String> getScriptSuffixes() throws PropertyNotFoundException {
99
		
100
		return PropertyService.getPropertiesByGroup("database.scriptsuffix");
101
	}
89 102
}

Also available in: Unified diff