Project

General

Profile

« Previous | Next » 

Revision 4107

Added by daigle about 16 years ago

implement getPropertiesByGroup() method

View differences:

src/edu/ucsb/nceas/metacat/service/PropertyService.java
27 27
package edu.ucsb.nceas.metacat.service;
28 28

  
29 29
import java.io.IOException;
30
import java.util.Map;
30 31
import java.util.Set;
31 32
import java.util.SortedMap;
32 33
import java.util.Vector;
......
205 206
    public static Vector<String> getPropertyNamesByGroup(String groupName) {   	
206 207
    	return mainProperties.getPropertyNamesByGroup(groupName);
207 208
    }
209
    
210
	/**
211
	 * Get a Map of all properties that start with the groupName prefix.
212
	 * 
213
	 * @param groupName
214
	 *            the prefix of the keys to search for.
215
	 * @return Map of property names
216
	 */
217
    public static Map<String, String> getPropertiesByGroup(String groupName) throws PropertyNotFoundException {   	
218
    	return mainProperties.getPropertiesByGroup(groupName);
219
    }
208 220

  
209 221
	/**
210 222
	 * Utility method to set a property value both in memory and to the
......
419 431
	 * @param propertyName
420 432
	 *            the name of the property to be checked and set
421 433
	 */
422
	public static void checkAndSetProperty(HttpServletRequest request,String propertyName) 
434
	public static void checkAndSetProperty(HttpServletRequest request, String propertyName) 
423 435
			throws GeneralPropertyException {
424 436
		String value = PropertyService.getProperty(propertyName);
425 437
		String newValue = request.getParameter(propertyName);

Also available in: Unified diff