Index: src/edu/ucsb/nceas/metacat/service/PropertyService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/service/PropertyService.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/service/PropertyService.java	(nonexistent)
@@ -1,601 +0,0 @@
-/**
- *  '$RCSfile$'
- *    Purpose: A Class that implements properties methods for metacat
- *  Copyright: 2008 Regents of the University of California and the
- *             National Center for Ecological Analysis and Synthesis
- *    Authors: Michael Daigle
- *
- *   '$Author$'
- *     '$Date$'
- * '$Revision$'
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-package edu.ucsb.nceas.metacat.service;
-
-import java.io.IOException;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.transform.TransformerException;
-
-import org.apache.log4j.Logger;
-
-import edu.ucsb.nceas.metacat.shared.BaseService;
-import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
-import edu.ucsb.nceas.metacat.shared.ServiceException;
-import edu.ucsb.nceas.metacat.util.SystemUtil;
-import edu.ucsb.nceas.utilities.FileUtil;
-import edu.ucsb.nceas.utilities.GeneralPropertyException;
-import edu.ucsb.nceas.utilities.MetaDataProperty;
-import edu.ucsb.nceas.utilities.PropertiesMetaData;
-import edu.ucsb.nceas.utilities.PropertyNotFoundException;
-import edu.ucsb.nceas.utilities.SortedProperties;
-
-/**
- * A suite of utility classes for the metadata configuration utility
- */
-public class PropertyService extends BaseService {
-	
-	private static PropertyService propertyService = null;
-	
-	// system is configured
-	public static final String CONFIGURED = "true"; 
-	// system has never been configured
-	public static final String UNCONFIGURED = "false"; 
-	public static final String BYPASSED = "bypassed";
-	
-	private static String MAIN_CONFIG_NAME = "";
-	private static final String AUTH_CONFIG_NAME = "auth.properties";
-	
-	private static boolean bypassAlreadyChecked = false;
-	
-	private static String recommendedExternalDir = null;
-	
-	private static String mainPropertiesFilePath = null;
-	private static SortedProperties mainProperties = null;
-	
-	private static String mainBackupPropertiesFilePath = null;
-	private static SortedProperties mainBackupProperties = null;
-	
-	private static String propertiesMetaDataFilePath = null;
-	private static PropertiesMetaData mainMetaData = null;
-	
-	private static String authBackupPropertiesFilePath = null;
-	private static SortedProperties authBackupProperties = null;
-	
-	private static String authMetaDataFilePath = null;
-	private static PropertiesMetaData authMetaData = null;
-	
-	private static boolean testInstance = false;
-	private static String testConfigDir = null;
-	
-	private static Logger logMetacat = Logger.getLogger(PropertyService.class);
-
-	/**
-	 * private constructor since this is a singleton
-	 * 
-	 * @param servletContext the context we will use to get relative paths
-	 */
-	private PropertyService() throws ServiceException {		
-		_serviceName = "PropertyService";
-		
-		MAIN_CONFIG_NAME = ServiceService.CONFIG_FILE_NAME;
-		
-		initialize();		
-	}
-	
-	/**
-	 * Get the single instance of PropertyService.
-	 * 
-	 * @return the single instance of PropertyService
-	 */
-	public static PropertyService getInstance() throws ServiceException {
-		if (propertyService == null) {
-			
-			propertyService = new PropertyService();
-		}
-		return propertyService;
-	}
-	
-	/**
-	 * Get the single instance of PropertyService for test purposes.  In this
-	 * case, we allow the configuration directory to be passed in.
-	 * 
-	 * @param configDir the configuration directory we need to look in
-	 * @return the single instance of PropertyService
-	 */
-	public static PropertyService getTestInstance(String configDir) throws ServiceException {
-		if (propertyService == null) {
-			
-			testInstance = true;
-			testConfigDir = configDir;
-			
-			propertyService = new PropertyService();
-		}
-		return propertyService;
-	}
-	
-	public boolean refreshable() {
-		return true;
-	}
-	
-	public void doRefresh() throws ServiceException {
-		initialize();
-	}
-	
-	public void stop() throws ServiceException {
-		return;
-	}
-	
-	/**
-	 * Initialize the singleton.
-	 * 
-	 * @param servletContext the context we will use to get relative paths
-	 */
-	private void initialize() throws ServiceException {
-		
-		logMetacat.debug("Initializing PropertyService");
-		
-		String configDir;
-		if (testInstance) {
-			configDir = testConfigDir;
-		} else {
-			configDir = ServiceService.getRealConfigDir();
-		}
-		
-		try {
-			// mainProperties will hold the primary configuration values for
-			// metacat.
-			mainPropertiesFilePath = configDir + FileUtil.getFS() + MAIN_CONFIG_NAME;
-			mainProperties = new SortedProperties(mainPropertiesFilePath);
-			mainProperties.load();
-
-			// mainMetaData holds configuration information about main
-			// properties. This is primarily used to display input fields on 
-			// the configuration page. The information is retrieved from an 
-			// xml metadata file
-			propertiesMetaDataFilePath = 
-				configDir + FileUtil.getFS() + MAIN_CONFIG_NAME + ".metadata.xml";
-			mainMetaData = new PropertiesMetaData(propertiesMetaDataFilePath);
-
-			// authMetaData holds configuration information about organization
-			// level
-			// properties. This is primarily used to display input fields on
-			// the auth configuration page. The information is retrieved
-			// from an xml metadata file dedicated just to auth properties.
-			authMetaDataFilePath = 
-				configDir + FileUtil.getFS() + AUTH_CONFIG_NAME + ".metadata.xml";
-			authMetaData = new PropertiesMetaData(authMetaDataFilePath);
-
-			String recommendedExternalDir = SystemUtil.discoverExternalDir();
-			setRecommendedExternalDir(recommendedExternalDir);
-			
-			String backupPath = getProperty("application.backupDir");
-			if (backupPath == null || backupPath.equals("")) {
-				backupPath = SystemUtil.getStoredBackupDir();
-			}
-			if (backupPath == null || backupPath.equals("") && recommendedExternalDir != null) {
-				backupPath = 
-					recommendedExternalDir + FileUtil.getFS() + "." + ServiceService.getRealApplicationContext();
-			}
-
-			// if backupPath is still null, no reason to initialize the
-			// backup properties. The system will need to prompt the user for 
-			// the backup properties and reinitialize PropertyService.
-			if (backupPath != null && !backupPath.equals("")) {		
-				setProperty("application.backupDir", backupPath);
-				SystemUtil.writeStoredBackupFile(backupPath);
-
-				// The mainBackupProperties hold properties that were backed up
-				// the last time the application was configured. On disk, the 
-				// file will look like a smaller version of metacat.properties. 
-				// It is stored in the data storage directory outside the 
-				// application directories.
-				mainBackupPropertiesFilePath =
-					backupPath + FileUtil.getFS() + MAIN_CONFIG_NAME + ".backup";
-				mainBackupProperties = new SortedProperties(mainBackupPropertiesFilePath);
-				mainBackupProperties.load();
-
-				// The authBackupProperties hold properties that were backed up
-				// the last time the auth was configured. On disk, the file 
-				// will look like a smaller version of metacat.properties. It 
-				// is stored in the data storage directory outside the 
-				// application directories.
-				authBackupPropertiesFilePath = 
-					backupPath + FileUtil.getFS() + AUTH_CONFIG_NAME + ".backup";
-				authBackupProperties = new SortedProperties(authBackupPropertiesFilePath);
-				authBackupProperties.load();
-			}
-		} catch (TransformerException te) {
-			throw new ServiceException("Transform problem while loading properties: "
-					+ te.getMessage());
-		} catch (IOException ioe) {
-			throw new ServiceException("I/O problem while loading properties: "
-					+ ioe.getMessage());
-		} catch (GeneralPropertyException gpe) {
-			throw new ServiceException("General properties problem while loading properties: "
-					+ gpe.getMessage());
-		} catch (MetacatUtilException ue) {
-			throw new ServiceException("Utilities problem while loading properties: "
-					+ ue.getMessage());
-		} 
-	}
-
-	/**
-	 * Utility method to get a property value from the properties file
-	 * 
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @return the String value for the property
-	 */
-	public static String getProperty(String propertyName)
-			throws PropertyNotFoundException {
-		return mainProperties.getProperty(propertyName);
-	}
-	
-	/**
-     * Get a set of all property names.
-     * 
-     * @return Set of property names  
-     */
-    public static Vector<String> getPropertyNames() {   	
-    	return mainProperties.getPropertyNames();
-    }
-    
-
-	/**
-	 * Get a Set of all property names that start with the groupName prefix.
-	 * 
-	 * @param groupName
-	 *            the prefix of the keys to search for.
-	 * @return enumeration of property names
-	 */
-    public static Vector<String> getPropertyNamesByGroup(String groupName) {   	
-    	return mainProperties.getPropertyNamesByGroup(groupName);
-    }
-    
-	/**
-	 * Get a Map of all properties that start with the groupName prefix.
-	 * 
-	 * @param groupName
-	 *            the prefix of the keys to search for.
-	 * @return Map of property names
-	 */
-    public static Map<String, String> getPropertiesByGroup(String groupName) throws PropertyNotFoundException {   	
-    	return mainProperties.getPropertiesByGroup(groupName);
-    }
-
-	/**
-	 * Utility method to set a property value both in memory and to the
-	 * properties file
-	 * 
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @param newValue
-	 *            the new value for the property
-	 */
-	public static void setProperty(String propertyName, String newValue) throws GeneralPropertyException {
-			mainProperties.setProperty(propertyName, newValue);
-			mainProperties.store();
-	}
-
-	/**
-	 * Utility method to set a property value in memory. This will NOT cause the
-	 * property to be written to disk. Use this method to set multiple
-	 * properties in a row without causing excessive I/O. You must call
-	 * persistProperties() once you're done setting properties to have them
-	 * written to disk.
-	 * 
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @param newValue
-	 *            the new value for the property
-	 */
-	public static void setPropertyNoPersist(String propertyName, String newValue) throws GeneralPropertyException {
-		mainProperties.setPropertyNoPersist(propertyName, newValue);
-	}
-
-	/**
-	 * Save the properties to a properties file. Note, the 
-	 * order and comments will be preserved.
-	 */
-	public static void persistProperties() throws GeneralPropertyException {
-		mainProperties.store();
-	}
-	
-	/**
-	 * Get the main backup properties file. These are configurable properties that
-	 * are stored outside the metacat install directories so the user does not
-	 * need to re-enter all the configuration information every time they do an
-	 * upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static SortedProperties getMainBackupProperties() {
-		return mainBackupProperties;
-	}
-	
-	/**
-	 * Get the auth backup properties file. These are configurable 
-	 * properties that are stored outside the metacat install directories so 
-	 * the user does not need to re-enter all the configuration information 
-	 * every time they do an upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static SortedProperties getAuthBackupProperties() {
-		return authBackupProperties;
-	}
-	
-	/**
-	 * Get the main properties metadata. This is retrieved from an xml file that
-	 * describes the attributes of configurable properties.
-	 * 
-	 * @return a PropertiesMetaData object with the main properties metadata
-	 */
-	public static PropertiesMetaData getMainMetaData() {
-		return mainMetaData;
-	}
-	
-	/**
-	 * Get the auth properties metadata. This is retrieved from an xml
-	 * file that describes the attributes of configurable properties.
-	 * 
-	 * @return a PropertiesMetaData object with the organization properties
-	 *         metadata
-	 */
-	public static PropertiesMetaData getAuthMetaData() {
-		return authMetaData;
-	}
-	
-	/**
-	 * Writes out backup configurable properties to a file.
-	 */
-	public static void persistMainBackupProperties()
-			throws GeneralPropertyException {
-
-		// Use the metadata to extract configurable properties from the 
-		// overall properties list, and store those properties.
-		try {
-			SortedProperties backupProperties = new SortedProperties(mainBackupPropertiesFilePath);
-			
-			// Populate the backup properties for main metacat properties using
-			// the associated metadata file
-			PropertiesMetaData mainMetadata = new PropertiesMetaData(propertiesMetaDataFilePath);
-
-			Map<String, MetaDataProperty> mainKeyMap = mainMetadata.getProperties();
-			Set<String> mainKeySet = mainKeyMap.keySet();
-			for (String propertyKey : mainKeySet) {
-				// don't backup passwords
-				MetaDataProperty metaData = mainKeyMap.get(propertyKey);
-				if (!metaData.getFieldType().equals(MetaDataProperty.PASSWORD_TYPE)) {
-					backupProperties.addProperty(propertyKey, getProperty(propertyKey));
-				}
-			}
-			
-			// store the properties to file
-			backupProperties.store();
-			mainBackupProperties = 
-				new SortedProperties(mainBackupPropertiesFilePath);
-			mainBackupProperties.load();
-
-		} catch (TransformerException te) {
-			throw new GeneralPropertyException("Could not transform backup properties xml: "
-					+ te.getMessage());
-		} catch (IOException ioe) {
-			throw new GeneralPropertyException("Could not backup configurable properties: "
-					+ ioe.getMessage());
-		}
-	}
-	
-	/**
-	 * Writes out backup configurable properties to a file.
-	 */
-	public static void persistAuthBackupProperties(ServletContext servletContext)
-			throws GeneralPropertyException {
-
-		// Use the metadata to extract configurable properties from the 
-		// overall properties list, and store those properties.
-		try {
-			SortedProperties backupProperties = 
-				new SortedProperties(authBackupPropertiesFilePath);
-			
-			// Populate the backup properties for auth properties using
-			// the associated metadata file
-			PropertiesMetaData authMetadata = new PropertiesMetaData(authMetaDataFilePath);
-			
-			Map<String, MetaDataProperty> authKeyMap = authMetadata.getProperties();
-			Set<String> authKeySet = authKeyMap.keySet();
-			for (String propertyKey : authKeySet) {
-				// don't backup passwords
-				MetaDataProperty metaData = authKeyMap.get(propertyKey);
-				if (!metaData.getFieldType().equals(MetaDataProperty.PASSWORD_TYPE)) {
-					backupProperties.addProperty(propertyKey, getProperty(propertyKey));
-				}
-			}
-			
-			// store the properties to file
-			backupProperties.store();
-			authBackupProperties = 
-				new SortedProperties(authBackupPropertiesFilePath);
-			authBackupProperties.load();
-
-		} catch (TransformerException te) {
-			throw new GeneralPropertyException("Could not transform backup properties xml: "
-					+ te.getMessage());
-		} catch (IOException ioe) {
-			throw new GeneralPropertyException("Could not backup configurable properties: "
-					+ ioe.getMessage());
-		} 
-	}
-	
-	/**
-	 * Reports whether properties are fully configured.
-	 * 
-	 * @return a boolean that is true if properties are not unconfigured and
-	 *         false otherwise
-	 */
-	public static boolean arePropertiesConfigured() throws MetacatUtilException {		
-		try {
-			String propertiesConfigured = PropertyService.getProperty("configutil.propertiesConfigured");
-			if (propertiesConfigured != null && !propertiesConfigured.equals(UNCONFIGURED)) {
-				return true;
-			}			
-			return false;
-		} catch (PropertyNotFoundException pnfe) {
-			throw new MetacatUtilException("Could not determine if properties are configured: "
-					+ pnfe.getMessage());
-		}
-	}
-	
-	/**
-	 * Determine if the system is configured to bypass configuration. If so, the
-	 * system will look for backup configuration files at startup time and use
-	 * those to configure metacat. The bypass options should only be set by
-	 * developers. Production code should never bypass confguration.
-	 * 
-	 * @return true if dev.runConfiguration is set to true in metacat.properties
-	 *         and we have not already checked for bypass, false otherwise.
-	 */
-	public static boolean doBypass() throws PropertyNotFoundException {
-		// We only want to go through the check once to see if we want to
-		// bypass the configuration.  We don't want to run through all of
-		// this every time  we hit metacat. 
-		if (bypassAlreadyChecked) {
-			logMetacat.debug("bypassConfiguration not performing full bypass check.  Bypass set to false");
-			return false;
-		}
-		
-		// check how dev.runConfiguration is set in metacat.properties
-		String strRunConfiguration = PropertyService.getProperty("dev.runConfiguration");
-		boolean runConfiguration = Boolean.parseBoolean(strRunConfiguration);
-		logMetacat.debug("bypassConfiguration: dev.runConfiguration property set to: " + strRunConfiguration);
-		
-		// if the dev.runConfiguration is true, return false here.
-		if (runConfiguration) {
-			bypassAlreadyChecked = true;
-			return false;
-		} 
-		
-		return true;
-	}
-	
-	/**
-	 * Reports whether the metacat configuration utility should be run.  
-	 * Returns false if  
-	 *   -- dev.runConfiguration=false and
-	 *   -- backup properties file exists
-	 * Note that dev.runConfiguration should only be set to false when
-	 * reinstalling the same version of the application in developement.
-	 * 
-	 * @return a boolean that is false if dev.runConfiguration is false and 
-	 * the backup properties file exists.  
-	 */
-	public static void bypassConfiguration() throws ServiceException {
-		try {
-			boolean doBypass = doBypass();
-
-			if (!doBypass) {
-				throw new ServiceException(
-						"Attempting to do bypass when system is not configured for it.");
-			}			
-
-			// The system is bypassing the configuration utility. We need to
-			// get the backup properties and replace existing properties with
-			// backup values.  We do this for main and org properties.		
-			logMetacat.debug("bypassConfiguration: setting main backup properties.");
-			SortedProperties mainBackupProperties = getMainBackupProperties();
-			Vector<String> backupPropertyNames = 
-				mainBackupProperties.getPropertyNames();
-			for (String backupPropertyName : backupPropertyNames) {
-				String value = mainBackupProperties.getProperty(backupPropertyName);
-				setPropertyNoPersist(backupPropertyName, value);
-			}
-
-			logMetacat.debug("bypassConfiguration: setting auth backup properties.");
-			SortedProperties authBackupProperties = getAuthBackupProperties();
-			Vector<String> authBackupPropertyNames = 
-				authBackupProperties.getPropertyNames();
-			for (String authBackupPropertyName : authBackupPropertyNames) {
-				String value = authBackupProperties.getProperty(authBackupPropertyName);
-				setPropertyNoPersist(authBackupPropertyName, value);
-			}
-
-			logMetacat.debug("bypassConfiguration: setting configutil sections to true.");
-			setPropertyNoPersist("configutil.propertiesConfigured", "true");
-			setPropertyNoPersist("configutil.authConfigured", "true");
-			setPropertyNoPersist("configutil.skinsConfigured", "true");
-			setPropertyNoPersist("configutil.databaseConfigured", "true");
-			setPropertyNoPersist("configutil.geoserverConfigured", "bypassed");
-				
-			persistProperties();
-
-		} catch (PropertyNotFoundException pnfe) {
-			logMetacat.error("bypassConfiguration: Could not find property: " + pnfe.getMessage());
-		} catch (GeneralPropertyException gpe) {
-			logMetacat.error("bypassConfiguration: General property error: " + gpe.getMessage());
-		}
-
-		bypassAlreadyChecked = true;
-	}
-	
-	/**
-	 * Take input from the user in an HTTP request about an property to be changed
-	 * and update the metacat property file with that new value if it has
-	 * changed from the value that was originally set.
-	 * 
-	 * @param request
-	 *            that was generated by the user
-	 * @param response
-	 *            to send output back to the user
-	 * @param propertyName
-	 *            the name of the property to be checked and set
-	 */
-	public static void checkAndSetProperty(HttpServletRequest request, String propertyName) 
-			throws GeneralPropertyException {
-		String value = PropertyService.getProperty(propertyName);
-		String newValue = request.getParameter(propertyName);
-		if (newValue != null && !newValue.trim().equals(value)) {
-			PropertyService.setPropertyNoPersist(propertyName, newValue.trim());
-		}
-	}
-	
-	/**
-	 * Sets the recommended external directory.  This is populated during initialization 
-	 * time using the SystemUtil.discoverExternalDir() method.  This directory will be used to
-	 * suggest external user directories when the user configures metacat for the first time.
-	 * 
-	 */
-	public static void setRecommendedExternalDir(String extBaseDir) {
-		recommendedExternalDir = extBaseDir;
-	}
-	
-	/**
-	 * Returns the recommended external base directory.  This is populated during initialization 
-	 * time using the SystemUtil.discoverExternalBaseDir() method.  This directory will be used to
-	 * suggest external user directories when the user configures metacat for the first time.
-	 * 
-	 * @return a String holding the recommended external directory
-	 */
-	public static String getRecommendedExternalDir() {
-		return recommendedExternalDir;
-	}
-
-}
\ No newline at end of file

