From: cvs@openprivacy.orgCVS update: talon/src/java/talon/implementations
Date: Sunday February 11, 19101 @ 14:02
Author: burton
CVSWEB Options: -------------------
Main CVSWeb: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi
View this module: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations
-----------------------------------
Update of /usr/local/cvs/public/talon/src/java/talon/implementations
In directory giga:/tmp/cvs-serv4717/src/java/talon/implementations
Modified Files:
FilePropertyManager.java SimpleLogger.java
Log Message:
ug... added some more features necessary for M1. Stupid bug in java.lang.Properties which took a while to fix.
*****************************************************************
File: talon/src/java/talon/implementations/FilePropertyManager.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/FilePropertyManager.java?annotate=1.2
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/FilePropertyManager.java?rev=1.2&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/FilePropertyManager.java.diff?r1=1.2&r2=1.1
-----------------------------------
Index: talon/src/java/talon/implementations/FilePropertyManager.java
diff -u talon/src/java/talon/implementations/FilePropertyManager.java:1.1 talon/src/java/talon/implementations/FilePropertyManager.java:1.2
--- talon/src/java/talon/implementations/FilePropertyManager.java:1.1 Thu Jan 25 11:05:55 2001
+++ talon/src/java/talon/implementations/FilePropertyManager.java Sun Feb 11 14:02:11 2001
@@ -32,18 +32,20 @@
* Singleton
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: FilePropertyManager.java,v 1.1 2001/01/25 19:05:55 burton Exp $
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
*/
public class FilePropertyManager extends BasePropertyManager {
public static final String INIT_PROPERTY_PROJECT = "project";
+ private String propertyFilename = null;
+
/**
* Constructor when used as a Component
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: FilePropertyManager.java,v 1.1 2001/01/25 19:05:55 burton Exp $
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
*/
public FilePropertyManager( ) { }
@@ -51,7 +53,7 @@
* Constructor when used as an Object
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: FilePropertyManager.java,v 1.1 2001/01/25 19:05:55 burton Exp $
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
*/
public FilePropertyManager( ComponentHandle handle,
String project ) throws TalonException {
@@ -66,13 +68,13 @@
*
* @see Component
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: FilePropertyManager.java,v 1.1 2001/01/25 19:05:55 burton Exp $
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
*/
public void init() throws TalonException {
//FIXME: this needs to throw an Exception if it is not there...
- String project = this.getComponentHandle().getInitProperties().getProperty( INIT_PROPERTY_PROJECT );
+ String project = this.getComponentHandle().getInitProperties().getString( INIT_PROPERTY_PROJECT );
String[] locations = getFileLocations( project );
@@ -91,7 +93,8 @@
throw new TalonException( "Unable to find a property file to use." );
}
- //Logger.debug( "Using property file: " + file );
+ //keep track of the file this was initialized from.
+ this.propertyFilename = file;
try {
@@ -111,7 +114,7 @@
* Given a project name, determine where its files might be stored.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: FilePropertyManager.java,v 1.1 2001/01/25 19:05:55 burton Exp $
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
*/
private String[] getFileLocations( String project ) {
@@ -149,5 +152,14 @@
}
+ /**
+ * Get the property file that this was initialized from.
+ *
+ * @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
+ * @version $Id: FilePropertyManager.java,v 1.2 2001/02/11 22:02:11 burton Exp $
+ */
+ public String getPropertyFilename() {
+ return this.propertyFilename;
+ }
}
*****************************************************************
File: talon/src/java/talon/implementations/SimpleLogger.java
CVSWEB Options: -------------------
CVSWeb: Annotate this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java?annotate=1.4
CVSWeb: View this file: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java?rev=1.4&content-type=text/x-cvsweb-markup
CVSWeb: Diff to previous version: http://openprivacy.org/cgi-bin/cvsweb/cvsweb.cgi/talon/src/java/talon/implementations/SimpleLogger.java.diff?r1=1.4&r2=1.3
-----------------------------------
Index: talon/src/java/talon/implementations/SimpleLogger.java
diff -u talon/src/java/talon/implementations/SimpleLogger.java:1.3 talon/src/java/talon/implementations/SimpleLogger.java:1.4
--- talon/src/java/talon/implementations/SimpleLogger.java:1.3 Thu Jan 25 11:05:17 2001
+++ talon/src/java/talon/implementations/SimpleLogger.java Sun Feb 11 14:02:11 2001
@@ -30,7 +30,7 @@
* - stderr -> If true, log to stderr
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public class SimpleLogger extends BaseComponent implements Component, Logger {
@@ -75,7 +75,7 @@
* Default constructor when used as a Component
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public SimpleLogger() { }
@@ -83,7 +83,7 @@
* Default constructor when used as an Object
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public SimpleLogger( ComponentHandle handle,
boolean debug,
@@ -103,7 +103,7 @@
*
* @see Component
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void init() throws TalonException {
@@ -117,10 +117,10 @@
.getInitProperties().getBoolean( INIT_PROPERTY_STDERR );
this.file = this.getComponentHandle()
- .getInitProperties().getProperty( INIT_PROPERTY_FILE );
+ .getInitProperties().getString( INIT_PROPERTY_FILE );
this.project = this.getComponentHandle().getInitProperties()
- .getProperty( INIT_PROPERTY_PROJECT, "UNKNOWN_PROJECT" );
+ .getString( INIT_PROPERTY_PROJECT, "UNKNOWN_PROJECT" );
}
@@ -129,7 +129,7 @@
* Log a message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void message( String message ) {
message( null, message );
@@ -139,7 +139,7 @@
* Log a message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void message( Object source, String message ) {
logString( source, getLogPrefix() + " -> " + message );
@@ -149,7 +149,7 @@
* Log an error
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void error( String message ) {
error( null, message );
@@ -159,7 +159,7 @@
* Log an error
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void error( Object source, String message ) {
logString( source, getLogPrefix() + " -> ERROR: " + message );
@@ -170,7 +170,7 @@
* Log a warning
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void warning( String message ) {
warning( null, message );
@@ -180,7 +180,7 @@
* Log a warning
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void warning( Object source, String message ) {
logString( source, getLogPrefix() + " -> WARNING: " + message );
@@ -190,7 +190,7 @@
* Log a debug message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void debug( String message ) {
debug( null, message );
@@ -200,7 +200,7 @@
* Log a debug message
*
* @author <A HREF="mailto:burton@apache.org">Kevin A. Burton</A>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
public void debug( Object source, String message ) {
@@ -213,7 +213,7 @@
/**
* @see #logString
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
private void logString( String s ) {
logString( null, s);
@@ -224,7 +224,7 @@
*
* @param source Object source where this was logged from
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
private void logString( Object source, String s ) {
@@ -277,7 +277,7 @@
* Get the prefix for log output.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
private String getLogPrefix() {
return this.project + " [" + this.getDate() + "]";
@@ -289,7 +289,7 @@
* Determine if it is OK to log to disk
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
private boolean isFileEnabled() {
@@ -332,7 +332,7 @@
* Get the date/time in a nice format for logging.
*
* @author <a href="mailto:burton@relativity.yi.org">Kevin A. Burton</a>
- * @version $Id: SimpleLogger.java,v 1.3 2001/01/25 19:05:17 burton Exp $
+ * @version $Id: SimpleLogger.java,v 1.4 2001/02/11 22:02:11 burton Exp $
*/
private String getDate() {
This archive was generated by hypermail 2b30 : Sun Feb 11 2001 - 14:02:42 PST