/* 
 * $Id: DataStoreShare.java,v 1.3 2003/12/10 14:43:43 koppy Exp $ 
 * 
 * Copyright (c) Siemens AG 2008 
 *           (c) Universität Paderborn 2008 
 * Licensed under EUPL 1.1. 
 * 
 * $Log: DataStoreShare.java,v $
 * Revision 1.3  2003/12/10 14:43:43  koppy
 * ID-Generierung auf UUID umgestellt
 *
 * Revision 1.2  2003/11/14 15:37:22  jonyp
 * *** empty log message ***
 *
 * Revision 1.1  2002/10/21 14:36:14  bigmac
 * *** empty log message ***
 *
 * Revision 1.4  2002/07/04 13:16:17  koppy
 * bugfix
 *
 * Revision 1.3  2002/05/03 13:48:34  koppy
 * ...
 *
 * Revision 1.2  2002/04/29 14:48:47  koppy
 * + einige Konstanten
 *
 * Revision 1.1  2002/04/05 15:35:20  koppy
 * initial revision
 * 
 */

package vkc.server.archive;

//import org.doomdark.uuid.UUID;
import org.doomdark.uuid.UUIDGenerator;


/**
 * Klasse enthält Datastore-weite Einstellungen
 * 
 * @created 05.04.2002
 * @version $Revision: 1.3 $
 * @author koppy
 */
public class DataStoreShare {

	public static final String DEFAULT_DB_USER = "cs-vkc";
	public static final String DEFAULT_DB_PWD = "mR6GNjDvd";
	public static final String DEFAULT_DB_DRIVER = "org.gjt.mm.mysql.Driver";

	/** 
	 * Unique across JVMs on this machine (unless they load this class
	 * in the same quater second - very unlikely)
	 */
	//private static final String jvm = String.valueOf((int) ( System.currentTimeMillis() >>> 8 ));
	private static final UUIDGenerator generator = UUIDGenerator.getInstance();	
	//private static final UUID nsUUID = new UUID(UUID.NAMESPACE_URL);
	private DataStoreShare() {
	}

	/** 
	 * Liefert eine ID als String
	 * 
	 * @author koppy 
	 */
	public static final String getUniqueID() {
		
		//alternativ: return generator.generateNameBasedUUID( nsUUID, jvm ).toString();
		return generator.generateTimeBasedUUID().toString();	
	}

}