Property changes on: src/edu/ucsb/nceas/metacat/service/PropertyService.java
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: src/edu/ucsb/nceas/metacat/service/SkinPropertyService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/service/SkinPropertyService.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/service/SkinPropertyService.java	(nonexistent)
@@ -1,536 +0,0 @@
-/**
- *  '$RCSfile$'
- *    Purpose: A Class that implements properties methods for metacat
- *             skins
- *  Copyright: 2008 Regents of the University of California and the
- *             National Center for Ecological Analysis and Synthesis
- *    Authors: Michael Daigle
- *
- *   '$Author$'
- *     '$Date$'
- * '$Revision$'
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-package edu.ucsb.nceas.metacat.service;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.transform.TransformerException;
-
-import org.apache.log4j.Logger;
-
-import edu.ucsb.nceas.metacat.shared.BaseService;
-import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
-import edu.ucsb.nceas.metacat.shared.ServiceException;
-import edu.ucsb.nceas.metacat.util.SkinUtil;
-import edu.ucsb.nceas.utilities.FileUtil;
-import edu.ucsb.nceas.utilities.GeneralPropertyException;
-import edu.ucsb.nceas.utilities.MetaDataProperty;
-import edu.ucsb.nceas.utilities.PropertiesMetaData;
-import edu.ucsb.nceas.utilities.PropertyNotFoundException;
-import edu.ucsb.nceas.utilities.SortedProperties;
-
-/**
- * A suite of utility classes for the skin configuration utility
- */
-public class SkinPropertyService extends BaseService {
-
-	private static SkinPropertyService skinService = null;
-
-	private static boolean bypassAlreadyChecked = false;
-
-	private static String BACKUP_DIR = null;
-
-	private static Vector<String> skinNames = null;
-
-	private static HashMap<String, SortedProperties> skinPropertiesMap = null;
-	private static HashMap<String, SortedProperties> skinBackupPropertiesMap = null;
-	private static HashMap<String, PropertiesMetaData> skinMetaDataMap = null;
-
-	private static Logger logMetacat = Logger.getLogger(SkinPropertyService.class);
-
-	/**
-	 * private constructor since this is a singleton
-	 * 
-	 * @param servletContext
-	 *            the context we will use to get relative paths
-	 */
-	private SkinPropertyService() throws ServiceException {
-		try {
-			_serviceName = "SkinPropertyService";
-			
-			initialize();
-		} catch (GeneralPropertyException gpe) {
-			throw new ServiceException(
-					"Properties problem while initializing SkinPropertyService: "
-							+ gpe.getMessage());
-		} catch (IOException ioe) {
-			throw new ServiceException("I/O Problem while initializing SkinPropertyService: "
-					+ ioe.getMessage());
-		}
-	}
-
-	/**
-	 * Get the single instance of SkinPropertyService.
-	 * 
-	 * @param servletContext
-	 *            the context we will use to get relative paths
-	 * @return the single instance of SkinPropertyService
-	 */
-	public static SkinPropertyService getInstance() throws ServiceException {
-		if (skinService == null) {
-			skinService = new SkinPropertyService();
-		}
-		return skinService;
-	}
-
-	public boolean refreshable() {
-		return true;
-	}
-
-	public void doRefresh() throws ServiceException {
-		try {
-			initialize();
-		} catch (IOException ioe) {
-			throw new ServiceException("Could not refresh SkinPropertyService due to"
-					+ " I/O error: " + ioe.getMessage());
-		} catch (GeneralPropertyException gpe) {
-			throw new ServiceException("Could not refresh SkinPropertyService due to"
-					+ " property error: " + gpe.getMessage());
-		}
-	}
-	
-	public void stop() throws ServiceException {
-		return;
-	}
-
-	/**
-	 * Initialize the singleton.
-	 * 
-	 * @param servletContext
-	 *            the context we will use to get relative paths
-	 */
-	private void initialize() throws IOException, GeneralPropertyException,
-			ServiceException {
-
-		logMetacat.debug("Initializing SkinService");
-
-		BACKUP_DIR = PropertyService.getProperty("application.backupDir");
-
-		skinNames = SkinUtil.getSkinNames();
-
-		skinPropertiesMap = new HashMap<String, SortedProperties>();
-		skinBackupPropertiesMap = new HashMap<String, SortedProperties>();
-		skinMetaDataMap = new HashMap<String, PropertiesMetaData>();
-
-		try {
-			for (String skinName : skinNames) {
-				String propertyFilePath = ServiceService.getRealSkinDir()
-						+ FileUtil.getFS() + skinName + FileUtil.getFS() + skinName
-						+ ".properties";
-
-				if (FileUtil.getFileStatus(propertyFilePath) < FileUtil.EXISTS_READ_WRITABLE) {
-					logMetacat.error("Skin property file: " + propertyFilePath
-							+ " does not exist read/writable. This skin will not be available.");
-					continue;
-				}
-
-				SortedProperties skinProperties = new SortedProperties(propertyFilePath);
-				skinProperties.load();
-				skinPropertiesMap.put(skinName, skinProperties);
-
-				String metaDataFilePath = ServiceService.getRealSkinDir()
-						+ FileUtil.getFS() + skinName + FileUtil.getFS() + skinName
-						+ ".properties.metadata.xml";
-				if (FileUtil.getFileStatus(metaDataFilePath) > FileUtil.DOES_NOT_EXIST) {
-					PropertiesMetaData skinMetaData = new PropertiesMetaData(metaDataFilePath);
-					skinMetaDataMap.put(skinName, skinMetaData);
-				} else {
-					skinPropertiesMap.remove(skinName);
-					logMetacat.error("Could not find skin property metadata file for skin: " 
-							+ skinName + " at: " + metaDataFilePath  
-							+ ". This skin will not be available.");
-					continue;
-				}
-
-				String backupPropertyFilePath = BACKUP_DIR + FileUtil.getFS() + skinName
-						+ ".properties.backup";
-				if (FileUtil.getFileStatus(backupPropertyFilePath) > FileUtil.DOES_NOT_EXIST) {
-					SortedProperties skinBackupProperties = new SortedProperties(
-							backupPropertyFilePath);
-					skinBackupProperties.load();
-					skinBackupPropertiesMap.put(skinName, skinBackupProperties);
-				} else {
-					logMetacat.warn("Could not find backup properties for skin: "
-							+ skinName + " at: " + backupPropertyFilePath);
-				}
-			}
-		} catch (TransformerException te) {
-			throw new GeneralPropertyException(te.getMessage());
-		}
-	}
-
-	/**
-	 * Utility method to get a property value from the properties file for a
-	 * specific skin.
-	 * 
-	 * @param skinName
-	 *            the skin for which we want to retrieve the property
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @return the String value for the property
-	 */
-	public static String getProperty(String skinName, String propertyName)
-			throws PropertyNotFoundException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new PropertyNotFoundException("There is not property map for "
-					+ skinName);
-		}
-		return skinProperties.getProperty(propertyName);
-	}
-
-	/**
-	 * Get a set of all property names for a given skin.
-	 * 
-	 * @param skinName
-	 *            the skin for which we want to retrieve the property names
-	 * @return Set of property names
-	 */
-	public static Vector<String> getPropertyNames(String skinName)
-			throws PropertyNotFoundException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new PropertyNotFoundException("There is not property map for "
-					+ skinName);
-		}
-		return skinProperties.getPropertyNames();
-	}
-
-	/**
-	 * Get a Set of all property names that start with the groupName prefix.
-	 * 
-	 * @param groupName
-	 *            the prefix of the keys to search for.
-	 * @return Vector of property names
-	 */
-	public static Vector<String> getPropertyNamesByGroup(String skinName, String groupName)
-			throws PropertyNotFoundException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new PropertyNotFoundException("There is not property map for "
-					+ skinName);
-		}
-		return skinProperties.getPropertyNamesByGroup(groupName);
-	}
-
-	/**
-	 * Get the main backup properties file. These are configurable properties
-	 * that are stored outside the metacat install directories so the user does
-	 * not need to re-enter all the configuration information every time they do
-	 * an upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static HashMap<String, SortedProperties> getProperties() {
-		return skinPropertiesMap;
-	}
-
-	/**
-	 * Get the main backup properties file. These are configurable properties
-	 * that are stored outside the metacat install directories so the user does
-	 * not need to re-enter all the configuration information every time they do
-	 * an upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static SortedProperties getProperties(String skinName) {
-		return skinPropertiesMap.get(skinName);
-	}
-
-	/**
-	 * Get the main backup properties file. These are configurable properties
-	 * that are stored outside the metacat install directories so the user does
-	 * not need to re-enter all the configuration information every time they do
-	 * an upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static HashMap<String, SortedProperties> getBackupProperties() {
-		return skinBackupPropertiesMap;
-	}
-
-	/**
-	 * Get the main backup properties file. These are configurable properties
-	 * that are stored outside the metacat install directories so the user does
-	 * not need to re-enter all the configuration information every time they do
-	 * an upgrade.
-	 * 
-	 * @return a SortedProperties object with the backup properties
-	 */
-	public static SortedProperties getBackupProperties(String skinName) {
-		return skinBackupPropertiesMap.get(skinName);
-	}
-
-	/**
-	 * Get the main properties metadata. This is retrieved from an xml file that
-	 * describes the attributes of configurable properties.
-	 * 
-	 * @return a PropertiesMetaData object with the main properties metadata
-	 */
-	public static HashMap<String, PropertiesMetaData> getMetaData() {
-		return skinMetaDataMap;
-	}
-
-	/**
-	 * Get the main properties metadata. This is retrieved from an xml file that
-	 * describes the attributes of configurable properties.
-	 * 
-	 * @return a PropertiesMetaData object with the main properties metadata
-	 */
-	public static PropertiesMetaData getMetaData(String skinName) {
-		return skinMetaDataMap.get(skinName);
-	}
-
-	/**
-	 * Utility method to set a property value both in memory and to the
-	 * properties file
-	 * 
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @param newValue
-	 *            the new value for the property
-	 */
-	public static void setProperty(String skinName, String propertyName, String newValue)
-			throws IOException, GeneralPropertyException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new GeneralPropertyException("There is not property map for "
-					+ skinName);
-		}
-		skinProperties.setProperty(propertyName, newValue);
-		skinProperties.store();
-
-	}
-
-	/**
-	 * Utility method to set a property value in memory. This will NOT cause the
-	 * property to be written to disk. Use this method to set multiple
-	 * properties in a row without causing excessive I/O. You must call
-	 * persistProperties() once you're done setting properties to have them
-	 * written to disk.
-	 * 
-	 * @param propertyName
-	 *            the name of the property requested
-	 * @param newValue
-	 *            the new value for the property
-	 */
-	public static void setPropertyNoPersist(String skinName, String propertyName,
-			String newValue) throws GeneralPropertyException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new GeneralPropertyException("There is not property map for "
-					+ skinName);
-		}
-		skinProperties.setPropertyNoPersist(propertyName, newValue);
-	}
-
-	/**
-	 * Save the properties to a properties file. Note, the order and comments
-	 * will be preserved.
-	 */
-	public static void persistProperties(String skinName) throws IOException,
-			GeneralPropertyException {
-		SortedProperties skinProperties = skinPropertiesMap.get(skinName);
-		if (skinProperties == null) {
-			throw new GeneralPropertyException("There is not property map for "
-					+ skinName);
-		}
-		skinProperties.store();
-	}
-
-	/**
-	 * Save the properties to a properties file. Note, the order and comments
-	 * will be preserved.
-	 */
-	public static void persistAllProperties() throws IOException,
-			GeneralPropertyException {
-		for (String skinName : skinNames) {
-			persistProperties(skinName);
-		}
-	}
-
-	/**
-	 * Writes out backup configurable properties to a file.
-	 */
-	public static void persistBackupProperties(String skinName)
-			throws GeneralPropertyException {
-		try {
-			String metaDataFilePath = ServiceService.getRealSkinDir() + FileUtil.getFS()
-					+ skinName + FileUtil.getFS() + skinName + ".properties.metadata.xml";
-
-			String backupPropertyFilePath = BACKUP_DIR + FileUtil.getFS() + skinName
-					+ ".properties.backup";
-
-			// Use the metadata to extract configurable properties from the
-			// overall properties list, and store those properties.
-			SortedProperties backupProperties = new SortedProperties(
-					backupPropertyFilePath);
-
-			// Populate the backup properties for main metacat properties using
-			// the associated metadata file
-			PropertiesMetaData skinMetadata = new PropertiesMetaData(metaDataFilePath);
-			
-			Map<String, MetaDataProperty> skinKeyMap = skinMetadata.getProperties();
-			Set<String> skinKeySet = skinKeyMap.keySet();
-			for (String propertyKey : skinKeySet) {
-				// don't backup passwords
-				MetaDataProperty metaData = skinKeyMap.get(propertyKey);
-				if (!metaData.getFieldType().equals(MetaDataProperty.PASSWORD_TYPE)) {
-					backupProperties.addProperty(propertyKey, getProperty(skinName, propertyKey));
-				}
-			}			
-
-			// store the properties to file
-			backupProperties.store();
-
-		} catch (TransformerException te) {
-			throw new GeneralPropertyException(
-					"Could not transform backup properties xml: " + te.getMessage());
-		} catch (IOException ioe) {
-			throw new GeneralPropertyException(
-					"Could not backup configurable properties: " + ioe.getMessage());
-		} catch (ServiceException se) {
-			throw new GeneralPropertyException("Could not get skins property file: "
-					+ se.getMessage());
-		}
-	}
-
-	/**
-	 * Reports whether properties are fully configured.
-	 * 
-	 * @return a boolean that is true if properties are not unconfigured and
-	 *         false otherwise
-	 */
-	public static boolean areSkinsConfigured() throws MetacatUtilException {
-		try {
-			return !PropertyService.getProperty("configutil.skinsConfigured").equals(
-					PropertyService.UNCONFIGURED);
-		} catch (PropertyNotFoundException pnfe) {
-			throw new MetacatUtilException("Could not determine if skins are configured: "
-					+ pnfe.getMessage());
-		}
-	}
-
-	/**
-	 * Take input from the user in an HTTP request about an property to be
-	 * changed and update the metacat property file with that new value if it
-	 * has changed from the value that was originally set.
-	 * 
-	 * @param request
-	 *            that was generated by the user
-	 * @param response
-	 *            to send output back to the user
-	 * @param propertyName
-	 *            the name of the property to be checked and set
-	 */
-	public static void checkAndSetProperty(HttpServletRequest request, String skinName,
-			String propertyName) throws GeneralPropertyException {
-		String newValue = request.getParameter(skinName + "." + propertyName);
-		checkAndSetProperty(newValue, skinName, propertyName);
-	}
-
-	/**
-	 * Check user input against existing value and update the metacat property
-	 * file with that new value if it has changed from the value that was
-	 * originally set.
-	 * 
-	 * @param newValue
-	 *            the value that was returned by the form
-	 * @param skinname
-	 *            the skin that we are checking
-	 * @param propertyName
-	 *            the name of the property to be checked and set
-	 */
-	public static void checkAndSetProperty(String newValue, String skinName,
-			String propertyName) throws GeneralPropertyException {
-		String oldValue = SkinPropertyService.getProperty(skinName, propertyName);
-		if (newValue != null && !newValue.equals(oldValue)) {
-			SkinPropertyService.setPropertyNoPersist(skinName, propertyName, newValue);
-		}
-	}
-
-	/**
-	 * Reports whether the metacat configuration utility should be run. Returns
-	 * false if -- dev.runConfiguration=false and -- backup properties file
-	 * exists Note that dev.runConfiguration should only be set to false when
-	 * reinstalling the same version of the application in developement.
-	 * 
-	 * @return a boolean that is false if dev.runConfiguration is false and the
-	 *         backup properties file exists.
-	 */
-	public static boolean bypassConfiguration() {
-		boolean bypass = false;
-
-		// We only want to go through the check once to see if we want to
-		// bypass the configuration. We don't want to run through all of
-		// this every time we hit metacat.
-		if (bypassAlreadyChecked) {
-			return bypass;
-		}
-
-		try {
-			// check how dev.runConfiguration is set in metacat.properties
-			String strRunConfiguration = PropertyService
-					.getProperty("dev.runConfiguration");
-			bypass = !(Boolean.parseBoolean(strRunConfiguration));
-
-			// if the deb.runConfiguration is true, return false here.
-			if (!bypass) {
-				bypassAlreadyChecked = true;
-				return false;
-			}
-
-			// the system is bypassing the configuration utility. We need to
-			// get the backup properties and replace existing properties with
-			// backup values. We do this for main and org properties.
-			for (String skinName : skinNames) {
-				SortedProperties backupProperties = getBackupProperties(skinName);
-				Vector<String> backupPropertyNames = backupProperties.getPropertyNames();
-				for (String backupPropertyName : backupPropertyNames) {
-					String value = backupProperties.getProperty(backupPropertyName);
-					backupProperties.setPropertyNoPersist(backupPropertyName, value);
-				}
-				backupProperties.store();
-			}
-		} catch (PropertyNotFoundException pnfe) {
-			logMetacat.error("Could not find property: " + pnfe.getMessage());
-		} catch (GeneralPropertyException gpe) {
-			logMetacat.error("General property error: " + gpe.getMessage());
-		}
-
-		bypassAlreadyChecked = true;
-		return bypass;
-	}
-
-}
\ No newline at end of file

Property changes on: src/edu/ucsb/nceas/metacat/service/SkinPropertyService.java
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Author Date Id Revision
\ No newline at end of property
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerServlet.java	(nonexistent)
@@ -1,528 +0,0 @@
-/**
- *  '$RCSfile$'
- *    Purpose: A Class that implements a metadata catalog as a java Servlet
- *  Copyright: 2006 Regents of the University of California and the
- *             National Center for Ecological Analysis and Synthesis
- *    Authors: Matt Jones, Dan Higgins, Jivka Bojilova, Chad Berkley, Matthew Perry
- *
- *   '$Author: daigle $'
- *     '$Date: 2009-08-07 10:35:18 -0700 (Fri, 07 Aug 2009) $'
- * '$Revision: 5018 $'
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-package edu.ucsb.nceas.metacat.workflow;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.sql.SQLException;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Timer;
-
-import javax.servlet.ServletConfig;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-
-import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.scheduler.SchedulerService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
-import edu.ucsb.nceas.metacat.service.ServiceService;
-import edu.ucsb.nceas.metacat.service.SessionService;
-import edu.ucsb.nceas.metacat.shared.BaseException;
-import edu.ucsb.nceas.metacat.shared.ServiceException;
-import edu.ucsb.nceas.metacat.util.ErrorSendingErrorException;
-import edu.ucsb.nceas.metacat.util.RequestUtil;
-import edu.ucsb.nceas.metacat.util.ResponseUtil;
-import edu.ucsb.nceas.metacat.util.SessionData;
-import edu.ucsb.nceas.metacat.workflow.WorkflowScheduler;
-
-/**
- * A workflow scheduling server implemented as a Java Servlet
- *
- * Valid actions are:
- * 
- * action=scheduleWorkflow -- Schedule a workflow to be run.  Scheduling a workflow 
- *                            registers it with the scheduling engine and creates a row
- *                            in the scheduled_job table.  Note that this may be 
- *                            extracted into a separate servlet.
- *     delay -- The amount of time from now before the workflow should be run.  The 
- *              delay can be expressed in number of seconds, minutes, hours and days, 
- *              for instance 30s, 2h, etc.
- *     starttime -- The time that the workflow should first run.  If both are provided
- *                  this takes precedence over delay.  The time should be expressed as: 
- *                  MM/dd/yyyy HH:mm:ss with the timezone assumed to be that of the OS.
- *     endtime -- The time when the workflow should end. The time should be expressed as: 
- *                  MM/dd/yyyy HH:mm:ss with the timezone assumed to be that of the OS.
- *     intervalvalue -- The numeric value of the interval between runs
- *     intervalunit -- The unit of the interval between runs.  Can be s, m, h, d for 
- *                     seconds, minutes, hours and days respectively
- *     workflowid -- The lsid of the workflow that we want to schedule.  This workflow
- *                   must already exist in the database.
- *     karid -- The karid for the workflow that we want to schedule.
- *     workflowname -- The name of the workflow.
- *     forwardto -- If provided, forward to this page when processing is done.
- *     qformat -- If provided, render results using the stylesheets associated with
- *                this skin.  Default is xml.
- * action=unscheduleWorkflow -- Unschedule a workflow.  Unscheduling a workflow 
- *                            removes it from the scheduling engine and changes the 
- *                            status in the scheduled_job table to " unscheduled.  Note 
- *                            that this may be extracted into a separate servlet.
- *     workflowjobid -- The job ID for the workflow run that we want to unschedule.  This
- *                      is held in the database as scheduled_job.name
- *     forwardto -- If provided, forward to this page when processing is done.
- *     qformat -- If provided, render results using the stylesheets associated with
- *                this skin.  Default is xml.
- * action=rescheduleWorkflow -- Unschedule a workflow.  Rescheduling a workflow 
- *                            registers it with the scheduling engine and changes the 
- *                            status in the scheduled_job table to " scheduled.  Note 
- *                            that this may be extracted into a separate servlet.
- *     workflowjobid -- The job ID for the workflow run that we want to reschedule.  This
- *                      is held in the database as scheduled_job.name
- *     forwardto -- If provided, forward to this page when processing is done.
- *     qformat -- If provided, render results using the stylesheets associated with
- *                this skin.  Default is xml.
- * action=deleteScheduledWorkflow -- Delete a workflow.  Deleting a workflow 
- *                            removes it from the scheduling engine and changes the 
- *                            status in the scheduled_job table to " deleted.  Note 
- *                            that this may be extracted into a separate servlet.
- *     workflowjobid -- The job ID for the workflow run that we want to delete.  This
- *                      is held in the database as scheduled_job.name
- *     forwardto -- If provided, forward to this page when processing is done.
- *     qformat -- If provided, render results using the stylesheets associated with
- *                this skin.  Default is xml.
- *     
- */
-public class WorkflowSchedulerServlet extends HttpServlet {
-
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
-
-	private Timer timer = null;
-    
-    // Constants -- these should be final in a servlet
-    private static String LOG_CONFIG_NAME = null;
-    
-    /**
-     * Initialize the servlet by creating appropriate database connections
-     */
-    public void init(ServletConfig config) throws ServletException {
-    	Logger logMetacat = Logger.getLogger(WorkflowSchedulerServlet.class);
-    	try {
-    		
-            super.init(config);
-            
-            ServletContext context = config.getServletContext();
-            
-            ServiceService serviceService = ServiceService.getInstance(context);
-            logMetacat.debug("ServiceService singleton created " + serviceService);
-            
-            // Initialize the properties file
-            String dirPath = ServiceService.getRealConfigDir();
-            
-            LOG_CONFIG_NAME = dirPath + "/log4j.properties";
-            PropertyConfigurator.configureAndWatch(LOG_CONFIG_NAME);
-            
-            // Register preliminary services
-            ServiceService.registerService("PropertyService", PropertyService.getInstance());
-            ServiceService.registerService("SessionService", SessionService.getInstance()); 
-            ServiceService.registerService("SchedulerService", SchedulerService.getInstance());
-            
-    	} catch (ServiceException se) {
-        	String errorMessage = 
-        		"Service problem while intializing WorkflowScheduler Servlet: " + se.getMessage();
-            logMetacat.error(errorMessage);
-            throw new ServletException(errorMessage);
-        }
-    }
-    
-    /**
-	 * Close all db connections from the pool
-	 */
-    public void destroy() {
-    	Logger logMetacat = Logger.getLogger(WorkflowSchedulerServlet.class);
-    	
-    	ServiceService.stopAllServices();
-    	
-        // Close all db connection
-        logMetacat.warn("Destroying WorkflowSchedulerServlet");
-        timer.cancel();
-//        IndexingQueue.getInstance().setMetacatRunning(false);
-        DBConnectionPool.release();
-    }
-    
-    /** Handle "GET" method requests from HTTP clients */
-    public void doGet(HttpServletRequest request, HttpServletResponse response)
-    throws ServletException, IOException {
-        
-        // Process the data and send back the response
-        handleGetOrPost(request, response);
-    }
-    
-    /** Handle "POST" method requests from HTTP clients */
-    public void doPost(HttpServletRequest request, HttpServletResponse response)
-    throws ServletException, IOException {
-        
-        // Process the data and send back the response
-        handleGetOrPost(request, response);
-    }
-    
-    /**
-	 * Control servlet response depending on the action parameter specified
-	 */
-	private void handleGetOrPost(HttpServletRequest request, HttpServletResponse response)
-			throws ServletException, IOException {
-		Logger logMetacat = Logger.getLogger(WorkflowSchedulerServlet.class);
-
-		// Update the last update time for this user if they are not new
-		HttpSession httpSession = request.getSession(false);
-		if (httpSession != null) {
-			SessionService.touchSession(httpSession.getId());
-		}
-
-		/*
-		 * logMetacat.debug("Connection pool size: "
-		 * +connPool.getSizeOfDBConnectionPool(),10); logMetacat.debug("Free
-		 * DBConnection number: "
-		 */
-		// If all DBConnection in the pool are free and DBConnection pool
-		// size is greater than initial value, shrink the connection pool
-		// size to initial value
-		DBConnectionPool.shrinkDBConnectionPoolSize();
-
-		// Debug message to print out the method which have a busy DBConnection
-		try {
-			DBConnectionPool pool = DBConnectionPool.getInstance();
-			pool.printMethodNameHavingBusyDBConnection();
-		} catch (SQLException e) {
-			logMetacat.error("Error in WorkflowSchedulerServlet.handleGetOrPost: "
-					+ e.getMessage());
-			e.printStackTrace();
-		}
-
-		try {
-
-			String name = null;
-			String[] value = null;
-			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
-
-			Enumeration<String> paramlist = (Enumeration<String>) request
-					.getParameterNames();
-			while (paramlist.hasMoreElements()) {
-
-				name = paramlist.nextElement();
-				value = request.getParameterValues(name);
-
-				params.put(name, value);
-			}
-
-			// handle param is emptpy
-			if (params.isEmpty() || params == null) {
-				return;
-			}
-
-			// if the user clicked on the input images, decode which image
-			// was clicked then set the action.
-			if (params.get("action") == null) {
-				PrintWriter out = response.getWriter();
-				response.setContentType("text/xml");
-				out.println("<?xml version=\"1.0\"?>");
-				out.println("<error>");
-				out.println("Action not specified");
-				out.println("</error>");
-				out.close();
-				return;
-			}
-
-			String action = (params.get("action"))[0];
-			logMetacat.info("Action is: " + action);
-
-			// This block handles session management for the servlet
-			// by looking up the current session information for all actions
-			// other than "login" and "logout"
-			String userName = null;
-			String[] groupNames = null;
-			name = null;
-
-			// handle login action
-			if (action.equals("login")) {
-				// PrintWriter out = response.getWriter();
-				// handleLoginAction(out, params, request, response);
-				// out.close();
-
-				// handle logout action
-			} else if (action.equals("logout")) {
-				// PrintWriter out = response.getWriter();
-				// handleLogoutAction(out, params, request, response);
-				// out.close();
-
-				// handle shrink DBConnection request
-			} else if (action.equals("shrink")) {
-				PrintWriter out = response.getWriter();
-				boolean success = false;
-				// If all DBConnection in the pool are free and DBConnection
-				// pool
-				// size is greater than initial value, shrink the connection
-				// pool
-				// size to initial value
-				success = DBConnectionPool.shrinkConnectionPoolSize();
-				if (success) {
-					// if successfully shrink the pool size to initial value
-					out.println("DBConnection Pool shrunk successfully.");
-				}// if
-				else {
-					out.println("DBConnection pool not shrunk successfully.");
-				}
-				// close out put
-				out.close();
-
-				// aware of session expiration on every request
-			} else {
-				SessionData sessionData = RequestUtil.getSessionData(request);
-
-				userName = sessionData.getUserName();
-				// password = sessionData.getPassword();
-				groupNames = sessionData.getGroupNames();
-				// sessionId = sessionData.getId();
-
-				logMetacat.info("The user is : " + userName);
-			}
-
-			if (action.equals("refreshServices")) {
-				// TODO MCD this interface is for testing. It should go through
-				// a
-				// ServiceService class and only work for an admin user. Move to
-				// the
-				// MetacatAdminServlet
-				ServiceService.refreshService("XMLSchemaService");
-				return;
-			} else if (action.equals("scheduleWorkflow")) {
-				try {
-					WorkflowScheduler.getInstance().scheduleJob(request, response,
-							params, userName, groupNames);
-					return;
-				} catch (BaseException be) {
-					ResponseUtil.sendErrorXML(response,
-							ResponseUtil.SCHEDULE_WORKFLOW_ERROR, be);
-					return;
-				}
-			} else if (action.equals("unscheduleWorkflow")) {
-				try {
-					WorkflowScheduler.getInstance().unScheduleJob(request, response,
-							params, userName, groupNames);
-					return;
-				} catch (BaseException be) {
-					ResponseUtil.sendErrorXML(response,
-							ResponseUtil.UNSCHEDULE_WORKFLOW_ERROR, be);
-					return;
-				}
-			} else if (action.equals("rescheduleWorkflow")) {
-				try {
-					WorkflowScheduler.getInstance().reScheduleJob(request, response,
-							params, userName, groupNames);
-					return;
-				} catch (BaseException be) {
-					ResponseUtil.sendErrorXML(response,
-							ResponseUtil.RESCHEDULE_WORKFLOW_ERROR, be);
-					return;
-				}
-			} else if (action.equals("getScheduledWorkflow")) {
-				try {
-					WorkflowScheduler.getInstance().getJobs(request, response, params,
-							userName, groupNames);
-					return;
-				} catch (BaseException be) {
-					ResponseUtil.sendErrorXML(response,
-							ResponseUtil.GET_SCHEDULED_WORKFLOW_ERROR, be);
-					return;
-				}
-			} else if (action.equals("deleteScheduledWorkflow")) {
-				try {
-					WorkflowScheduler.getInstance().deleteJob(request, response, params,
-							userName, groupNames);
-					return;
-				} catch (BaseException be) {
-					ResponseUtil.sendErrorXML(response,
-							ResponseUtil.DELETE_SCHEDULED_WORKFLOW_ERROR, be);
-					return;
-				}
-			} else {
-				PrintWriter out = response.getWriter();
-				out.println("<?xml version=\"1.0\"?>");
-				out.println("<error>");
-				out.println("Error: action not registered.  Please report this error.");
-				out.println("</error>");
-				out.close();
-			}
-		} catch (ServiceException ue) {
-			String errorString = "Service error: " + ue.getMessage();
-			logMetacat.error(errorString);
-			throw new ServletException(errorString);
-		} catch (ErrorSendingErrorException esee) {
-			String errorString = "Error sending error message: " + esee.getMessage();
-			logMetacat.error(errorString);
-			throw new ServletException(errorString);
-		}
-	}
-    
-// // LOGIN & LOGOUT SECTION
-// /**
-// * Handle the login request. Create a new session object. Do user
-//	 * authentication through the session.
-//	 */
-//    private void handleLoginAction(PrintWriter out, Hashtable<String, String[]> params,
-//            HttpServletRequest request, HttpServletResponse response) {
-//        Logger logMetacat = Logger.getLogger(WorkflowSchedulerServlet.class);
-//        AuthSession sess = null;
-//        
-//        if(params.get("username") == null){
-//            response.setContentType("text/xml");
-//            out.println("<?xml version=\"1.0\"?>");
-//            out.println("<error>");
-//            out.println("Username not specified");
-//            out.println("</error>");
-//            return;
-//        }
-//        
-//        // }
-//        
-//        if(params.get("password") == null){
-//            response.setContentType("text/xml");
-//            out.println("<?xml version=\"1.0\"?>");
-//            out.println("<error>");
-//            out.println("Password not specified");
-//            out.println("</error>");
-//            return;
-//        }
-//        
-//        String un = (params.get("username"))[0];
-//        logMetacat.info("user " + un + " is trying to login");
-//        String pw = (params.get("password"))[0];
-//        
-//        String qformat = "xml";
-//        if(params.get("qformat") != null){
-//            qformat = (params.get("qformat"))[0];
-//        }
-//        
-//        try {
-//            sess = new AuthSession();
-//        } catch (Exception e) {
-//        	String errorMsg = "Problem in WorkflowSchedulerServlet.handleLoginAction() authenicating session: "
-//                + e.getMessage();
-//            logMetacat.error(errorMsg);
-//            out.println(errorMsg);
-//            return;
-//        }
-//        boolean isValid = sess.authenticate(request, un, pw);
-//        
-//        //if it is authernticate is true, store the session
-//        if (isValid) {
-//            HttpSession session = sess.getSessions();
-//            String id = session.getId();
-//            logMetacat.debug("Store session id " + id
-//                    + " which has username" + session.getAttribute("username")
-//                    + " into hash in login method");
-//            try {
-//				SessionService.registerSession(id, (String) session
-//						.getAttribute("username"), (String[]) session
-//						.getAttribute("groupnames"), (String) session
-//						.getAttribute("password"));
-//			} catch (ServiceException se) {
-//				String errorMsg = "Problem in WorkflowSchedulerServlet.handleLoginAction() registering session: "
-//						+ se.getMessage();
-//				logMetacat.error(errorMsg);
-//				out.println(errorMsg);
-//				return;
-//			}
-//        }
-//        
-//        // format and transform the output
-//        if (qformat.equals("xml")) {
-//            response.setContentType("text/xml");
-//            out.println(sess.getMessage());
-//        } else {
-//            try {
-//                DBTransform trans = new DBTransform();
-//                response.setContentType("text/html");
-//                trans.transformXMLDocument(sess.getMessage(),
-//                        "-//NCEAS//login//EN", "-//W3C//HTML//EN", qformat,
-//                        out, null, null);
-//            } catch (Exception e) {               
-//                logMetacat.error("Error in WorkflowSchedulerServlet.handleLoginAction: "
-//                        + e.getMessage());
-//            }
-//        }
-//    }
-//    
-//    /**
-//     * Handle the logout request. Close the connection.
-//     */
-//    private void handleLogoutAction(PrintWriter out, Hashtable<String, String[]> params,
-//            HttpServletRequest request, HttpServletResponse response) {
-//        Logger logMetacat = Logger.getLogger(WorkflowSchedulerServlet.class);
-//        String qformat = "xml";
-//        if(params.get("qformat") != null){
-//            qformat = params.get("qformat")[0];
-//        }
-//        
-//        // close the connection
-//        HttpSession sess = request.getSession(false);
-//        logMetacat.info("After get session in logout request");
-//        if (sess != null) {
-//            logMetacat.info("The session id " + sess.getId()
-//            + " will be invalidate in logout action");
-//            logMetacat.info("The session contains user "
-//                    + sess.getAttribute("username")
-//                    + " will be invalidate in logout action");
-//            sess.invalidate();
-//            SessionService.unRegisterSession(sess.getId());
-//        }
-//        
-//        // produce output
-//        StringBuffer output = new StringBuffer();
-//        output.append("<?xml version=\"1.0\"?>");
-//        output.append("<logout>");
-//        output.append("User logged out");
-//        output.append("</logout>");
-//        
-//        //format and transform the output
-//        if (qformat.equals("xml")) {
-//            response.setContentType("text/xml");
-//            out.println(output.toString());
-//        } else {
-//            try {
-//                DBTransform trans = new DBTransform();
-//                response.setContentType("text/html");
-//                trans.transformXMLDocument(output.toString(),
-//                        "-//NCEAS//login//EN", "-//W3C//HTML//EN", qformat,
-//                        out, null, null);
-//            } catch (Exception e) {
-//                logMetacat.error(
-//                        "Error in WorkflowSchedulerServlet.handleLogoutAction"
-//                        + e.getMessage());
-//            }
-//        }
-//    }
-}

Property changes on: src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerServlet.java
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java	(nonexistent)
@@ -1,357 +0,0 @@
-/**
- *  '$RCSfile$'
- *    Purpose: A Class that handles scheduling workflow jobs 
- *  Copyright: 2009 Regents of the University of California and the
- *             National Center for Ecological Analysis and Synthesis
- *    Authors: Michael Daigle
- * 
- *   '$Author: daigle $'
- *     '$Date: 2009-03-25 13:41:15 -0800 (Wed, 25 Mar 2009) $'
- * '$Revision: 4861 $'
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-package edu.ucsb.nceas.metacat.workflow;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.Calendar;
-import java.util.Hashtable;
-import java.util.HashMap;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.log4j.Logger;
-
-import edu.ucsb.nceas.metacat.scheduler.BaseScheduler;
-import edu.ucsb.nceas.metacat.scheduler.ScheduledJobAccess;
-import edu.ucsb.nceas.metacat.scheduler.ScheduledJobDAO;
-import edu.ucsb.nceas.metacat.scheduler.SchedulerService;
-import edu.ucsb.nceas.metacat.scheduler.MetacatSchedulerException;
-import edu.ucsb.nceas.metacat.shared.AccessException;
-import edu.ucsb.nceas.metacat.shared.ServiceException;
-import edu.ucsb.nceas.metacat.util.ErrorSendingErrorException;
-import edu.ucsb.nceas.metacat.util.ResponseUtil;
-import edu.ucsb.nceas.utilities.DateUtil;
-import edu.ucsb.nceas.utilities.UtilException;
-
-/**
- * @author daigle
- *
- */
-public class WorkflowScheduler extends BaseScheduler {
-	
-	private static WorkflowScheduler workflowScheduler = null;
-	
-	private static Logger logMetacat = Logger.getLogger(WorkflowScheduler.class);
-	
-	private static String WORKFLOW_JOB_GROUP = "workflow";
-	private static String WORKFLOW_JOB_CLASS = "edu.ucsb.nceas.metacat.workflow.WorkflowJob";
-
-	/**
-	 * private constructor since this is a singleton
-	 */
-	private WorkflowScheduler()  {}
-	
-	/**
-	 * Get the single instance of SchedulerService.
-	 * 
-	 * @return the single instance of SchedulerService
-	 */
-	public static WorkflowScheduler getInstance() {
-		if (workflowScheduler == null) {
-			workflowScheduler = new WorkflowScheduler();
-		}
-		return workflowScheduler;
-	}
-	
-	/**
-	 * Scheduling a workflow
-	 * 
-	 * @param request
-	 *            the servlet request object
-	 * @param response
-	 *            the servlet response object
-	 * @param params
-	 *            the request parameters
-	 * @param username
-	 *            the user
-	 * @param groups
-	 *            the user's group
-	 */
-	public void scheduleJob(HttpServletRequest request, HttpServletResponse response, 
-			Hashtable<String, String[]> params, String username,
-			String[] groups) throws MetacatSchedulerException {
-		 		
-		String delays[] = params.get("delay");
-		String startTimes[] = params.get("starttime");
-		String endTimes[] = params.get("endtime");
-		HashMap<String, String> jobParams = new HashMap<String, String>();
-		Calendar startCal = null;
-		Calendar endCal = null;
-
-		try {
-			SchedulerService schedulerService = SchedulerService.getInstance();
-
-			// get start time or delay.  Start time takes precedence if both exist.
-			if (startTimes != null && startTimes.length > 0) {
-				startCal = DateUtil.humanReadableToCalendar(startTimes[0], "MM/dd/yyyy HH:mm:ss");
-			} else if (delays != null && delays.length > 0) {
-				startCal = schedulerService.getStartDateFromDelay(delays[0]);
-			} else {
-				// if delay and starttime were not provided, set date to now.
-				startCal = Calendar.getInstance();
-			}
-			
-			// get end time.  null is fine.
-			if (endTimes != null && endTimes.length > 0) {
-				endCal = DateUtil.humanReadableToCalendar(endTimes[0], "MM/dd/yyyy HH:mm:ss");
-			} 
-
-			// interval value must exist
-			String intervalValues[] = params.get("intervalvalue");
-			if (intervalValues == null || intervalValues.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - intervalvalue field must be populated "
-								+ "in scheduler parameters when scheduling job.");
-			}
-			String intervalStrValue = intervalValues[0];
-			int intervalValue = Integer.parseInt(intervalStrValue);
-			
-			// interval unit must exist
-			String intervalUnits[] = params.get("intervalunit");
-			if (intervalUnits == null || intervalUnits.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - intervalunit field must be populated "
-								+ "in scheduler parameters when scheduling job.");
-			}
-			String intervalUnit = intervalUnits[0];
-
-			// workflow id must exist.  Add to job params
-			String workflowids[] = params.get("workflowid");
-			if (workflowids == null || workflowids.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - workflowid field must be populated "
-								+ "in scheduler parameters when scheduling job.");
-			}
-			jobParams.put("workflowid", workflowids[0]);
-			
-			// kar id must exist.  Add to job params
-			String karids[] = params.get("karid");
-			if (karids == null || karids.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - karid field must be populated "
-								+ "in scheduler parameters when scheduling job.");
-			}
-			jobParams.put("karid", karids[0]);
-			
-			
-			// workflow name unit must exist.  Add to job params
-			String workflownames[] = params.get("workflowname");
-			if (workflownames == null || workflownames.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - workflowname field must be populated "
-								+ "in scheduler parameters when scheduling job.");
-			}
-			jobParams.put("workflowname", workflownames[0]);
-
-			String jobName = WORKFLOW_JOB_GROUP
-					+ Calendar.getInstance().getTimeInMillis();
-
-			// Schedule the job
-			String xmlResult = schedulerService.scheduleJob(jobName, startCal, endCal, intervalValue, intervalUnit,
-					WORKFLOW_JOB_CLASS, WORKFLOW_JOB_GROUP, jobParams, username, groups);
-			
-			ResponseUtil.sendSuccessXML(response, xmlResult);
-			
-		} catch (UtilException ue) {
-			throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - " 
-					+ "Utility issue when scheduling job: " + ue.getMessage());
-		} catch (ServiceException se) {
-			throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - " 
-					+ "Service issue when scheduling job", se);
-		} catch (ErrorSendingErrorException esee) {
-			throw new MetacatSchedulerException("WorkflowScheduler.scheduleJob - " 
-					+ "Issue sending error when scheduling job: " + esee.getMessage());			
-		}
-	}
-	
-	/**
-	 * Unschedule a job
-	 * 
-	 * @param request
-	 *            the servlet request object
-	 * @param response
-	 *            the servlet response object
-	 * @param params
-	 *            the request parameters
-	 * @param username
-	 *            the user
-	 * @param groups
-	 *            the user's group
-	 */
-	public void unScheduleJob(HttpServletRequest request, HttpServletResponse response,
-			Hashtable<String, String[]> params, String username, String[] groups)
-			throws MetacatSchedulerException {
-		try {
-			// workflow job id must exist
-			String jobNames[] = params.get("workflowjobid");
-			if (jobNames == null || jobNames.length == 0) {
-				throw new MetacatSchedulerException("SchedulerService.unScheduleJob - workflowjobid " 
-						+ "field must be populated in scheduler parameters when unscheduling job.");
-			}
-			String jobName = jobNames[0];
-
-			// unschedule the job
-			SchedulerService schedulerService = SchedulerService.getInstance();
-			String xmlResult = schedulerService.unScheduleJob(jobName, username, groups);
-			
-			ResponseUtil.sendSuccessXML(response, xmlResult);
-
-		} catch (ServiceException se) {
-			throw new MetacatSchedulerException("WorkflowScheduler.unScheduleJob - " 
-					+ "Service issue unscheduling job", se);
-		} catch (Exception e) {
-			throw new MetacatSchedulerException("WorkflowScheduler.unScheduleJob - " 
-					+ "Generic issue unscheduling job: " + e.getMessage());
-		}
-	}
-	
-	/**
-	 * reschedule job
-	 * 
-	 * @param request
-	 *            the servlet request object
-	 * @param response
-	 *            the servlet response object
-	 * @param params
-	 *            the request parameters
-	 * @param username
-	 *            the user
-	 * @param groups
-	 *            the user's group
-	 */
-	public void reScheduleJob(HttpServletRequest request, HttpServletResponse response, 
-			Hashtable<String, String[]> params, String username,
-			String[] groups) throws MetacatSchedulerException {
-		 		
-		try {
-			// workflow job id must exist
-			String jobNames[] = params.get("workflowjobid");	
-			if (jobNames == null || jobNames.length == 0) {
-				throw new MetacatSchedulerException("WorkflowScheduler.reScheduleJob - workflowjobid field must be populated "
-						+ "in scheduler parameters when rescheduling job.");
-			}			
-			String jobName = jobNames[0];
-	
-			ScheduledJobAccess jobAccess = new ScheduledJobAccess();
-			ScheduledJobDAO jobDAO = jobAccess.getJobByName(jobName);
-			
-			// reschedule the job
-			SchedulerService schedulerService = SchedulerService.getInstance();
-			String result = schedulerService.rescheduleJob(jobDAO, username, groups);
-
-			ResponseUtil.sendSuccessXML(response, result);
-			
-		} catch (AccessException ae) {
-			throw new MetacatSchedulerException("WorkflowScheduler.reScheduleJob - " 
-					+ "DB access issue when scheduling job  : ", ae);
-		} catch (ServiceException se) {
-			throw new MetacatSchedulerException("WorkflowScheduler.reScheduleJob - " 
-					+ "Service issue scheduling job", se);
-		} catch (ErrorSendingErrorException esee) {
-			throw new MetacatSchedulerException("WorkflowScheduler.reScheduleJob - " 
-					+ "Issue sending erro when scheduling job: " + esee.getMessage());			
-		}
-	}
-	
-	/**
-	 * delete job - to be implemented
-	 */
-	public void deleteJob(HttpServletRequest request, HttpServletResponse response, 
-			Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException {
-		 try {
-			// workflow job id must exist
-			String jobNames[] = params.get("workflowjobid");
-			if (jobNames == null || jobNames.length == 0) {
-				throw new MetacatSchedulerException(
-						"WorkflowScheduler.deleteJob - workflowname field must be populated "
-								+ "in scheduler parameters when deleting job.");
-			}
-			String jobName = jobNames[0];
-
-			ScheduledJobAccess jobAccess = new ScheduledJobAccess();
-			ScheduledJobDAO jobDAO = jobAccess.getJobByName(jobName);
-
-			// delete the job
-			SchedulerService schedulerService = SchedulerService.getInstance();
-			String result = schedulerService.deleteJob(jobDAO, username, groups);
-
-			ResponseUtil.sendSuccessXML(response, result);
-
-		} catch (AccessException ae) {
-			throw new MetacatSchedulerException("WorkflowScheduler.deleteJob - "
-					+ "DB access issue when deleting job  : ", ae);
-		} catch (ServiceException se) {
-			throw new MetacatSchedulerException("WorkflowScheduler.deleteJob - "
-					+ "Service issue deleting job", se);
-		} catch (ErrorSendingErrorException esee) {
-			throw new MetacatSchedulerException("WorkflowScheduler.deleteJob - "
-					+ "Issue sending erro when deleting job: " + esee.getMessage());
-		}
-	}
-	
-	/**
-	 * get job information for a given workflow in xml format
-	 * 
-	 * @param request
-	 *            the servlet request object
-	 * @param response
-	 *            the servlet response object
-	 * @param params
-	 *            the request parameters
-	 * @param username
-	 *            the user
-	 * @param groups
-	 *            the user's group
-	 */
-	public void getJobs(HttpServletRequest request, HttpServletResponse response, 
-			Hashtable<String, String[]> params, String username, String[] groups) throws MetacatSchedulerException {
-		
-		String workflowId = null;
-		
-		String workflowIds[] = params.get("workflowid");
-		if (workflowIds != null && workflowIds.length != 0) {
-			workflowId = workflowIds[0];
-		}
-		
-        PrintWriter out = null;
-		try {
-			// get the job info in xml format
-			out = response.getWriter();
-			SchedulerService.getInstance().getJobsInfoXML(WORKFLOW_JOB_GROUP,
-					"workflowid", workflowId, out);
-		} catch (ServiceException se) {
-			throw new MetacatSchedulerException("WorkflowScheduler.getJobs - " 
-					+ "Service error when transforming XML for workflow id: " 
-					+ workflowId + " : " + se.getMessage());
-		} catch (IOException ioe) {
-			throw new MetacatSchedulerException("WorkflowScheduler.getJobs - " 
-					+ "I/O error when transforming XML for workflow id: " 
-					+ workflowId + " : " + ioe.getMessage());
-		} finally {
-			if (out != null) {
-				out.close();
-			}
-		}
-	}
-}

Property changes on: src/edu/ucsb/nceas/metacat/workflow/WorkflowScheduler.java
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowJob.java	(nonexistent)
@@ -1,123 +0,0 @@
-/**
- *  '$RCSfile$'
- *    Purpose: a single workflow job that is schedulable 
- *  Copyright: 2009 Regents of the University of California and the
- *             National Center for Ecological Analysis and Synthesis
- *    Authors: Michael Daigle
- *
- *   '$Author: daigle $'
- *     '$Date: 2008-07-06 21:25:34 -0700 (Sun, 06 Jul 2008) $'
- * '$Revision: 4080 $'
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-package edu.ucsb.nceas.metacat.workflow;
-
-import java.rmi.RemoteException;
-import javax.xml.rpc.ServiceException;
-
-import org.apache.log4j.Logger;
-
-import org.quartz.InterruptableJob;
-import org.quartz.JobDetail;
-import org.quartz.JobDataMap;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import org.kepler.executionWS.KeplerWebServiceLocator;
-import org.kepler.executionWS.KeplerWebServicePortType;
-
-import edu.ucsb.nceas.metacat.scheduler.ScheduledJobAccess;
-import edu.ucsb.nceas.metacat.scheduler.ScheduledJobDAO;
-import edu.ucsb.nceas.metacat.scheduler.ScheduledJobParamDAO;
-
-public class WorkflowJob implements InterruptableJob {
-	
-	private static Logger logMetacat = Logger.getLogger(WorkflowJob.class);
-    	
-	/**
-	 * Required method that is called when the job is run by the scheduler.
-	 * 
-	 * @param executionContext
-	 *            the context information for this job
-	 */
-	public void execute(JobExecutionContext executionContext) throws JobExecutionException {
-		try {
-			// have to be able to get the job detail
-			JobDetail jobDetail = executionContext.getJobDetail();
-			if (jobDetail == null) {
-				throw new JobExecutionException("WorkflowJob.execute - Could not get job detail from execution context"); 
-			}
-			
-			// have to be able to get the job data map from the job detail
-			JobDataMap jobDataMap = jobDetail.getJobDataMap();
-			if (jobDataMap == null) {
-				throw new JobExecutionException("WorkflowJob.execute - Could not get job data map from job detail"); 
-			}
-			
-			String jobName = jobDetail.getName();
-			
-			ScheduledJobAccess jobAccess = new ScheduledJobAccess();
-			ScheduledJobDAO jobDAO = jobAccess.getJobByName(jobName);
-			
-			if(jobDAO == null) {
-				String errorMessage = "WorkflowJob.execute - Could not retrieve job info from " 
-					+ "database for job: " + jobName;
-				logMetacat.error(errorMessage);
-				throw new JobExecutionException(errorMessage);
-			}
-			
-			// the kar lsid must be part of the job data map
-			ScheduledJobParamDAO jobParamDAO = jobDAO.getAllJobParams().get("karid");
-			if (jobParamDAO == null) {
-				throw new JobExecutionException("WorkflowJob.execute - Could not get job param named karid from " 
-						+ "job data map for job: " + jobName);
-			}
-			String karLSID = jobParamDAO.getValue();
-			if (karLSID == null) {
-				throw new JobExecutionException("WorkflowJob.execute - Could not get kar LSID for job: " + jobName);
-			}
-			
-			// Locate service
-			logMetacat.debug("WorkflowJob.execute - Getting kepler webservice Locator");
-			KeplerWebServiceLocator serviceLocator = new KeplerWebServiceLocator();
-			
-			// get endpoint service
-			logMetacat.debug("WorkflowJob.execute - Getting kepler webservice");
-			KeplerWebServicePortType serviceEndpoint = serviceLocator.getKeplerWebServiceHttpSoap11Endpoint();
-			
-			// call execute against remote endpoint
-			logMetacat.debug("WorkflowJob.execute - Executing with kar lsid:" + karLSID);
-			String status = serviceEndpoint.execute(karLSID);		
-			logMetacat.debug("WorkflowJob.execute - Status: " + status);
-			
-		} catch (RemoteException re) {
-			String errorStr = "WorkflowJob.execute - Remote problem when trying to execute task: " + re.getMessage();
-			logMetacat.error(errorStr);
-			throw new JobExecutionException(errorStr); 
-		} catch (ServiceException se) {
-			String errorStr = "WorkflowJob.execute - Service problem when trying to execute task: " + se.getMessage();
-			logMetacat.error(errorStr);
-			throw new JobExecutionException(errorStr); 
-		} catch (Exception e) {
-			String errorStr = "WorkflowJob.execute - General problem when trying to execute task: " + e.getMessage();
-			logMetacat.error(errorStr);
-			throw new JobExecutionException(errorStr); 
-		}
-	}
-	
-	public void interrupt() {
-	}
-}
\ No newline at end of file
Index: src/edu/ucsb/nceas/metacat/util/SystemUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/SystemUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/SystemUtil.java	(revision 5030)
@@ -35,7 +35,7 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.MetacatVersion;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.ServiceService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
@@ -48,7 +48,7 @@
 
 	private static Logger logMetacat = Logger.getLogger(SystemUtil.class);
 	private static String METACAT_SERVLET = "metacat";
-	private static String METACAT_WEB_SERVLET = "metacatweb";
+//	private static String METACAT_WEB_SERVLET = "metacatweb";
 	private static int OS_CLASS = 0;
 	
 	// Class of OS.  If we need more granularity, we should create a version
@@ -224,15 +224,15 @@
 		return getContextURL() + "/" + METACAT_SERVLET;
 	}
 	
-	/**
-	 * Get the web front end servlet URL. This is made up of the server URL with 
-	 * context + file separator + the metacat web servlet name
-	 * 
-	 * @return string holding the web servlet URL
-	 */
-	public static String getWebServletURL() throws PropertyNotFoundException {
-		return getContextURL() + "/" + METACAT_WEB_SERVLET;
-	}
+//	/**
+//	 * Get the web front end servlet URL. This is made up of the server URL with 
+//	 * context + file separator + the metacat web servlet name
+//	 * 
+//	 * @return string holding the web servlet URL
+//	 */
+//	public static String getWebServletURL() throws PropertyNotFoundException {
+//		return getContextURL() + "/" + METACAT_WEB_SERVLET;
+//	}
 
 	/**
 	 * Get the style skins URL. This is made up of the server URL with context +
@@ -256,11 +256,11 @@
 	
 	/**
 	 * Get the metacat version by getting the string representation from
-	 * metacat.properties and instantiating a MetaCatVersion object.
+	 * metacat.properties and instantiating a MetacatVersion object.
 	 * The info is set in build.properties and then populated into metacat.properties
 	 * at build time using Ant token replacement.
 	 * 
-	 * @return a MetaCatVersion object holding metacat version information
+	 * @return a MetacatVersion object holding metacat version information
 	 */
 	public static MetacatVersion getMetacatVersion() throws PropertyNotFoundException {
 		String metacatVersionString = 
@@ -275,7 +275,7 @@
 	 * The info is set in build.properties and then populated into metacat.properties
 	 * at build time using Ant token replacement.
 	 * 
-	 * @return a MetaCatVersion object holding metacat version information
+	 * @return a MetacatVersion object holding metacat version information
 	 */
 	public static String getMetacatReleaseInfo() throws PropertyNotFoundException {
 		return PropertyService.getProperty("application.metacatReleaseInfo");
@@ -417,9 +417,9 @@
 			// Set the default location using the os
 			String systemDir = "";
 			if (getOsClass() == WIN_OS) {
-				systemDir = PropertyService.getProperty("application.windowsBackupBaseDir");
+				systemDir = "C:\\Program Files";
 			} else {
-				systemDir = PropertyService.getProperty("application.linuxBackupBaseDir");
+				systemDir = "/var";
 			}	
 			String systemMetacatDir = systemDir + FileUtil.getFS() + "metacat";
 			String systemBackupDir = systemMetacatDir + FileUtil.getFS() + "."
@@ -477,11 +477,8 @@
 			logMetacat.warn("Could not get real application context: " + se.getMessage());
 		} catch (UtilException ue) {
 			logMetacat.warn("Could not create directory: " + ue.getMessage());
-		} catch (PropertyNotFoundException pnfe) {
-			logMetacat.warn("Could not get default backup base dir property: "
-					+ pnfe.getMessage());
-		}
-	
+		} 
+		
 		// Otherwise, return userHomeDir
 		return null;
 	}
Index: src/edu/ucsb/nceas/metacat/util/DocumentUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/DocumentUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/DocumentUtil.java	(revision 5030)
@@ -34,7 +34,7 @@
 import edu.ucsb.nceas.dbadapter.AbstractDatabase;
 import edu.ucsb.nceas.metacat.DBSAXHandler;
 import edu.ucsb.nceas.metacat.NodeRecord;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/AuthLdap.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AuthLdap.java	(revision 5030)
@@ -49,7 +49,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 import java.lang.InstantiationException;
Index: src/edu/ucsb/nceas/metacat/DBTransform.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBTransform.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DBTransform.java	(revision 5030)
@@ -48,8 +48,8 @@
 import org.xml.sax.InputSource;
 import org.apache.xpath.XPathAPI;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
-import edu.ucsb.nceas.metacat.service.SkinPropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
+import edu.ucsb.nceas.metacat.properties.SkinPropertyService;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.SortedProperties;
@@ -67,7 +67,6 @@
   private String httpServer = null;
   private String contextURL = null;
   private String servletURL = null;
-  private String webServletURL = null;
   
   /**
    * construct a DBTransform instance.
@@ -87,7 +86,6 @@
     httpServer = SystemUtil.getServerURL();
     contextURL = SystemUtil.getContextURL();
     servletURL = SystemUtil.getServletURL();
-    webServletURL = SystemUtil.getWebServletURL();
   }
 
   /**
@@ -269,13 +267,11 @@
         logMetacat.debug("cgi-prefix=" + cgiPrefix);
         logMetacat.debug("httpServer=" + httpServer);
         logMetacat.debug("contextURL=" + contextURL);
-        logMetacat.debug("serletURL=" + servletURL);
-        logMetacat.debug("webServletURL=" + webServletURL);
+        logMetacat.debug("servletURL=" + servletURL);
         transformer.setParameter("cgi-prefix", cgiPrefix);
         transformer.setParameter("httpServer", httpServer);
         transformer.setParameter("contextURL", contextURL);
         transformer.setParameter("servletURL", servletURL);
-        transformer.setParameter("webServletURL", webServletURL);
         
         // Set up parameter for transformation
         if ( param != null) {
Index: src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/service/XMLSchemaService.java	(revision 5030)
@@ -41,6 +41,7 @@
 import edu.ucsb.nceas.metacat.MetaCatServlet;
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.BaseService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.utilities.FileUtil;
Index: src/edu/ucsb/nceas/metacat/DBUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DBUtil.java	(revision 5030)
@@ -49,7 +49,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/util/AuthUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/AuthUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/AuthUtil.java	(revision 5030)
@@ -33,7 +33,7 @@
 import javax.servlet.http.HttpSession;
 
 import edu.ucsb.nceas.metacat.AuthSession;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.SessionService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
Index: src/edu/ucsb/nceas/metacat/util/DatabaseUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/DatabaseUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/DatabaseUtil.java	(revision 5030)
@@ -33,7 +33,7 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.database.DBVersion;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
Index: src/edu/ucsb/nceas/metacat/util/SkinUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/SkinUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/SkinUtil.java	(revision 5030)
@@ -30,7 +30,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.StringUtil;
Index: src/edu/ucsb/nceas/metacat/util/EMLVersionsTransformer.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/EMLVersionsTransformer.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/EMLVersionsTransformer.java	(revision 5030)
@@ -40,7 +40,7 @@
 import edu.ucsb.nceas.metacat.McdbException;
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 import javax.xml.transform.TransformerFactory;
 import javax.xml.transform.Transformer;
Index: src/edu/ucsb/nceas/metacat/AuthTest.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthTest.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AuthTest.java	(revision 5030)
@@ -32,7 +32,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 import java.lang.InstantiationException;
Index: src/edu/ucsb/nceas/metacat/DBQuery.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBQuery.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DBQuery.java	(revision 5030)
@@ -50,7 +50,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.AuthUtil;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
Index: src/org/kepler/executionWS/KeplerWebServiceLocator.java
===================================================================
--- src/org/kepler/executionWS/KeplerWebServiceLocator.java	(revision 5029)
+++ src/org/kepler/executionWS/KeplerWebServiceLocator.java	(revision 5030)
@@ -7,7 +7,7 @@
 
 package org.kepler.executionWS;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 public class KeplerWebServiceLocator extends org.apache.axis.client.Service implements org.kepler.executionWS.KeplerWebService {
Index: src/edu/ucsb/nceas/dbadapter/AbstractDatabase.java
===================================================================
--- src/edu/ucsb/nceas/dbadapter/AbstractDatabase.java	(revision 5029)
+++ src/edu/ucsb/nceas/dbadapter/AbstractDatabase.java	(revision 5030)
@@ -30,7 +30,7 @@
 
 import java.sql.*;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 /**
  * Java offers uniform database access through the use of JDBC.
Index: src/edu/ucsb/nceas/metacat/DBValidate.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBValidate.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DBValidate.java	(revision 5030)
@@ -44,7 +44,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 /**
  * Name: DBValidate.java
Index: src/edu/ucsb/nceas/metacat/IndexingQueue.java
===================================================================
--- src/edu/ucsb/nceas/metacat/IndexingQueue.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/IndexingQueue.java	(revision 5030)
@@ -35,7 +35,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
Index: src/edu/ucsb/nceas/metacat/advancedsearch/AdvancedSearchServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/advancedsearch/AdvancedSearchServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/advancedsearch/AdvancedSearchServlet.java	(revision 5030)
@@ -36,7 +36,7 @@
 import javax.servlet.http.HttpSession;
 
 import edu.ucsb.nceas.metacat.client.*;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/advancedsearch/BrowseServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/advancedsearch/BrowseServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/advancedsearch/BrowseServlet.java	(revision 5030)
@@ -37,7 +37,7 @@
 import javax.servlet.http.HttpSession;
 
 import edu.ucsb.nceas.metacat.client.*;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/advancedsearch/SearchServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/advancedsearch/SearchServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/advancedsearch/SearchServlet.java	(revision 5030)
@@ -36,7 +36,7 @@
 import javax.servlet.http.HttpSession;
 
 import edu.ucsb.nceas.metacat.client.*;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/advancedsearch/LoginServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/advancedsearch/LoginServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/advancedsearch/LoginServlet.java	(revision 5030)
@@ -37,7 +37,7 @@
 import javax.servlet.http.HttpSession;
 
 import edu.ucsb.nceas.metacat.client.*;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/advancedsearch/MetacatHelper.java
===================================================================
--- src/edu/ucsb/nceas/metacat/advancedsearch/MetacatHelper.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/advancedsearch/MetacatHelper.java	(revision 5030)
@@ -25,7 +25,7 @@
 package edu.ucsb.nceas.metacat.advancedsearch;
 
 import edu.ucsb.nceas.metacat.AuthLdap;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 import javax.servlet.ServletContext;
Index: src/edu/ucsb/nceas/metacat/spatial/SpatialDataset.java
===================================================================
--- src/edu/ucsb/nceas/metacat/spatial/SpatialDataset.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/spatial/SpatialDataset.java	(revision 5030)
@@ -45,7 +45,7 @@
 import java.net.URL;
 import java.net.MalformedURLException;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 /**
  * Class providing direct read/write access to the
Index: src/edu/ucsb/nceas/metacat/spatial/SpatialDocument.java
===================================================================
--- src/edu/ucsb/nceas/metacat/spatial/SpatialDocument.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/spatial/SpatialDocument.java	(revision 5030)
@@ -25,7 +25,7 @@
 import java.io.File;
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/ArchiveHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/ArchiveHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/ArchiveHandler.java	(revision 5030)
@@ -34,7 +34,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.HandlerException;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.util.ErrorSendingErrorException;
Index: src/edu/ucsb/nceas/metacat/harvesterClient/HarvestLog.java
===================================================================
--- src/edu/ucsb/nceas/metacat/harvesterClient/HarvestLog.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/harvesterClient/HarvestLog.java	(revision 5030)
@@ -34,7 +34,7 @@
 import java.util.Date;
 import java.util.StringTokenizer;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/harvesterClient/MetUpload.java
===================================================================
--- src/edu/ucsb/nceas/metacat/harvesterClient/MetUpload.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/harvesterClient/MetUpload.java	(revision 5030)
@@ -42,7 +42,7 @@
 import com.oreilly.servlet.multipart.Part;
 
 import edu.ucsb.nceas.metacat.client.*;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.GeneralPropertyException;
Index: src/edu/ucsb/nceas/metacat/database/DBConnectionPool.java
===================================================================
--- src/edu/ucsb/nceas/metacat/database/DBConnectionPool.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/database/DBConnectionPool.java	(revision 5030)
@@ -37,7 +37,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /** 
Index: src/edu/ucsb/nceas/metacat/DocumentIdQuery.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentIdQuery.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DocumentIdQuery.java	(revision 5030)
@@ -26,8 +26,9 @@
 import java.io.File;
 import java.util.Hashtable;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
+import edu.ucsb.nceas.utilities.FileUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
@@ -120,7 +121,7 @@
 		String CONFIG_DIR = "lib";
 		File dirPath = new File(CONFIG_DIR);
 		try {
-			PropertyService.getInstance();
+			PropertyService.getInstance(dirPath.getPath() + FileUtil.getFS() + "metacat.properties");
 		} catch (ServiceException ioe) {
 			System.err.println("Error in loading properties: " + ioe.getMessage());
 		}
Index: src/edu/ucsb/nceas/metacat/MetaCatServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 5030)
@@ -78,14 +78,15 @@
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
 import edu.ucsb.nceas.metacat.dataquery.DataQuery;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
+import edu.ucsb.nceas.metacat.properties.SkinPropertyService;
 import edu.ucsb.nceas.metacat.replication.ForceReplicationHandler;
 import edu.ucsb.nceas.metacat.replication.ReplicationService;
 import edu.ucsb.nceas.metacat.scheduler.SchedulerService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
 import edu.ucsb.nceas.metacat.service.ServiceService;
 import edu.ucsb.nceas.metacat.service.SessionService;
-import edu.ucsb.nceas.metacat.service.SkinPropertyService;
 import edu.ucsb.nceas.metacat.service.XMLSchemaService;
+import edu.ucsb.nceas.metacat.shared.BaseException;
 import edu.ucsb.nceas.metacat.shared.HandlerException;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
@@ -97,8 +98,10 @@
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
+import edu.ucsb.nceas.metacat.util.ResponseUtil;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.metacat.util.SessionData;
+import edu.ucsb.nceas.metacat.workflow.WorkflowSchedulerClient;
 import edu.ucsb.nceas.utilities.FileUtil;
 import edu.ucsb.nceas.utilities.GeneralPropertyException;
 import edu.ucsb.nceas.utilities.LSIDUtil;
@@ -294,6 +297,7 @@
     private static final String FALSE = "false";
     private static final String TRUE  = "true";
     private static String LOG_CONFIG_NAME = null;
+    public static final String APPLICATION_NAME = "metacat";
     
     /**
      * Initialize the servlet by creating appropriate database connections
@@ -308,6 +312,7 @@
             super.init(config);
             
             ServletContext context = config.getServletContext();
+            context.setAttribute("APPLICATION_NAME", APPLICATION_NAME);
             
             ServiceService serviceService = ServiceService.getInstance(context);
             logMetacat.debug("ServiceService singleton created " + serviceService);
@@ -319,7 +324,7 @@
             PropertyConfigurator.configureAndWatch(LOG_CONFIG_NAME);
             
             // Register preliminary services
-            ServiceService.registerService("PropertyService", PropertyService.getInstance());         
+            ServiceService.registerService("PropertyService", PropertyService.getInstance(context));         
             ServiceService.registerService("SkinPropertyService", SkinPropertyService.getInstance());
             ServiceService.registerService("SessionService", SessionService.getInstance()); 
             
@@ -701,381 +706,385 @@
 			String ctype = request.getContentType();
 			if (ctype != null && ctype.startsWith("multipart/form-data")) {
 				handleMultipartForm(request, response);
-			} else {
+				return;
+			} 
 
-				String name = null;
-				String[] value = null;
-				String[] docid = new String[3];
-				Hashtable<String, String[]> params = new Hashtable<String, String[]>();
+			String name = null;
+			String[] value = null;
+			String[] docid = new String[3];
+			Hashtable<String, String[]> params = new Hashtable<String, String[]>();
 
-				// Check if this is a simple read request that doesn't use the
-				// "action" syntax
-				// These URLs are of the form:
-				// http://localhost:8180/knb/metacat/docid/skinname
-				// e.g., http://localhost:8180/knb/metacat/test.1.1/knb
-				String pathInfo = request.getPathInfo();
-				if (pathInfo != null) {
-					String[] path = pathInfo.split("/");
-					if (path.length > 1) {
-						String docidToRead = path[1];
-						String docs[] = new String[1];
-						docs[0] = docidToRead;
-						logMetacat.debug("READING DOCID FROM PATHINFO: " + docs[0]);
-						params.put("docid", docs);
-						String skin = null;
-						if (path.length > 2) {
-							skin = path[2];
-							String skins[] = new String[1];
-							skins[0] = skin;
-							params.put("qformat", skins);
-						}
-						handleReadAction(params, request, response, "public", null, null);
-						return;
+			// Check if this is a simple read request that doesn't use the
+			// "action" syntax
+			// These URLs are of the form:
+			// http://localhost:8180/knb/metacat/docid/skinname
+			// e.g., http://localhost:8180/knb/metacat/test.1.1/knb
+			String pathInfo = request.getPathInfo();
+			if (pathInfo != null) {
+				String[] path = pathInfo.split("/");
+				if (path.length > 1) {
+					String docidToRead = path[1];
+					String docs[] = new String[1];
+					docs[0] = docidToRead;
+					logMetacat.debug("READING DOCID FROM PATHINFO: " + docs[0]);
+					params.put("docid", docs);
+					String skin = null;
+					if (path.length > 2) {
+						skin = path[2];
+						String skins[] = new String[1];
+						skins[0] = skin;
+						params.put("qformat", skins);
 					}
+					handleReadAction(params, request, response, "public", null, null);
+					return;
 				}
+			}
 
-				Enumeration<String> paramlist =(Enumeration<String>)request.getParameterNames();
-				while (paramlist.hasMoreElements()) {
+			Enumeration<String> paramlist = 
+				(Enumeration<String>) request.getParameterNames();
+			while (paramlist.hasMoreElements()) {
 
-					name = paramlist.nextElement();
-					value = request.getParameterValues(name);
+				name = paramlist.nextElement();
+				value = request.getParameterValues(name);
 
-					// Decode the docid and mouse click information
-					// THIS IS OBSOLETE -- I THINK -- REMOVE THIS BLOCK
-					// 4/12/2007d
-					// MBJ
-					if (name.endsWith(".y")) {
-						docid[0] = name.substring(0, name.length() - 2);
-						params.put("docid", docid);
-						name = "ypos";
-					}
-					if (name.endsWith(".x")) {
-						name = "xpos";
-					}
-
-					params.put(name, value);
+				// Decode the docid and mouse click information
+				// THIS IS OBSOLETE -- I THINK -- REMOVE THIS BLOCK
+				// 4/12/2007d
+				// MBJ
+				if (name.endsWith(".y")) {
+					docid[0] = name.substring(0, name.length() - 2);
+					params.put("docid", docid);
+					name = "ypos";
 				}
-
-				// handle param is emptpy
-				if (params.isEmpty() || params == null) {
-					return;
+				if (name.endsWith(".x")) {
+					name = "xpos";
 				}
 
-				// if the user clicked on the input images, decode which image
-				// was clicked then set the action.
-				if (params.get("action") == null) {
-					PrintWriter out = response.getWriter();
-					response.setContentType("text/xml");
-					out.println("<?xml version=\"1.0\"?>");
-					out.println("<error>");
-					out.println("Action not specified");
-					out.println("</error>");
-					out.close();
-					return;
-				}
+				params.put(name, value);
+			}
 
-				String action = (params.get("action"))[0];
-				logMetacat.info("Action is: " + action);
+			// handle param is emptpy
+			if (params.isEmpty() || params == null) {
+				return;
+			}
 
-				// This block handles session management for the servlet
-				// by looking up the current session information for all actions
-				// other than "login" and "logout"
-				String userName = null;
-				String password = null;
-				String[] groupNames = null;
-				String sessionId = null;
-				name = null;
+			// if the user clicked on the input images, decode which image
+			// was clicked then set the action.
+			if (params.get("action") == null) {
+				PrintWriter out = response.getWriter();
+				response.setContentType("text/xml");
+				out.println("<?xml version=\"1.0\"?>");
+				out.println("<error>");
+				out.println("Action not specified");
+				out.println("</error>");
+				out.close();
+				return;
+			}
 
-				// handle login action
-				if (action.equals("login")) {
-					PrintWriter out = response.getWriter();
-					handleLoginAction(out, params, request, response);
-					out.close();
+			String action = (params.get("action"))[0];
+			logMetacat.info("Action is: " + action);
 
-					// handle logout action
-				} else if (action.equals("logout")) {
-					PrintWriter out = response.getWriter();
-					handleLogoutAction(out, params, request, response);
-					out.close();
+			// This block handles session management for the servlet
+			// by looking up the current session information for all actions
+			// other than "login" and "logout"
+			String userName = null;
+			String password = null;
+			String[] groupNames = null;
+			String sessionId = null;
+			name = null;
 
-					// handle shrink DBConnection request
-				} else if (action.equals("shrink")) {
-					PrintWriter out = response.getWriter();
-					boolean success = false;
-					// If all DBConnection in the pool are free and DBConnection pool
-					// size is greater than initial value, shrink the connection pool
-					// size to initial value
-					success = DBConnectionPool.shrinkConnectionPoolSize();
-					if (success) {
-						// if successfully shrink the pool size to initial value
-						out.println("DBConnection Pool shrunk successfully.");
-					}// if
-					else {
-						out.println("DBConnection pool not shrunk successfully.");
-					}
-					// close out put
-					out.close();
+			// handle login action
+			if (action.equals("login")) {
+				PrintWriter out = response.getWriter();
+				handleLoginAction(out, params, request, response);
+				out.close();
 
-					// aware of session expiration on every request
-				} else {
-					SessionData sessionData = RequestUtil.getSessionData(request);
-					
-					userName = sessionData.getUserName();
-					password = sessionData.getPassword();
-					groupNames = sessionData.getGroupNames();
-					sessionId = sessionData.getId();
+				// handle logout action
+			} else if (action.equals("logout")) {
+				PrintWriter out = response.getWriter();
+				handleLogoutAction(out, params, request, response);
+				out.close();
 
-					logMetacat.info("The user is : " + userName);
+				// handle shrink DBConnection request
+			} else if (action.equals("shrink")) {
+				PrintWriter out = response.getWriter();
+				boolean success = false;
+				// If all DBConnection in the pool are free and DBConnection
+				// pool
+				// size is greater than initial value, shrink the connection
+				// pool
+				// size to initial value
+				success = DBConnectionPool.shrinkConnectionPoolSize();
+				if (success) {
+					// if successfully shrink the pool size to initial value
+					out.println("DBConnection Pool shrunk successfully.");
+				}// if
+				else {
+					out.println("DBConnection pool not shrunk successfully.");
 				}
-				// Now that we know the session is valid, we can delegate the
-				// request to a particular action handler
-				if (action.equals("query")) {
-					ServletOutputStream streamOut = response.getOutputStream();
-					PrintWriter out = new PrintWriter(streamOut);
-					handleQuery(out, params, response, userName, groupNames, sessionId);
-					out.close();
-				} else if (action.equals("squery")) {
-					ServletOutputStream streamOut = response.getOutputStream();
-					PrintWriter out = new PrintWriter(streamOut);
-					if (params.containsKey("query")) {
-						handleSQuery(out, params, response, userName, groupNames, sessionId);
-						out.close();
-					} else {
-						out.println("Illegal action squery without \"query\" parameter");
-						out.close();
-					}
-				} else if (action.trim().equals("spatial_query")) {
+				// close out put
+				out.close();
 
-					logMetacat
-							.debug("******************* SPATIAL QUERY ********************");
-					ServletOutputStream streamOut = response.getOutputStream();
-					PrintWriter out = new PrintWriter(streamOut);
-					handleSpatialQuery(out, params, response, userName, groupNames,
-							sessionId);
-					out.close();
+				// aware of session expiration on every request
+			} else {
+				SessionData sessionData = RequestUtil.getSessionData(request);
 
-				} 
-				else if (action.trim().equals("dataquery")) {
+				userName = sessionData.getUserName();
+				password = sessionData.getPassword();
+				groupNames = sessionData.getGroupNames();
+				sessionId = sessionData.getId();
 
-					logMetacat
-							.debug("******************* DATA QUERY ********************");
-					handleDataquery(params, response, sessionId);
+				logMetacat.info("The user is : " + userName);
+			}
+			// Now that we know the session is valid, we can delegate the
+			// request to a particular action handler
+			if (action.equals("query")) {
+				ServletOutputStream streamOut = response.getOutputStream();
+				PrintWriter out = new PrintWriter(streamOut);
+				handleQuery(out, params, response, userName, groupNames, sessionId);
+				out.close();
+			} else if (action.equals("squery")) {
+				ServletOutputStream streamOut = response.getOutputStream();
+				PrintWriter out = new PrintWriter(streamOut);
+				if (params.containsKey("query")) {
+					handleSQuery(out, params, response, userName, groupNames, sessionId);
+					out.close();
+				} else {
+					out.println("Illegal action squery without \"query\" parameter");
+					out.close();
 				}
-				else if (action.trim().equals("editcart")) {
-					logMetacat
-							.debug("******************* EDIT CART ********************");
-					handleEditCart(params, response, sessionId);
-				}
-				else if (action.equals("export")) {
+			} else if (action.trim().equals("spatial_query")) {
 
-					handleExportAction(params, response, userName, groupNames, password);
-				} else if (action.equals("read")) {
-					if (params.get("archiveEntryName") != null) {
-						ArchiveHandler.getInstance().readArchiveEntry(params, request, response, 
-								userName, password,groupNames);
-					} else {
-						handleReadAction(params, request, response, userName, password,
-								groupNames);
-					}
-				} else if (action.equals("readinlinedata")) {
-					handleReadInlineDataAction(params, request, response, userName,
-							password, groupNames);
-				} else if (action.equals("insert") || action.equals("update")) {
-					PrintWriter out = response.getWriter();
-					if ((userName != null) && !userName.equals("public")) {
-						handleInsertOrUpdateAction(request, response, out, params,
-								userName, groupNames);
-					} else {
-						response.setContentType("text/xml");
-						out.println("<?xml version=\"1.0\"?>");
-						out.println("<error>");
-						out.println("Permission denied for user " + userName + " "
-								+ action);
-						out.println("</error>");
-					}
-					out.close();
-				} else if (action.equals("delete")) {
-					PrintWriter out = response.getWriter();
-					if ((userName != null) && !userName.equals("public")) {
-						handleDeleteAction(out, params, request, response, userName,
-								groupNames);
-					} else {
-						response.setContentType("text/xml");
-						out.println("<?xml version=\"1.0\"?>");
-						out.println("<error>");
-						out.println("Permission denied for " + action);
-						out.println("</error>");
-					}
-					out.close();
-				} else if (action.equals("validate")) {
-					PrintWriter out = response.getWriter();
-					handleValidateAction(out, params);
-					out.close();
-				} else if (action.equals("setaccess")) {
-					PrintWriter out = response.getWriter();
-					handleSetAccessAction(out, params, userName);
-					out.close();
-				} else if (action.equals("getaccesscontrol")) {
-					PrintWriter out = response.getWriter();
-					handleGetAccessControlAction(out, params, response, userName,
+				logMetacat
+						.debug("******************* SPATIAL QUERY ********************");
+				ServletOutputStream streamOut = response.getOutputStream();
+				PrintWriter out = new PrintWriter(streamOut);
+				handleSpatialQuery(out, params, response, userName, groupNames, sessionId);
+				out.close();
+
+			} else if (action.trim().equals("dataquery")) {
+
+				logMetacat.debug("******************* DATA QUERY ********************");
+				handleDataquery(params, response, sessionId);
+			} else if (action.trim().equals("editcart")) {
+				logMetacat.debug("******************* EDIT CART ********************");
+				handleEditCart(params, response, sessionId);
+			} else if (action.equals("export")) {
+
+				handleExportAction(params, response, userName, groupNames, password);
+			} else if (action.equals("read")) {
+				if (params.get("archiveEntryName") != null) {
+					ArchiveHandler.getInstance().readArchiveEntry(params, request,
+							response, userName, password, groupNames);
+				} else {
+					handleReadAction(params, request, response, userName, password,
 							groupNames);
-					out.close();
-				} else if (action.equals("getprincipals")) {
-					PrintWriter out = response.getWriter();
-					handleGetPrincipalsAction(out, userName, password);
-					out.close();
-				} else if (action.equals("getdoctypes")) {
-					PrintWriter out = response.getWriter();
-					handleGetDoctypesAction(out, params, response);
-					out.close();
-				} else if (action.equals("getdtdschema")) {
-					PrintWriter out = response.getWriter();
-					handleGetDTDSchemaAction(out, params, response);
-					out.close();
-				} else if (action.equals("getlastdocid")) {
-					PrintWriter out = response.getWriter();
-					handleGetMaxDocidAction(out, params, response);
-					out.close();
-				} else if (action.equals("getalldocids")) {
-					PrintWriter out = response.getWriter();
-					handleGetAllDocidsAction(out, params, response);
-					out.close();
-				} else if (action.equals("isregistered")) {
-					PrintWriter out = response.getWriter();
-					handleIdIsRegisteredAction(out, params, response);
-					out.close();
-				} else if (action.equals("getrevisionanddoctype")) {
-					PrintWriter out = response.getWriter();
-					handleGetRevisionAndDocTypeAction(out, params);
-					out.close();
-				} else if (action.equals("getversion")) {
+				}
+			} else if (action.equals("readinlinedata")) {
+				handleReadInlineDataAction(params, request, response, userName, password,
+						groupNames);
+			} else if (action.equals("insert") || action.equals("update")) {
+				PrintWriter out = response.getWriter();
+				if ((userName != null) && !userName.equals("public")) {
+					handleInsertOrUpdateAction(request, response, out, params, userName,
+							groupNames);
+				} else {
 					response.setContentType("text/xml");
-					PrintWriter out = response.getWriter();
-					out.println(MetacatVersion.getVersionAsXml());
-					out.close();
-				} else if (action.equals("getlog")) {
-					handleGetLogAction(params, request, response, userName, groupNames);
-				} else if (action.equals("getloggedinuserinfo")) {
-					PrintWriter out = response.getWriter();
-					response.setContentType("text/xml");
 					out.println("<?xml version=\"1.0\"?>");
-					out.println("\n<user>\n");
-					out.println("\n<username>\n");
-					out.println(userName);
-					out.println("\n</username>\n");
-					if (name != null) {
-						out.println("\n<name>\n");
-						out.println(name);
-						out.println("\n</name>\n");
-					}
-					if (AuthUtil.isAdministrator(userName, groupNames)) {
-						out.println("<isAdministrator></isAdministrator>\n");
-					}
-					if (AuthUtil.isModerator(userName, groupNames)) {
-						out.println("<isModerator></isModerator>\n");
-					}
-					out.println("\n</user>\n");
-					out.close();
-				} else if (action.equals("buildindex")) {
-					handleBuildIndexAction(params, request, response, userName,
+					out.println("<error>");
+					out.println("Permission denied for user " + userName + " " + action);
+					out.println("</error>");
+				}
+				out.close();
+			} else if (action.equals("delete")) {
+				PrintWriter out = response.getWriter();
+				if ((userName != null) && !userName.equals("public")) {
+					handleDeleteAction(out, params, request, response, userName,
 							groupNames);
-				} else if (action.equals("login") || action.equals("logout")) {
-					/*
-					 * } else if (action.equals("protocoltest")) { String
-					 * testURL = "metacat://dev.nceas.ucsb.edu/NCEAS.897766.9";
-					 * try { testURL = ((String[]) params.get("url"))[0]; }
-					 * catch (Throwable t) { } String phandler = System
-					 * .getProperty("java.protocol.handler.pkgs");
-					 * response.setContentType("text/html"); PrintWriter out =
-					 * response.getWriter(); out.println("<body
-					 * bgcolor=\"white\">"); out.println("<p>Handler property:
-					 * <code>" + phandler + "</code></p>"); out.println("<p>Starting
-					 * test for:<br>"); out.println(" " + testURL + "</p>");
-					 * try { URL u = new URL(testURL); out.println("<pre>");
-					 * out.println("Protocol: " + u.getProtocol());
-					 * out.println(" Host: " + u.getHost()); out.println(" Port: " +
-					 * u.getPort()); out.println(" Path: " + u.getPath());
-					 * out.println(" Ref: " + u.getRef()); String pquery =
-					 * u.getQuery(); out.println(" Query: " + pquery);
-					 * out.println(" Params: "); if (pquery != null) { Hashtable
-					 * qparams = MetacatUtil.parseQuery(u.getQuery()); for
-					 * (Enumeration en = qparams.keys(); en .hasMoreElements();) {
-					 * String pname = (String) en.nextElement(); String pvalue =
-					 * (String) qparams.get(pname); out.println(" " + pname + ": " +
-					 * pvalue); } } out.println("</pre>"); out.println("</body>");
-					 * out.close(); } catch (MalformedURLException mue) {
-					 * System.out.println( "bad url from
-					 * MetacatServlet.handleGetOrPost");
-					 * out.println(mue.getMessage()); mue.printStackTrace(out);
-					 * out.close(); }
-					 */
-				} else if (action.equals("refreshServices")) {
-					// TODO MCD this interface is for testing.  It should go through a 
-					// ServiceService class and only work for an admin user.  Move to the
-					// MetacatAdminServlet
-					ServiceService.refreshService("XMLSchemaService");
-					return;
-//				} else if (action.equals("scheduleWorkflow")) {
-//					try {
-//						WorkflowScheduler.getInstance().scheduleJob(request, response, params, 
-//							userName, groupNames);
-//						return;
-//					} catch (BaseException be) {
-//						ResponseUtil.sendErrorXML(response, ResponseUtil.SCHEDULE_WORKFLOW_ERROR, be);
-//						return;						
-//					}
-//				} else if (action.equals("unscheduleWorkflow")) {
-//					try {
-//						WorkflowScheduler.getInstance().unScheduleJob(request, response, params, 
-//							userName, groupNames);
-//						return;
-//					} catch (BaseException be) {
-//						ResponseUtil.sendErrorXML(response, ResponseUtil.UNSCHEDULE_WORKFLOW_ERROR, be);
-//						return;						
-//					}
-//				} else if (action.equals("rescheduleWorkflow")) {
-//					try {
-//						WorkflowScheduler.getInstance().reScheduleJob(request, response, params, 
-//							userName, groupNames);
-//						return;
-//					} catch (BaseException be) {
-//						ResponseUtil.sendErrorXML(response, ResponseUtil.RESCHEDULE_WORKFLOW_ERROR, be);
-//						return;						
-//					}
-//				} else if (action.equals("getScheduledWorkflow")) {
-//					try {
-//						WorkflowScheduler.getInstance().getJobs(request, response, params, 
-//								userName, groupNames);				
-//						return;
-//					} catch (BaseException be) {
-//						ResponseUtil.sendErrorXML(response, ResponseUtil.GET_SCHEDULED_WORKFLOW_ERROR, be);
-//						return;						
-//					}
-//				} else if (action.equals("deleteScheduledWorkflow")) {
-//					try {
-//						WorkflowScheduler.getInstance().deleteJob(request, response, params, 
-//								userName, groupNames);				
-//						return;
-//					} catch (BaseException be) {
-//						ResponseUtil.sendErrorXML(response, ResponseUtil.DELETE_SCHEDULED_WORKFLOW_ERROR, be);
-//						return;						
-//					}
 				} else {
-					PrintWriter out = response.getWriter();
+					response.setContentType("text/xml");
 					out.println("<?xml version=\"1.0\"?>");
 					out.println("<error>");
-					out.println("Error: action not registered.  Please report this error.");
+					out.println("Permission denied for " + action);
 					out.println("</error>");
-					out.close();
 				}
+				out.close();
+			} else if (action.equals("validate")) {
+				PrintWriter out = response.getWriter();
+				handleValidateAction(out, params);
+				out.close();
+			} else if (action.equals("setaccess")) {
+				PrintWriter out = response.getWriter();
+				handleSetAccessAction(out, params, userName);
+				out.close();
+			} else if (action.equals("getaccesscontrol")) {
+				PrintWriter out = response.getWriter();
+				handleGetAccessControlAction(out, params, response, userName, groupNames);
+				out.close();
+			} else if (action.equals("getprincipals")) {
+				PrintWriter out = response.getWriter();
+				handleGetPrincipalsAction(out, userName, password);
+				out.close();
+			} else if (action.equals("getdoctypes")) {
+				PrintWriter out = response.getWriter();
+				handleGetDoctypesAction(out, params, response);
+				out.close();
+			} else if (action.equals("getdtdschema")) {
+				PrintWriter out = response.getWriter();
+				handleGetDTDSchemaAction(out, params, response);
+				out.close();
+			} else if (action.equals("getlastdocid")) {
+				PrintWriter out = response.getWriter();
+				handleGetMaxDocidAction(out, params, response);
+				out.close();
+			} else if (action.equals("getalldocids")) {
+				PrintWriter out = response.getWriter();
+				handleGetAllDocidsAction(out, params, response);
+				out.close();
+			} else if (action.equals("isregistered")) {
+				PrintWriter out = response.getWriter();
+				handleIdIsRegisteredAction(out, params, response);
+				out.close();
+			} else if (action.equals("getrevisionanddoctype")) {
+				PrintWriter out = response.getWriter();
+				handleGetRevisionAndDocTypeAction(out, params);
+				out.close();
+			} else if (action.equals("getversion")) {
+				response.setContentType("text/xml");
+				PrintWriter out = response.getWriter();
+				out.println(MetacatVersion.getVersionAsXml());
+				out.close();
+			} else if (action.equals("getlog")) {
+				handleGetLogAction(params, request, response, userName, groupNames);
+			} else if (action.equals("getloggedinuserinfo")) {
+				PrintWriter out = response.getWriter();
+				response.setContentType("text/xml");
+				out.println("<?xml version=\"1.0\"?>");
+				out.println("\n<user>\n");
+				out.println("\n<username>\n");
+				out.println(userName);
+				out.println("\n</username>\n");
+				if (name != null) {
+					out.println("\n<name>\n");
+					out.println(name);
+					out.println("\n</name>\n");
+				}
+				if (AuthUtil.isAdministrator(userName, groupNames)) {
+					out.println("<isAdministrator></isAdministrator>\n");
+				}
+				if (AuthUtil.isModerator(userName, groupNames)) {
+					out.println("<isModerator></isModerator>\n");
+				}
+				out.println("\n</user>\n");
+				out.close();
+			} else if (action.equals("buildindex")) {
+				handleBuildIndexAction(params, request, response, userName, groupNames);
+			} else if (action.equals("login") || action.equals("logout")) {
+				/*
+				 * } else if (action.equals("protocoltest")) { String testURL =
+				 * "metacat://dev.nceas.ucsb.edu/NCEAS.897766.9"; try { testURL =
+				 * ((String[]) params.get("url"))[0]; } catch (Throwable t) { }
+				 * String phandler = System
+				 * .getProperty("java.protocol.handler.pkgs");
+				 * response.setContentType("text/html"); PrintWriter out =
+				 * response.getWriter(); out.println("<body
+				 * bgcolor=\"white\">"); out.println("<p>Handler property:
+				 * <code>" + phandler + "</code></p>"); out.println("<p>Starting
+				 * test for:<br>"); out.println(" " + testURL + "</p>"); try {
+				 * URL u = new URL(testURL); out.println("<pre>");
+				 * out.println("Protocol: " + u.getProtocol()); out.println("
+				 * Host: " + u.getHost()); out.println(" Port: " + u.getPort());
+				 * out.println(" Path: " + u.getPath()); out.println(" Ref: " +
+				 * u.getRef()); String pquery = u.getQuery(); out.println("
+				 * Query: " + pquery); out.println(" Params: "); if (pquery !=
+				 * null) { Hashtable qparams =
+				 * MetacatUtil.parseQuery(u.getQuery()); for (Enumeration en =
+				 * qparams.keys(); en .hasMoreElements();) { String pname =
+				 * (String) en.nextElement(); String pvalue = (String)
+				 * qparams.get(pname); out.println(" " + pname + ": " + pvalue); } }
+				 * out.println("</pre>"); out.println("</body>");
+				 * out.close(); } catch (MalformedURLException mue) {
+				 * System.out.println( "bad url from
+				 * MetacatServlet.handleGetOrPost");
+				 * out.println(mue.getMessage()); mue.printStackTrace(out);
+				 * out.close(); }
+				 */
+			} else if (action.equals("refreshServices")) {
+				// TODO MCD this interface is for testing. It should go through
+				// a
+				// ServiceService class and only work for an admin user. Move to
+				// the
+				// MetacatAdminServlet
+				ServiceService.refreshService("XMLSchemaService");
+				return;
+			} else if (action.equals("scheduleWorkflow")) {
+				try {
+					WorkflowSchedulerClient.getInstance().scheduleJob(request, response,
+							params, userName, groupNames);
+					return;
+				} catch (BaseException be) {
+					ResponseUtil.sendErrorXML(response,
+							ResponseUtil.SCHEDULE_WORKFLOW_ERROR, be);
+					return;
+				}
+			} else if (action.equals("unscheduleWorkflow")) {
+				try {
+					WorkflowSchedulerClient.getInstance().unScheduleJob(request,
+							response, params, userName, groupNames);
+					return;
+				} catch (BaseException be) {
+					ResponseUtil.sendErrorXML(response,
+							ResponseUtil.UNSCHEDULE_WORKFLOW_ERROR, be);
+					return;
+				}
+			} else if (action.equals("rescheduleWorkflow")) {
+				try {
+					WorkflowSchedulerClient.getInstance().reScheduleJob(request,
+							response, params, userName, groupNames);
+					return;
+				} catch (BaseException be) {
+					ResponseUtil.sendErrorXML(response,
+							ResponseUtil.RESCHEDULE_WORKFLOW_ERROR, be);
+					return;
+				}
+			} else if (action.equals("getScheduledWorkflow")) {
+				try {
+					WorkflowSchedulerClient.getInstance().getJobs(request, response,
+							params, userName, groupNames);
+					return;
+				} catch (BaseException be) {
+					ResponseUtil.sendErrorXML(response,
+							ResponseUtil.GET_SCHEDULED_WORKFLOW_ERROR, be);
+					return;
+				}
+			} else if (action.equals("deleteScheduledWorkflow")) {
+				try {
+					WorkflowSchedulerClient.getInstance().deleteJob(request, response,
+							params, userName, groupNames);
+					return;
+				} catch (BaseException be) {
+					ResponseUtil.sendErrorXML(response,
+							ResponseUtil.DELETE_SCHEDULED_WORKFLOW_ERROR, be);
+					return;
+				}
 
-				// util.closeConnections();
-				// Close the stream to the client
-				// out.close();
+			} else {
+				PrintWriter out = response.getWriter();
+				out.println("<?xml version=\"1.0\"?>");
+				out.println("<error>");
+				out.println("Error: action not registered.  Please report this error.");
+				out.println("</error>");
+				out.close();
+			}
 
-				// Schedule the sitemap generator to run periodically
-				scheduleSitemapGeneration(request);
-			}
+			// util.closeConnections();
+			// Close the stream to the client
+			// out.close();
+
+			// Schedule the sitemap generator to run periodically
+			scheduleSitemapGeneration(request);
+
+
 		} catch (PropertyNotFoundException pnfe) {
 			String errorString = "Critical property not found: " + pnfe.getMessage();
 			logMetacat.error(errorString);
Index: src/edu/ucsb/nceas/metacat/ContentTypeProvider.java
===================================================================
--- src/edu/ucsb/nceas/metacat/ContentTypeProvider.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/ContentTypeProvider.java	(revision 5030)
@@ -58,7 +58,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/IndexingTimerTask.java
===================================================================
--- src/edu/ucsb/nceas/metacat/IndexingTimerTask.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/IndexingTimerTask.java	(revision 5030)
@@ -36,7 +36,7 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 
 import org.apache.log4j.Logger;
Index: src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java
===================================================================
--- src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/clientview/ClientViewHelper.java	(revision 5030)
@@ -18,7 +18,7 @@
 import edu.ucsb.nceas.metacat.client.MetacatException;
 import edu.ucsb.nceas.metacat.client.MetacatFactory;
 import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.XMLUtilities;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import java.io.BufferedReader;
Index: src/edu/ucsb/nceas/metacat/PermissionController.java
===================================================================
--- src/edu/ucsb/nceas/metacat/PermissionController.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/PermissionController.java	(revision 5030)
@@ -38,7 +38,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/AuthStub.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthStub.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AuthStub.java	(revision 5030)
@@ -32,7 +32,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 import java.lang.InstantiationException;
Index: src/edu/ucsb/nceas/metacat/DocumentImpl.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DocumentImpl.java	(revision 5030)
@@ -56,9 +56,9 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.replication.ForceReplicationHandler;
 import edu.ucsb.nceas.metacat.replication.ReplicationService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
 import edu.ucsb.nceas.metacat.service.XMLSchema;
 import edu.ucsb.nceas.metacat.service.XMLSchemaService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
Index: src/edu/ucsb/nceas/metacat/RelationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/RelationHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/RelationHandler.java	(revision 5030)
@@ -22,7 +22,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.morpho.datapackage.Triple;
Index: src/edu/ucsb/nceas/metacat/dataquery/ConfigurableAuthenticatedEcogridEndPoint.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataquery/ConfigurableAuthenticatedEcogridEndPoint.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/dataquery/ConfigurableAuthenticatedEcogridEndPoint.java	(revision 5030)
@@ -33,7 +33,7 @@
 
 import org.ecoinformatics.datamanager.download.AuthenticatedEcogridEndPointInterface;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/dataquery/PostgresDatabaseConnectionPool.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataquery/PostgresDatabaseConnectionPool.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/dataquery/PostgresDatabaseConnectionPool.java	(revision 5030)
@@ -40,7 +40,7 @@
 import org.ecoinformatics.datamanager.database.DatabaseConnectionPoolInterface;
 import org.postgresql.jdbc3.Jdbc3PoolingDataSource;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/dataquery/DatabaseConnectionPoolFactory.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataquery/DatabaseConnectionPoolFactory.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/dataquery/DatabaseConnectionPoolFactory.java	(revision 5030)
@@ -31,7 +31,7 @@
  */
 package edu.ucsb.nceas.metacat.dataquery;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 import java.sql.Connection;
 import java.sql.SQLException;
Index: src/edu/ucsb/nceas/metacat/dataquery/ConfigurableEcogridEndPoint.java
===================================================================
--- src/edu/ucsb/nceas/metacat/dataquery/ConfigurableEcogridEndPoint.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/dataquery/ConfigurableEcogridEndPoint.java	(revision 5030)
@@ -33,7 +33,7 @@
 
 import org.ecoinformatics.datamanager.download.EcogridEndPointInterface;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/AccessionNumber.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AccessionNumber.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AccessionNumber.java	(revision 5030)
@@ -33,7 +33,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerClient.java
===================================================================
--- src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerClient.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerClient.java	(revision 5030)
@@ -38,8 +38,8 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.DBTransform;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.scheduler.MetacatSchedulerException;
-import edu.ucsb.nceas.metacat.service.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.util.ErrorSendingErrorException;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;

Property changes on: src/edu/ucsb/nceas/metacat/workflow/WorkflowSchedulerClient.java
___________________________________________________________________
Added: svn:mergeinfo
## -0,0 +0,0 ##
Index: src/edu/ucsb/nceas/metacat/util/GeoserverUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/GeoserverUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/GeoserverUtil.java	(revision 5030)
@@ -32,7 +32,7 @@
 import java.io.IOException;
 import java.util.HashMap;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.utilities.FileUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/util/OrganizationUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/OrganizationUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/OrganizationUtil.java	(revision 5030)
@@ -28,7 +28,7 @@
 
 import java.util.Vector;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.StringUtil;
Index: src/edu/ucsb/nceas/metacat/util/ConfigurationUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/ConfigurationUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/ConfigurationUtil.java	(revision 5030)
@@ -29,9 +29,9 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.dbadapter.AbstractDatabase;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
+import edu.ucsb.nceas.metacat.properties.SkinPropertyService;
 import edu.ucsb.nceas.metacat.service.ServiceService;
-import edu.ucsb.nceas.metacat.service.SkinPropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.utilities.GeneralPropertyException;
@@ -66,9 +66,9 @@
 		} catch (MetacatUtilException ue) {
 			logMetacat.error("Could not determine if metacat is configured due to utility exception: "
 					+ ue.getMessage());
-		} catch (PropertyNotFoundException pnfe) {
+		} catch (GeneralPropertyException gpe) {
 			logMetacat.error("Could not determine if metacat is configured due to property exception: "
-					+ pnfe.getMessage());
+					+ gpe.getMessage());
 		}
 
 		return metacatConfigured;
Index: src/edu/ucsb/nceas/metacat/util/MetacatUtil.java
===================================================================
--- src/edu/ucsb/nceas/metacat/util/MetacatUtil.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/util/MetacatUtil.java	(revision 5030)
@@ -40,7 +40,7 @@
 import com.oreilly.servlet.multipart.FilePart;
 
 import edu.ucsb.nceas.dbadapter.AbstractDatabase;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.FileUtil;
 
Index: src/edu/ucsb/nceas/metacat/AuthSession.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AuthSession.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AuthSession.java	(revision 5030)
@@ -35,7 +35,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.util.AuthUtil;
 
Index: src/edu/ucsb/nceas/metacat/harvesterClient/Harvester.java
===================================================================
--- src/edu/ucsb/nceas/metacat/harvesterClient/Harvester.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/harvesterClient/Harvester.java	(revision 5030)
@@ -43,7 +43,7 @@
 import edu.ucsb.nceas.metacat.client.Metacat;
 import edu.ucsb.nceas.metacat.client.MetacatFactory;
 import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
@@ -92,7 +92,7 @@
 
     try {
       if (commandLineMode) {
-        PropertyService.getTestInstance(configDir);
+        PropertyService.getInstance(configDir);
       }
       else {
         PropertyService.getInstance();
Index: src/edu/ucsb/nceas/metacat/EML201DocumentCorrector.java
===================================================================
--- src/edu/ucsb/nceas/metacat/EML201DocumentCorrector.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/EML201DocumentCorrector.java	(revision 5030)
@@ -6,7 +6,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 
 /**
  * Before Metacat 1.8.1 release, Metacat uses the eml201 schema with the tag
@@ -121,11 +121,11 @@
       * @param argus
       * @throws Exception
       */
-     public static void main(String[] argus) throws Exception
+     public static void main(String[] args) throws Exception
      {
     	 
     	 //initialize options and connection pool
-    	 PropertyService.getInstance();
+    	 PropertyService.getInstance(args[0]);
     	 DBConnectionPool connPool = DBConnectionPool.getInstance();
     	   	 
     	 // run the thread
Index: src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistration.java
===================================================================
--- src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistration.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/harvesterClient/HarvesterRegistration.java	(revision 5030)
@@ -44,7 +44,7 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
Index: src/edu/ucsb/nceas/metacat/database/DBConnection.java
===================================================================
--- src/edu/ucsb/nceas/metacat/database/DBConnection.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/database/DBConnection.java	(revision 5030)
@@ -32,7 +32,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/oaipmh/harvester/OaipmhHarvester.java
===================================================================
--- src/edu/ucsb/nceas/metacat/oaipmh/harvester/OaipmhHarvester.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/oaipmh/harvester/OaipmhHarvester.java	(revision 5030)
@@ -68,7 +68,7 @@
 import edu.ucsb.nceas.metacat.client.MetacatException;
 import edu.ucsb.nceas.metacat.client.MetacatFactory;
 import edu.ucsb.nceas.metacat.client.MetacatInaccessibleException;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
@@ -420,7 +420,7 @@
   private static void loadProperties(String metacatConfigDir) {   
 
     try {
-        PropertyService.getTestInstance(metacatConfigDir);
+        PropertyService.getInstance(metacatConfigDir);
     } 
     catch (ServiceException e) {
       logger.error("Error in loading properties: " + e.getMessage());
Index: src/edu/ucsb/nceas/metacat/Sitemap.java
===================================================================
--- src/edu/ucsb/nceas/metacat/Sitemap.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/Sitemap.java	(revision 5030)
@@ -37,7 +37,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/admin/AuthAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/AuthAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/AuthAdmin.java	(revision 5030)
@@ -39,12 +39,11 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.AuthSession;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
 import edu.ucsb.nceas.utilities.GeneralPropertyException;
 import edu.ucsb.nceas.utilities.MetaDataProperty;
 import edu.ucsb.nceas.utilities.PropertiesMetaData;
-import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 import edu.ucsb.nceas.utilities.SortedProperties;
 import edu.ucsb.nceas.utilities.StringUtil;
 
@@ -133,14 +132,14 @@
 				// Forward the request to the JSP page
 				RequestUtil.forwardRequest(request, response,
 						"/admin/auth-configuration.jsp", null);
-			} catch (PropertyNotFoundException pnfe) {
-				throw new AdminException("Problem getting property while initializing "
-						+ "LDAP properties page: " + pnfe.getMessage());
+			} catch (GeneralPropertyException gpe) {
+				throw new AdminException("AuthAdmin.configureAuth - Problem getting property " + 
+						"while initializing LDAP properties page: " + gpe.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("AuthAdmin.configureAuth - IO problem while initializing "
 						+ "LDAP properties page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while " 
+				throw new AdminException("AuthAdmin.configureAuth - problem forwarding request while " 
 						+ "initializing LDAP properties page: " + se.getMessage());
 			}
 		} else {
@@ -203,7 +202,7 @@
 				}
 			
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "Problem getting or setting property while "
+				String errorMessage = "AuthAdmin.configureAuth - Problem getting or setting property while "
 					+ "processing LDAP properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -229,13 +228,13 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("AuthAdmin.configureAuth - problem forwarding request while "
 						+ "processing LDAP properties page: " + se.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing Authentication "
+				throw new AdminException("AuthAdmin.configureAuth - IO problem while processing Authentication "
 						+ "properties page: " + ioe.getMessage());
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "Problem getting or setting property while "
+				String errorMessage = "AuthAdmin.configureAuth - Problem getting or setting property while "
 					+ "processing Authentication properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -271,10 +270,10 @@
 				}
 			}
 		} catch (InstantiationException ie) {
-			errorVector.add("Instantiation error while verifying Metacat Administrators : "
+			errorVector.add("AuthAdmin.validateOptions - Instantiation error while verifying Metacat Administrators : "
 							+ ie.getMessage());
 		} catch (Exception e) {
-			errorVector.add("Error while verifying Metacat Administrators : "
+			errorVector.add("AuthAdmin.validateOptions - Error while verifying Metacat Administrators : "
 					+ e.getMessage());
 		}
 
Index: src/edu/ucsb/nceas/metacat/admin/DBAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/DBAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/DBAdmin.java	(revision 5030)
@@ -54,8 +54,7 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DBVersion;
-import edu.ucsb.nceas.metacat.service.PropertyService;
-import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.DatabaseUtil;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
@@ -108,10 +107,10 @@
 			versionSet = DatabaseUtil.getUpgradeVersions();
 			scriptSuffixMap = DatabaseUtil.getScriptSuffixes();
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException("Could not retrieve database upgrade " 
+			throw new AdminException("DBAdmin() - Could not retrieve database upgrade " 
 					+ "versions during instantiation" + pnfe.getMessage());
 		} catch (NumberFormatException nfe) {
-			throw new AdminException("Bad version format numbering: "
+			throw new AdminException("DBAdmin() - Bad version format numbering: "
 					+ nfe.getMessage());
 		}
 	}
@@ -181,13 +180,13 @@
 				RequestUtil.forwardRequest(request, response,
 						"/admin/database-configuration.jsp", null);
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("Problem getting or setting property while " 
-						+ "initializing system properties page: " + gpe.getMessage());
+				throw new AdminException("DBAdmin.configureDatabase - Problem getting or " + 
+						"setting property while initializing system properties page: " + gpe.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("DBAdmin.configureDatabase - IO problem while initializing "
 						+ "system properties page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("DBAdmin.configureDatabase - problem forwarding request while "
 						+ "initializing system properties page: " + se.getMessage());
 			}  
 		} else {
@@ -227,13 +226,13 @@
 
 				PropertyService.persistMainBackupProperties();
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("Problem getting or setting property while "
-						+ "upgrading database: " + gpe.getMessage());
+				throw new AdminException("DBAdmin.configureDatabase - Problem getting or setting " +
+						"property while upgrading database: " + gpe.getMessage());
 			}  catch (IOException ioe) {
-				throw new AdminException("IO problem while upgrading database: "
+				throw new AdminException("DBAdmin.configureDatabase - IO problem while upgrading database: "
 						 + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("DBAdmin.configureDatabase - problem forwarding request while "
 						+ "upgrading database: " + se.getMessage());
 			}
 		}
@@ -272,12 +271,12 @@
 		// properties have been configured
 		try {
 			if (!PropertyService.arePropertiesConfigured()) {
-				throw new AdminException("An attempt was made to get the database version "
-								+ "before system properties were configured");
+				throw new AdminException("DBAdmin.getDBVersion - An attempt was made to get " + 
+						"the database version before system properties were configured");
 			}
-		} catch (MetacatUtilException ue) {
-			throw new AdminException("Could not determine the database version: "
-					+ ue.getMessage());
+		} catch (GeneralPropertyException gpe) {
+			throw new AdminException("DBAdmin.getDBVersion - Could not determine the database version: "
+					+ gpe.getMessage());
 		}
 		if (databaseVersion == null) {
 			databaseVersion = discoverDBVersion();
@@ -284,7 +283,7 @@
 		}
 
 		if (databaseVersion == null) {
-			throw new AdminException("Could not find database version");
+			throw new AdminException("DBAdmin.getDBVersion - Could not find database version");
 		}
 
 		return databaseVersion;
@@ -304,9 +303,8 @@
 		try {
 			int dbStatus = getDBStatus();
 			if (dbStatus == DB_DOES_NOT_EXIST) {
-				throw new AdminException(
-						"Database does not exist for connection"
-						+ PropertyService.getProperty("database.connectionURI"));
+				throw new AdminException("DBAdmin.discoverDBVersion - Database does not exist " + 
+						"for connection" + PropertyService.getProperty("database.connectionURI"));
 			} else if (dbStatus == TABLES_DO_NOT_EXIST) {
 				databaseVersion = new DBVersion("0.0.0");
 				return databaseVersion;
@@ -320,22 +318,22 @@
 			databaseVersion = getUnRegisteredDBVersion();
 			
 		} catch (SQLException sqle) {
-			String errorMessage = "SQL error during  database version discovery: "
+			String errorMessage = "DBAdmin.discoverDBVersion - SQL error during  database version discovery: "
 				+ sqle.getMessage();
 			logMetacat.error(errorMessage);
 			throw new AdminException(errorMessage);
 		} catch (PropertyNotFoundException pnfe) {
-			String errorMessage = "Property not found during  database version discovery: "
-					+ pnfe.getMessage();
+			String errorMessage = "DBAdmin.discoverDBVersion - Property not found during  database " + 
+			"version discovery: " + pnfe.getMessage();
 			logMetacat.error(errorMessage);
 			throw new AdminException(errorMessage);
 		} catch (NumberFormatException nfe) {
-			throw new AdminException("Bad version format numbering: "
+			throw new AdminException("DBAdmin.discoverDBVersion - Bad version format numbering: "
 					+ nfe.getMessage());
 		}
 		
 		if (databaseVersion == null) {
-			throw new AdminException("Database version discovery returned null");
+			throw new AdminException("DBAdmin.discoverDBVersion - Database version discovery returned null");
 		}
 		return databaseVersion;
 	}
@@ -382,13 +380,13 @@
 			return new DBVersion(dbVersionString);
 			
 		} catch (SQLException sqle) {
-			throw new AdminException("Could not run SQL to get registered db version: " 
+			throw new AdminException("DBAdmin.getRegisteredDBVersion - Could not run SQL to get registered db version: " 
 					+ sqle.getMessage());			
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException("Could not get property for registered db version: " 
+			throw new AdminException("DBAdmin.getRegisteredDBVersion - Could not get property for registered db version: " 
 					+ pnfe.getMessage());		
 		} catch (NumberFormatException nfe) {
-			throw new AdminException("Bad version format numbering: "
+			throw new AdminException("DBAdmin.getRegisteredDBVersion - Bad version format numbering: "
 					+ nfe.getMessage());
 		} finally {
 			if (pstmt != null) {
@@ -440,11 +438,10 @@
 				return new DBVersion(dbVersionString);
 			}
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException(
-					"Could not get property for unregistered db version: "
-							+ pnfe.getMessage());
+			throw new AdminException("DBAdmin.getUnRegisteredDBVersion - Could not get " + 
+					"property for unregistered db version: " + pnfe.getMessage());
 		} catch (NumberFormatException nfe) {
-			throw new AdminException("Bad version format numbering: "
+			throw new AdminException("DBAdmin.getUnRegisteredDBVersion - Bad version format numbering: "
 					+ nfe.getMessage());
 		}
 	}
@@ -463,8 +460,7 @@
 		try {
 
 			// check out DBConnection
-			conn = DBConnectionPool
-					.getDBConnection("DBAdmin.updateDBVersion()");
+			conn = DBConnectionPool.getDBConnection("DBAdmin.updateDBVersion()");
 			serialNumber = conn.getCheckOutSerialNumber();
 			conn.setAutoCommit(false);
 
@@ -483,10 +479,10 @@
 			conn.commit();
 		} catch (SQLException e) {
 			conn.rollback();
-			throw new SQLException("DBAdmin.getDBVersion(). " + e.getMessage());
+			throw new SQLException("DBAdmin.updateDBVersion - sql error: " + e.getMessage());
 		} catch (PropertyNotFoundException pnfe) {
 			conn.rollback();
-			throw new SQLException("DBAdmin.getDBVersion(). " + pnfe.getMessage());
+			throw new SQLException("DBAdmin.updateDBVersion - property error" + pnfe.getMessage());
 		}
 		finally {
 			try {
@@ -698,7 +694,7 @@
 			sqlFileLocation = SystemUtil.getSQLDir();
 			databaseType = PropertyService.getProperty("database.type");
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException("Could not get property while trying " 
+			throw new AdminException("DBAdmin.getUpdateScripts - Could not get property while trying " 
 					+ "to retrieve database update scripts: " + pnfe.getMessage());
 		}
 		
@@ -763,13 +759,13 @@
 			// update the db version to be the metacat version
 			databaseVersion = new DBVersion(SystemUtil.getMetacatVersion().getVersionString());
 		} catch (SQLException sqle) {
-			throw new AdminException("SQL error when running upgrade scripts: "
+			throw new AdminException("DBAdmin.upgradeDatabase - SQL error when running upgrade scripts: "
 					+ sqle.getMessage());
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException("SQL error when running upgrade scripts: "
+			throw new AdminException("DBAdmin.upgradeDatabase - SQL error when running upgrade scripts: "
 					+ pnfe.getMessage());
 		}catch (NumberFormatException nfe) {
-			throw new AdminException("Bad version format numbering: "
+			throw new AdminException("DBAdmin.upgradeDatabase - Bad version format numbering: "
 					+ nfe.getMessage());
 		}
 	}
@@ -800,7 +796,7 @@
 
 			// load the sql from the file into a vector of individual statements
 			// and execute them.
-			logMetacat.debug("processing File: " + sqlFileName);
+			logMetacat.debug("DBAdmin.runSQLFile - processing File: " + sqlFileName);
 			Vector<String> sqlCommands = loadSQLFromFile(sqlFileName);
 			for (String sqlStatement : sqlCommands) {
 				Statement statement = connection.createStatement();
@@ -816,7 +812,7 @@
 							 sqle.getMessage().contains("ORA-04098") ||
 							 sqle.getMessage().contains("ORA-04080") ||
 							 sqle.getMessage().contains("ORA-00942"))) {
-						logMetacat.warn("did not process sql drop statement: " + sqle.getMessage());
+						logMetacat.warn("DBAdmin.runSQLFile - did not process sql drop statement: " + sqle.getMessage());
 					} else {
 						throw sqle;
 					}
@@ -825,10 +821,10 @@
 			connection.commit();
 			
 		} catch (IOException ioe) {
-			throw new AdminException("Could not read SQL file" 
+			throw new AdminException("DBAdmin.runSQLFile - Could not read SQL file" 
 					+ ioe.getMessage());
 		} catch (PropertyNotFoundException pnfe) {
-			throw new AdminException("Could not find property to run SQL file" 
+			throw new AdminException("DBAdmin.runSQLFile - Could not find property to run SQL file" 
 					+ pnfe.getMessage());
 		} catch (SQLException sqle) {
 			if (connection != null) {
Index: src/edu/ucsb/nceas/metacat/shared/BaseAccess.java
===================================================================
--- src/edu/ucsb/nceas/metacat/shared/BaseAccess.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/shared/BaseAccess.java	(revision 5030)
@@ -43,7 +43,7 @@
         //check out DBConnection
     	try {
     		conn = DBConnectionPool.
-                	getDBConnection("methodName");
+                	getDBConnection(methodName);
     		serialNumber = conn.getCheckOutSerialNumber();
     	} catch (SQLException sqle) {
     		throw new AccessException("Could not get connection from DB connection pool: " 
Index: src/edu/ucsb/nceas/metacat/DBSAXHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DBSAXHandler.java	(revision 5030)
@@ -37,7 +37,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.XMLSchema;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.morpho.datapackage.Triple;
Index: src/edu/ucsb/nceas/metacat/admin/PropertiesAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/PropertiesAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/PropertiesAdmin.java	(revision 5030)
@@ -37,7 +37,7 @@
 
 import edu.ucsb.nceas.metacat.MetacatVersion;
 import edu.ucsb.nceas.metacat.database.DBVersion;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.ServiceService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
@@ -160,16 +160,16 @@
 						"/admin/properties-configuration.jsp", null);
 
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("Problem getting or setting property while " 
-						+ "initializing system properties page: " + gpe.getMessage());
+				throw new AdminException("PropertiesAdmin.configureProperties - Problem getting or " + 
+						"setting property while initializing system properties page: " + gpe.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("PropertiesAdmin.configureProperties - IO problem while initializing "
 						+ "system properties page:" + ioe.getMessage());
 			} catch (ServiceException se) {
-				throw new AdminException("Service problem while initializing "
+				throw new AdminException("PropertiesAdmin.configureProperties - Service problem while initializing "
 						+ "system properties page:" + se.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while " 
+				throw new AdminException("PropertiesAdmin.configureProperties - problem forwarding request while " 
 						+ "initializing system properties page: " + se.getMessage());
 			}
 		} else {
@@ -205,7 +205,7 @@
 				try {
 					FileUtil.createDirectory(dataDir);
 				} catch (UtilException ue) {
-					String errorString = "Could not create directory: " + dataDir +
+					String errorString = "PropertiesAdmin.configureProperties - Could not create directory: " + dataDir +
 					" : " + ue.getMessage();
 					logMetacat.error(errorString);
 					validationErrors.add(errorString);
@@ -216,7 +216,7 @@
 				try {
 					FileUtil.createDirectory(inlineDataDir);
 				} catch (UtilException ue) {
-					String errorString = "Could not create directory: " + inlineDataDir +
+					String errorString = "PropertiesAdmin.configureProperties - Could not create directory: " + inlineDataDir +
 						" : " + ue.getMessage();
 					logMetacat.error(errorString);
 					validationErrors.add(errorString);
@@ -227,7 +227,7 @@
 				try {
 					FileUtil.createDirectory(documentfilepath);
 				} catch (UtilException ue) {	
-					String errorString = "Could not create directory: " + documentfilepath +
+					String errorString = "PropertiesAdmin.configureProperties - Could not create directory: " + documentfilepath +
 						" : " + ue.getMessage();
 					logMetacat.error(errorString);
 					validationErrors.add(errorString);
@@ -238,7 +238,7 @@
 				try {
 					FileUtil.createDirectory(tempDir);
 				} catch (UtilException ue) {		
-					String errorString = "Could not create directory: " + tempDir +
+					String errorString = "PropertiesAdmin.configureProperties - Could not create directory: " + tempDir +
 						" : " + ue.getMessage();
 					logMetacat.error(errorString);
 					validationErrors.add(errorString);
@@ -249,7 +249,7 @@
 				try {
 					FileUtil.createDirectory(replLogDir);
 				} catch (UtilException ue) {		
-					String errorString = "Could not create directory: " + replLogDir +
+					String errorString = "PropertiesAdmin.configureProperties - Could not create directory: " + replLogDir +
 						" : " + ue.getMessage();
 					logMetacat.error(errorString);
 					validationErrors.add(errorString);
@@ -261,7 +261,7 @@
 				PropertyService.persistMainBackupProperties();
 
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "Problem getting or setting property while "
+				String errorMessage = "PropertiesAdmin.configureProperties - Problem getting or setting property while "
 						+ "processing system properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -298,13 +298,13 @@
 				}
 
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("PropertiesAdmin.configureProperties - problem forwarding request while "
 						+ "processing system properties page: " + se.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing system "
+				throw new AdminException("PropertiesAdmin.configureProperties - IO problem while processing system "
 						+ "properties page: " + ioe.getMessage());
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("problem with properties while "
+				throw new AdminException("PropertiesAdmin.configureProperties - problem with properties while "
 						+ "processing system properties page: " + gpe.getMessage());
 			}
 		}
Index: src/edu/ucsb/nceas/metacat/admin/BackupAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/BackupAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/BackupAdmin.java	(revision 5030)
@@ -35,7 +35,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.ServiceService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
@@ -100,9 +100,9 @@
 			
 			try {
 				String backupBaseDir = SystemUtil.discoverExternalDir();
-				logMetacat.debug("Backup dir discovered as: " + backupBaseDir);
+				logMetacat.debug("BackupAdmin.configureBackup - Backup dir discovered as: " + backupBaseDir);
 				String backupDirStatus = getBackupDirStatus(backupBaseDir);
-				logMetacat.debug("Status of discovered backup dir: " + backupDirStatus);
+				logMetacat.debug("BackupAdmin.configureBackup - Status of discovered backup dir: " + backupDirStatus);
 				
 				if (backupBaseDir != null) {
 					request.setAttribute("backupBaseDir", backupBaseDir);
@@ -115,13 +115,13 @@
 				RequestUtil.forwardRequest(request, response,
 						"/admin/backup-configuration.jsp", null);
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("BackupAdmin.configureBackup - IO problem while initializing "
 						+ "backup configuration page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("Problem forwarding request while "
+				throw new AdminException("BackupAdmin.configureBackup - Problem forwarding request while "
 						+ "initializing backup configuration page: " + se.getMessage());
 			} catch (MetacatUtilException mue) {
-				throw new AdminException("Problem discovering backup directory while "
+				throw new AdminException("BackupAdmin.configureBackup - Problem discovering backup directory while "
 						+ "initializing backup configuration page: " + mue.getMessage());
 			}
 		} else {
@@ -153,17 +153,17 @@
 					ServiceService.refreshService("SkinPropertyService");
 					SystemUtil.storeExternalDirLocation(backupDir);
 				} catch (UtilException ue) {
-					String errorMessage = "Could not create directory: " + hiddenBackupDir
+					String errorMessage = "BackupAdmin.configureBackup - Could not create directory: " + hiddenBackupDir
 							+ " : " + ue.getMessage() + ". Please try again";
 					processingErrors.add(errorMessage);
 					logMetacat.error(errorMessage);
 				} catch (GeneralPropertyException gpe) {
-					String errorMessage = "Could not set application.backupDir property "
+					String errorMessage = "BackupAdmin.configureBackup - Could not set application.backupDir property "
 							+ " to " + backupDir + " : " + gpe.getMessage() + ".";
 					processingErrors.add(errorMessage);
 					logMetacat.error(errorMessage);
 				} catch (ServiceException se) {
-					String errorMessage = "Could not refresh service : " + se.getMessage() + ".";
+					String errorMessage = "BackupAdmin.configureBackup - Could not refresh service : " + se.getMessage() + ".";
 					processingErrors.add(errorMessage);
 					logMetacat.error(errorMessage);
 				}
@@ -184,10 +184,10 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing login page: " 
+				throw new AdminException("BackupAdmin.configureBackup - IO problem while processing login page: " 
 						+ ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("BackupAdmin.configureBackup - problem forwarding request while "
 						+ "processing login page: " + se.getMessage());
 			}
 		}
Index: src/edu/ucsb/nceas/metacat/database/DBVersion.java
===================================================================
--- src/edu/ucsb/nceas/metacat/database/DBVersion.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/database/DBVersion.java	(revision 5030)
@@ -26,7 +26,7 @@
 import java.util.Vector;
 
 import edu.ucsb.nceas.metacat.Version;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.StringUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
Index: src/edu/ucsb/nceas/metacat/oaipmh/provider/server/catalog/MetacatRecordFactory.java
===================================================================
--- src/edu/ucsb/nceas/metacat/oaipmh/provider/server/catalog/MetacatRecordFactory.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/oaipmh/provider/server/catalog/MetacatRecordFactory.java	(revision 5030)
@@ -16,7 +16,7 @@
 import java.util.StringTokenizer;
 
 import edu.ucsb.nceas.metacat.oaipmh.provider.server.OAIHandler;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 import org.apache.log4j.Logger;
Index: src/edu/ucsb/nceas/metacat/admin/LoginAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/LoginAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/LoginAdmin.java	(revision 5030)
@@ -89,13 +89,13 @@
 				RequestUtil.forwardRequest(request, response,
 						"/admin/admin-login.jsp", null);
 			} catch (MetacatUtilException mue) {
-				throw new AdminException("Utility problem while processing login page: " 
-						+ mue.getMessage());
+				throw new AdminException("LoginAdmin.authenticateUser - Utility problem while " + 
+						"processing login page: " + mue.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("LoginAdmin.authenticateUser -IO problem while initializing "
 						+ "user login page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("LoginAdmin.authenticateUser -problem forwarding request while "
 						+ "initializing user login page: " + se.getMessage());
 			}
 		} else {
@@ -121,7 +121,7 @@
 					try {
 						isLoggedIn = AuthUtil.logUserIn(request, userName, password);
 					} catch (MetacatUtilException ue) {
-						String errorMessage = "Could not log in as: " + userName
+						String errorMessage = "LoginAdmin.authenticateUser - Could not log in as: " + userName
 						+ " : " + ue.getMessage() + ". Please try again";
 						processingErrors.add(errorMessage);
 						logMetacat.error(errorMessage);
@@ -144,10 +144,10 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing login page: " 
+				throw new AdminException("LoginAdmin.authenticateUser - IO problem while processing login page: " 
 						+ ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("LoginAdmin.authenticateUser - problem forwarding request while "
 						+ "processoing login page: " + se.getMessage());
 			}
 		}
Index: src/edu/ucsb/nceas/metacat/admin/MetacatAdminServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/MetacatAdminServlet.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/MetacatAdminServlet.java	(revision 5030)
@@ -39,7 +39,7 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.metacat.MetaCatServlet;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.service.SessionService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.util.AuthUtil;
@@ -92,7 +92,7 @@
 	private void handleGetOrPost(HttpServletRequest request,
 			HttpServletResponse response) throws ServletException, IOException {
 		String action = request.getParameter("configureType");
-		logMetacat.debug("Processing admin action: " + action);
+		logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Processing admin action: " + action);
 		Vector<String> processingMessage = new Vector<String>();
 		Vector<String> processingErrors = new Vector<String>();
 
@@ -110,7 +110,7 @@
 						+ " before you can continue with Metacat configuration.");
 				RequestUtil.setRequestMessage(request, processingMessage);
 				action = "backup";
-				logMetacat.debug("Admin action changed to 'backup'");
+				logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'backup'");
 			} else if (!AuthUtil.isAuthConfigured()) {
 				// if authentication isn't configured, change the action to auth.  
 				// Authentication needs to be set up before we do anything else
@@ -118,7 +118,7 @@
 						+ "you can continue with MetaCat configuration.");
 				RequestUtil.setRequestMessage(request, processingMessage);
 				action = "auth";
-				logMetacat.debug("Admin action changed to 'auth'");
+				logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'auth'");
 			} else if (!AuthUtil.isUserLoggedInAsAdmin(request)) {
 				// If auth is configured, see if the user is logged in
 				// as an administrator.  If not, they need to log in before
@@ -127,7 +127,7 @@
 						"user before you can continue with MetaCat configuration.");
 				RequestUtil.setRequestMessage(request, processingMessage);
 				action = "login";
-				logMetacat.debug("Admin action changed to 'login'");
+				logMetacat.debug("MetacatAdminServlet.handleGetOrPost - Admin action changed to 'login'");
 			}  
 
 			if (action == null || action.equals("configure")) {
@@ -180,23 +180,23 @@
 				GeoserverAdmin.getInstance().configureGeoserver(request, response);
 				return;
 			} else {
-				String errorMessage = "Invalid action in configuration request: " + action;
+				String errorMessage = "MetacatAdminServlet.handleGetOrPost - Invalid action in configuration request: " + action;
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
 			} 
 		} catch (GeneralPropertyException ge) {
 			String errorMessage = 
-				"Property problem while handling request: " + ge.getMessage();
+				"MetacatAdminServlet.handleGetOrPost - Property problem while handling request: " + ge.getMessage();
 			logMetacat.error(errorMessage);
 			processingErrors.add(errorMessage);
 		} catch (AdminException ae) {
 			String errorMessage = 
-				"Admin problem while handling request: " + ae.getMessage();
+				"MetacatAdminServlet.handleGetOrPost - Admin problem while handling request: " + ae.getMessage();
 			logMetacat.error(errorMessage);
 			processingErrors.add(errorMessage);
 		} catch (MetacatUtilException ue) {
 			String errorMessage = 
-				"Utility problem while handling request: " + ue.getMessage();
+				"MetacatAdminServlet.handleGetOrPost - Utility problem while handling request: " + ue.getMessage();
 			logMetacat.error(errorMessage);
 			processingErrors.add(errorMessage);
 		}
Index: src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/Eml210SAXHandler.java	(revision 5030)
@@ -49,7 +49,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/database/DatabaseService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/database/DatabaseService.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/database/DatabaseService.java	(revision 5030)
@@ -29,7 +29,7 @@
 import org.apache.log4j.Logger;
 
 import edu.ucsb.nceas.dbadapter.AbstractDatabase;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.BaseService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 
Index: src/edu/ucsb/nceas/metacat/oaipmh/provider/server/OAIHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/oaipmh/provider/server/OAIHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/oaipmh/provider/server/OAIHandler.java	(revision 5030)
@@ -40,7 +40,7 @@
 import org.apache.log4j.PropertyConfigurator;
 
 import edu.ucsb.nceas.metacat.oaipmh.provider.server.crosswalk.Eml2oai_dc;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 
 import ORG.oclc.oai.server.catalog.AbstractCatalog;
Index: src/edu/ucsb/nceas/metacat/admin/SkinsAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/SkinsAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/SkinsAdmin.java	(revision 5030)
@@ -37,8 +37,8 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
-import edu.ucsb.nceas.metacat.service.SkinPropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
+import edu.ucsb.nceas.metacat.properties.SkinPropertyService;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
 import edu.ucsb.nceas.metacat.util.SkinUtil;
 import edu.ucsb.nceas.utilities.MetaDataProperty;
@@ -125,7 +125,7 @@
 
 					SortedProperties skinProperties = originalPropertyMap.get(skinName);
 					if (skinProperties == null) {
-						logMetacat.error("Could not find properties for skin: " + skinName);
+						logMetacat.error("SkinsAdmin.configureSkins - Could not find properties for skin: " + skinName);
 						removeSkins.add(skinName);
 						continue;
 					}
@@ -140,7 +140,7 @@
 					// set properties to be preserved in an application upgrade.
 					SortedProperties backupProperties = backupPropertiesMap.get(skinName);
 					if (backupProperties == null) {
-						logMetacat.warn("Could not find backup properties for skin: "
+						logMetacat.warn("SkinsAdmin.configureSkins - Could not find backup properties for skin: "
 								+ skinName);
 					} else {
 						for (String propertyName : backupProperties.getPropertyNames()) {
@@ -166,13 +166,13 @@
 						"/admin/skins-configuration.jsp", null);
 
 			} catch (GeneralPropertyException pnfe) {
-				throw new AdminException("Problem getting property while initializing "
-						+ "skins properties page: " + pnfe.getMessage());
+				throw new AdminException("SkinsAdmin.configureSkins - Problem getting property while " + 
+						"initializing skins properties page: " + pnfe.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("SkinsAdmin.configureSkins - IO problem while initializing "
 						+ "skins properties page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("SkinsAdmin.configureSkins - problem forwarding request while "
 						+ "initializing skins properties page: " + se.getMessage());
 			}
 
@@ -195,7 +195,7 @@
 						SkinPropertyService.getMetaData(skinName);
 					
 					if (skinMetaData == null) {
-						logMetacat.error("Could not find metadata for skin: " + skinName);
+						logMetacat.error("SkinsAdmin.configureSkins - Could not find metadata for skin: " + skinName);
 						continue;
 					}
 					
@@ -238,12 +238,12 @@
 				PropertyService.setProperty("configutil.skinsConfigured",
 						PropertyService.CONFIGURED);
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "problem setting property while processing skins "
+				String errorMessage = "SkinsAdmin.configureSkins - problem setting property while processing skins "
 						+ "properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
 			} catch (IOException ioe) {
-				String errorMessage = "IO problem while processing skins "
+				String errorMessage = "SkinsAdmin.configureSkins - IO problem while processing skins "
 						+ "properties page: " + ioe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -268,13 +268,13 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("SkinsAdmin.configureSkins - problem forwarding request while "
 						+ "processing skins properties page: " + se.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing skins "
+				throw new AdminException("SkinsAdmin.configureSkins - IO problem while processing skins "
 						+ "properties page: " + ioe.getMessage());
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "problem setting property while processing skins "
+				String errorMessage = "SkinsAdmin.configureSkins - problem setting property while processing skins "
 						+ "properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
Index: src/edu/ucsb/nceas/metacat/admin/GeoserverAdmin.java
===================================================================
--- src/edu/ucsb/nceas/metacat/admin/GeoserverAdmin.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/admin/GeoserverAdmin.java	(revision 5030)
@@ -36,7 +36,7 @@
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.MetacatUtilException;
 import edu.ucsb.nceas.metacat.util.GeoserverUtil;
 import edu.ucsb.nceas.metacat.util.RequestUtil;
@@ -107,13 +107,13 @@
 				RequestUtil.forwardRequest(request, response,
 						"/admin/geoserver-configuration.jsp", null);
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("Problem getting or setting property while " 
-						+ "initializing system properties page: " + gpe.getMessage());
+				throw new AdminException("GeoserverAdmin.configureGeoserver - Problem getting or " + 
+						"setting property while initializing system properties page: " + gpe.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while initializing "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - IO problem while initializing "
 						+ "system properties page:" + ioe.getMessage());
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - problem forwarding request while "
 						+ "initializing system properties page: " + se.getMessage());
 			}  
 		} else if (bypass != null && bypass.equals("true")) {
@@ -127,7 +127,7 @@
 						PropertyService.BYPASSED);
 				
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "Problem getting or setting property while "
+				String errorMessage = "GeoserverAdmin.configureGeoserver - Problem getting or setting property while "
 					+ "processing system properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -146,10 +146,10 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - problem forwarding request while "
 						+ "processing geoservices configuration page: " + se.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing geoservices "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - IO problem while processing geoservices "
 						+ "geoservices page: " + ioe.getMessage());
 			} 
 		
@@ -191,11 +191,11 @@
 					PropertyService.persistMainBackupProperties();
 				}
 			} catch (MetacatUtilException ue) {
-				String errorMessage = "Error updating geoserver password: " + ue.getMessage();
+				String errorMessage = "GeoserverAdmin.configureGeoserver - Error updating geoserver password: " + ue.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
 			} catch (GeneralPropertyException gpe) {
-				String errorMessage = "Problem getting or setting property while "
+				String errorMessage = "GeoserverAdmin.configureGeoserver - Problem getting or setting property while "
 						+ "processing system properties page: " + gpe.getMessage();
 				logMetacat.error(errorMessage);
 				processingErrors.add(errorMessage);
@@ -221,13 +221,13 @@
 							"/admin?configureType=configure&processForm=false", null);
 				}
 			} catch (ServletException se) {
-				throw new AdminException("problem forwarding request while "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - problem forwarding request while "
 						+ "processing geoservices configuration page: " + se.getMessage());
 			} catch (IOException ioe) {
-				throw new AdminException("IO problem while processing geoservices "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - IO problem while processing geoservices "
 						+ "geoservices page: " + ioe.getMessage());
 			} catch (GeneralPropertyException gpe) {
-				throw new AdminException("problem with properties while "
+				throw new AdminException("GeoserverAdmin.configureGeoserver - problem with properties while "
 						+ "processing geoservices configuration page: " + gpe.getMessage());
 			}
 		}
Index: src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/Eml200SAXHandler.java	(revision 5030)
@@ -50,7 +50,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.AuthUtil;
 import edu.ucsb.nceas.metacat.util.DocumentUtil;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
Index: src/edu/ucsb/nceas/metacat/DocumentIdentifier.java
===================================================================
--- src/edu/ucsb/nceas/metacat/DocumentIdentifier.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/DocumentIdentifier.java	(revision 5030)
@@ -33,7 +33,7 @@
 
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/replication/ReplicationService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/replication/ReplicationService.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/replication/ReplicationService.java	(revision 5030)
@@ -45,7 +45,7 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.BaseService;
 import edu.ucsb.nceas.metacat.shared.HandlerException;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
Index: src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobParamAccess.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobParamAccess.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobParamAccess.java	(revision 5030)
@@ -101,7 +101,7 @@
 						pstmt.close();
 					}
 				} catch (SQLException sqle) {
-					logMetacat.error("ScheduledJobParamsAccess.createJobParams - An error occurred " 
+					logMetacat.error("ScheduledJobParamAccess.createJobParams - An error occurred " 
 							+ "closing prepared statement: " + sqle.getMessage());
 				} finally {
 					DBConnectionPool.returnDBConnection(conn, serialNumber);
@@ -122,10 +122,12 @@
 		// change the status to deleted
 		try {
 			String sql = "UPDATE scheduled_job_params SET status = ? WHERE jobId = ?";		
+			pstmt = conn.prepareStatement(sql);
+			
 			pstmt.setString(1, StatusUtil.DELETED);
 			pstmt.setLong(1, jobId);
 			
-			logMetacat.info("SQL deleteJobParams - " + sql);
+			logMetacat.info("ScheduledJobParamsAccess.deleteJobParams - SQL: " + sql);
 
 			pstmt.execute();
 		} catch (SQLException sqle) {
@@ -137,7 +139,7 @@
 					pstmt.close();
 				}
 			} catch (SQLException sqle) {
-				logMetacat.error("ScheduledJobParamsAccess.createJobParams - An error occurred " 
+				logMetacat.error("ScheduledJobParamsAccess.deleteJobParams - An error occurred " 
 						+ "closing prepared statement: " + sqle.getMessage());
 			} finally {
 				DBConnectionPool.returnDBConnection(conn, serialNumber);
Index: src/edu/ucsb/nceas/metacat/properties/PropertyService.java
===================================================================
--- src/edu/ucsb/nceas/metacat/properties/PropertyService.java	(nonexistent)
+++ src/edu/ucsb/nceas/metacat/properties/PropertyService.java	(revision 5030)
@@ -0,0 +1,409 @@
+/**
+ *  '$RCSfile$'
+ *    Purpose: A Class that implements properties methods for metacat
+ *  Copyright: 2008 Regents of the University of California and the
+ *             National Center for Ecological Analysis and Synthesis
+ *    Authors: Michael Daigle
+ *
+ *   '$Author$'
+ *     '$Date$'
+ * '$Revision$'
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+package edu.ucsb.nceas.metacat.properties;
+
+import java.util.Map;
+import java.util.Vector;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.log4j.Logger;
+
+import edu.ucsb.nceas.metacat.shared.BaseService;
+import edu.ucsb.nceas.metacat.shared.ServiceException;
+import edu.ucsb.nceas.utilities.FileUtil;
+import edu.ucsb.nceas.utilities.GeneralPropertyException;
+import edu.ucsb.nceas.utilities.PropertiesMetaData;
+import edu.ucsb.nceas.utilities.PropertyNotFoundException;
+import edu.ucsb.nceas.utilities.SortedProperties;
+
+/**
+ * A suite of utility classes for the metadata configuration utility
+ */
+public class PropertyService extends BaseService {
+
+	private static PropertyService propertyService = null;
+
+	private static PropertiesInterface properties = null;
+
+	// system is configured
+	public static final String CONFIGURED = PropertiesInterface.CONFIGURED;
+	// system has never been configured
+	public static final String UNCONFIGURED = PropertiesInterface.UNCONFIGURED;
+	public static final String BYPASSED = PropertiesInterface.BYPASSED;
+
+	private static String DEFAULT_CONFIG_FILE_DIR = "WEB-INF";
+	public static String CONFIG_FILE_DIR = null;
+	public static String CONFIG_FILE_NAME = null;
+	public static String CONFIG_FILE_PATH = null;
+	
+	public static String TEST_CONFIG_FILE_NAME = null;
+
+	private static String DEFAULT_PROPERTY_CLASS_NAME = "edu.ucsb.nceas.metacat.properties.ConfigurableProperties";
+	private static String PROPERTY_CLASS_NAME = null;
+
+	private static String RECOMMENDED_EXTERNAL_DIR = null;
+
+	private static Logger logMetacat = Logger.getLogger(PropertyService.class);
+
+	/**
+	 * private constructor since this is a singleton
+	 * 
+	 * @param servletContext
+	 *            the context we will use to get relative paths
+	 */
+	private PropertyService() throws ServiceException {
+		_serviceName = "PropertyService";
+		
+		initialize();
+	}
+
+	/**
+	 * Get the single instance of PropertyService.
+	 * 
+	 * @return the single instance of PropertyService
+	 */
+	public static PropertyService getInstance(ServletContext context)
+			throws ServiceException {
+		if (propertyService == null) {
+			
+			String applicationName = (String)context.getAttribute("APPLICATION_NAME");
+			
+			CONFIG_FILE_DIR = context.getInitParameter("configFileDir");
+			if (CONFIG_FILE_DIR == null) {
+				String configDir = context.getRealPath(DEFAULT_CONFIG_FILE_DIR);
+				CONFIG_FILE_DIR = configDir;
+			}
+			
+			CONFIG_FILE_PATH = CONFIG_FILE_DIR + FileUtil.getFS() + applicationName + ".properties";
+
+			PROPERTY_CLASS_NAME = context.getInitParameter("propertyClassName");
+			if (PROPERTY_CLASS_NAME == null) {
+				PROPERTY_CLASS_NAME = DEFAULT_PROPERTY_CLASS_NAME;
+			}
+
+			propertyService = new PropertyService();
+		}
+		return propertyService;
+	}
+
+	 /**
+	 * Get the single instance of PropertyService for test purposes. In this
+	 * case, we allow the configuration directory to be passed in.
+	 *
+	 * @param configDir the configuration directory we need to look in
+	 * @return the single instance of PropertyService
+	 */
+	 public static PropertyService getInstance(String testConfigFileDir)
+			throws ServiceException {
+		if (propertyService == null) {
+			CONFIG_FILE_DIR = testConfigFileDir;
+
+			PROPERTY_CLASS_NAME = DEFAULT_PROPERTY_CLASS_NAME;
+
+			propertyService = new PropertyService();
+		}
+		return propertyService;
+	}
+	 
+	 /**
+		 * Get the single instance of PropertyService for test purposes. In this
+		 * case, we allow the configuration directory to be passed in.
+		 *
+		 * @param configDir the configuration directory we need to look in
+		 * @return the single instance of PropertyService
+		 */
+		 public static PropertyService getInstance() throws ServiceException {
+			if (propertyService == null) {
+				throw new ServiceException("PropertyService.getInstance - cannot call " +
+						"getInstance without parameters until property service has been created " +
+						"with either servlet context or config file path.");
+			}
+			return propertyService;
+		}
+
+	public boolean refreshable() {
+		return true;
+	}
+
+	public void doRefresh() throws ServiceException {
+		// initialize();
+	}
+
+	public void stop() throws ServiceException {
+		return;
+	}
+
+	/**
+	 * Initialize the singleton.
+	 * 
+	 * @param servletContext
+	 *            the context we will use to get relative paths
+	 */
+	private void initialize() throws ServiceException {
+
+		logMetacat.debug("Initializing PropertyService");
+		
+		try {
+			Class<?> classDef = Class.forName(PROPERTY_CLASS_NAME);
+			properties = (PropertiesInterface) classDef.newInstance();
+		} catch (InstantiationException ie) {
+			throw new ServiceException("Could not instantiate property class: "
+					+ PROPERTY_CLASS_NAME + " " + ie.getMessage());
+		} catch (IllegalAccessException iae) {
+			throw new ServiceException("Access error when intantiating property class: "
+					+ PROPERTY_CLASS_NAME + " " + iae.getMessage());
+		} catch (ClassNotFoundException cnfe) {
+			throw new ServiceException("Could not find property class: "
+					+ PROPERTY_CLASS_NAME + " " + cnfe.getMessage());
+		}
+	}
+
+	/**
+	 * Utility method to get a property value from the properties file
+	 * 
+	 * @param propertyName
+	 *            the name of the property requested
+	 * @return the String value for the property
+	 */
+	public static String getProperty(String propertyName)
+			throws PropertyNotFoundException {
+		return properties.getProperty(propertyName);
+	}
+
+	/**
+	 * Get a set of all property names.
+	 * 
+	 * @return Set of property names
+	 */
+	public static Vector<String> getPropertyNames() {
+		return properties.getPropertyNames();
+	}
+
+	/**
+	 * Get a Set of all property names that start with the groupName prefix.
+	 * 
+	 * @param groupName
+	 *            the prefix of the keys to search for.
+	 * @return enumeration of property names
+	 */
+	public static Vector<String> getPropertyNamesByGroup(String groupName) {
+		return properties.getPropertyNamesByGroup(groupName);
+	}
+
+	/**
+	 * Get a Map of all properties that start with the groupName prefix.
+	 * 
+	 * @param groupName
+	 *            the prefix of the keys to search for.
+	 * @return Map of property names
+	 */
+	public static Map<String, String> getPropertiesByGroup(String groupName)
+			throws PropertyNotFoundException {
+		return properties.getPropertiesByGroup(groupName);
+	}
+
+	/**
+	 * Utility method to set a property value both in memory and to the
+	 * properties file
+	 * 
+	 * @param propertyName
+	 *            the name of the property requested
+	 * @param newValue
+	 *            the new value for the property
+	 */
+	public static void setProperty(String propertyName, String newValue)
+			throws GeneralPropertyException {
+		properties.setProperty(propertyName, newValue);
+		properties.persistProperties();
+	}
+
+	/**
+	 * Utility method to set a property value in memory. This will NOT cause the
+	 * property to be written to disk. Use this method to set multiple
+	 * properties in a row without causing excessive I/O. You must call
+	 * persistProperties() once you're done setting properties to have them
+	 * written to disk.
+	 * 
+	 * @param propertyName
+	 *            the name of the property requested
+	 * @param newValue
+	 *            the new value for the property
+	 */
+	public static void setPropertyNoPersist(String propertyName, String newValue)
+			throws GeneralPropertyException {
+		properties.setPropertyNoPersist(propertyName, newValue);
+	}
+
+	/**
+	 * Save the properties to a properties file. Note, the order and comments
+	 * will be preserved.
+	 */
+	public static void persistProperties() throws GeneralPropertyException {
+		properties.persistProperties();
+	}
+
+	/**
+	 * Get the main backup properties file. These are configurable properties
+	 * that are stored outside the metacat install directories so the user does
+	 * not need to re-enter all the configuration information every time they do
+	 * an upgrade.
+	 * 
+	 * @return a SortedProperties object with the backup properties
+	 */
+	public static SortedProperties getMainBackupProperties() throws GeneralPropertyException {
+		return properties.getMainBackupProperties();
+	}
+
+	/**
+	 * Get the auth backup properties file. These are configurable properties
+	 * that are stored outside the metacat install directories so the user does
+	 * not need to re-enter all the configuration information every time they do
+	 * an upgrade.
+	 * 
+	 * @return a SortedProperties object with the backup properties
+	 */
+	public static SortedProperties getAuthBackupProperties() throws GeneralPropertyException{
+		return properties.getAuthBackupProperties();
+	}
+
+	/**
+	 * Get the main properties metadata. This is retrieved from an xml file that
+	 * describes the attributes of configurable properties.
+	 * 
+	 * @return a PropertiesMetaData object with the main properties metadata
+	 */
+	public static PropertiesMetaData getMainMetaData() throws GeneralPropertyException{
+		return properties.getMainMetaData();
+	}
+
+	/**
+	 * Get the auth properties metadata. This is retrieved from an xml file that
+	 * describes the attributes of configurable properties.
+	 * 
+	 * @return a PropertiesMetaData object with the organization properties
+	 *         metadata
+	 */
+	public static PropertiesMetaData getAuthMetaData() throws GeneralPropertyException{
+		return properties.getAuthMetaData();
+	}
+
+	/**
+	 * Writes out backup configurable properties to a file.
+	 */
+	public static void persistMainBackupProperties() throws GeneralPropertyException {
+
+		properties.persistMainBackupProperties();
+	}
+
+	/**
+	 * Writes out backup configurable properties to a file.
+	 */
+	public static void persistAuthBackupProperties(ServletContext servletContext)
+			throws GeneralPropertyException {
+
+		properties.persistAuthBackupProperties(servletContext);
+	}
+
+	/**
+	 * Reports whether properties are fully configured.
+	 * 
+	 * @return a boolean that is true if properties are not unconfigured and
+	 *         false otherwise
+	 */
+	public static boolean arePropertiesConfigured() throws GeneralPropertyException {
+		return properties.arePropertiesConfigured();
+	}
+
+	/**
+	 * Determine if the system is configured to bypass configuration. If so, the
+	 * system will look for backup configuration files at startup time and use
+	 * those to configure metacat. The bypass options should only be set by
+	 * developers. Production code should never bypass confguration.
+	 * 
+	 * @return true if dev.runConfiguration is set to true in metacat.properties
+	 *         and we have not already checked for bypass, false otherwise.
+	 */
+	public static boolean doBypass() throws GeneralPropertyException {
+		return properties.doBypass();
+	}
+
+	/**
+	 * Reports whether the metacat configuration utility should be run. Returns
+	 * false if -- dev.runConfiguration=false and -- backup properties file
+	 * exists Note that dev.runConfiguration should only be set to false when
+	 * reinstalling the same version of the application in developement.
+	 * 
+	 * @return a boolean that is false if dev.runConfiguration is false and the
+	 *         backup properties file exists.
+	 */
+	public static void bypassConfiguration() throws GeneralPropertyException {
+		properties.bypassConfiguration();
+	}
+
+	/**
+	 * Take input from the user in an HTTP request about an property to be
+	 * changed and update the metacat property file with that new value if it
+	 * has changed from the value that was originally set.
+	 * 
+	 * @param request
+	 *            that was generated by the user
+	 * @param response
+	 *            to send output back to the user
+	 * @param propertyName
+	 *            the name of the property to be checked and set
+	 */
+	public static void checkAndSetProperty(HttpServletRequest request, String propertyName)
+			throws GeneralPropertyException {
+		properties.checkAndSetProperty(request, propertyName);
+	}
+
+	/**
+	 * Sets the recommended external directory. This is populated during
+	 * initialization time using the SystemUtil.discoverExternalDir() method.
+	 * This directory will be used to suggest external user directories when the
+	 * user configures metacat for the first time.
+	 * 
+	 */
+	public static void setRecommendedExternalDir(String extBaseDir) {
+		RECOMMENDED_EXTERNAL_DIR = extBaseDir;
+	}
+
+	/**
+	 * Returns the recommended external base directory. This is populated during
+	 * initialization time using the SystemUtil.discoverExternalBaseDir()
+	 * method. This directory will be used to suggest external user directories
+	 * when the user configures metacat for the first time.
+	 * 
+	 * @return a String holding the recommended external directory
+	 */
+	public static String getRecommendedExternalDir() {
+		return RECOMMENDED_EXTERNAL_DIR;
+	}
+
+}
\ No newline at end of file

Property changes on: src/edu/ucsb/nceas/metacat/properties/PropertyService.java
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:mergeinfo
## -0,0 +0,0 ##
Index: src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/replication/ReplicationHandler.java	(revision 5030)
@@ -36,7 +36,7 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.HandlerException;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java
===================================================================
--- src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/scheduler/ScheduledJobAccess.java	(revision 5030)
@@ -70,9 +70,11 @@
 
 			pstmt.setLong(1, jobId);
 			
-			logMetacat.info("SQL getJobByName - " + sql);
-			logMetacat.info("SQL params: [" + jobId + "]");
+			String sqlReport = "ScheduledJobAccess.getJob - SQL: " + sql;
+			sqlReport += " [" + jobId + "]";
 			
+			logMetacat.info(sqlReport);
+			
 			pstmt.execute();
 			
 			ResultSet resultSet = pstmt.getResultSet();
@@ -89,7 +91,7 @@
 					pstmt.close();
 				}
 			} catch (SQLException sqle) {
-				logMetacat.error("ScheduledJobAccess.getJobByName - An error occurred " 
+				logMetacat.error("ScheduledJobAccess.getJob - An error occurred " 
 						+ "closing prepared statement: " + sqle.getMessage());
 			} 
 		}	
@@ -123,9 +125,11 @@
 
 			pstmt.setString(1, jobName);
 			
-			logMetacat.info("SQL getJobByName - " + sql);
-			logMetacat.info("SQL params: [" + jobName + "]");
+			String sqlReport = "ScheduledJobAccess.getJobByName - SQL: " + sql;
+			sqlReport += " [" + jobName + "]";
 			
+			logMetacat.info(sqlReport);
+			
 			pstmt.execute();
 			
 			ResultSet resultSet = pstmt.getResultSet();
@@ -147,7 +151,9 @@
 			} catch (SQLException sqle) {
 				logMetacat.error("ScheduledJobAccess.getJobByName - An error occurred " 
 						+ "closing prepared statement: " + sqle.getMessage());
-			} 
+			} finally {
+				DBConnectionPool.returnDBConnection(conn, serialNumber);
+			}
 		}	
 		
 		// Now get all the job parameters and put those into a list of job parameter
@@ -259,7 +265,7 @@
 					pstmt.close();
 				}
 			} catch (SQLException sqle) {
-				logMetacat.error("ScheduledJobAccess.getJobByName - An error occurred " 
+				logMetacat.error("ScheduledJobAccess.getAllJobs - An error occurred " 
 						+ "closing prepared statement: " + sqle.getMessage());
 			} finally {
 				DBConnectionPool.returnDBConnection(conn, serialNumber);
Index: src/edu/ucsb/nceas/metacat/replication/ForceReplicationHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/replication/ForceReplicationHandler.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/replication/ForceReplicationHandler.java	(revision 5030)
@@ -35,7 +35,7 @@
 
 import org.apache.log4j.Logger;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.shared.ServiceException;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/AccessControlList.java
===================================================================
--- src/edu/ucsb/nceas/metacat/AccessControlList.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/AccessControlList.java	(revision 5030)
@@ -50,7 +50,7 @@
 import edu.ucsb.nceas.metacat.database.DBConnection;
 import edu.ucsb.nceas.metacat.database.DBConnectionPool;
 import edu.ucsb.nceas.metacat.database.DatabaseService;
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.metacat.util.SystemUtil;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
Index: src/edu/ucsb/nceas/metacat/MetacatVersion.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetacatVersion.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/MetacatVersion.java	(revision 5030)
@@ -23,7 +23,7 @@
  */
 package edu.ucsb.nceas.metacat;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
 
 /**
Index: src/edu/ucsb/nceas/metacat/RemoteDocument.java
===================================================================
--- src/edu/ucsb/nceas/metacat/RemoteDocument.java	(revision 5029)
+++ src/edu/ucsb/nceas/metacat/RemoteDocument.java	(revision 5030)
@@ -26,7 +26,7 @@
 
 package edu.ucsb.nceas.metacat;
 
-import edu.ucsb.nceas.metacat.service.PropertyService;
+import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.metacat.util.MetacatUtil;
 import edu.ucsb.nceas.utilities.HttpMessage;
 import javax.servlet.ServletOutputStream;
