|
From: <rga...@us...> - 2002-11-06 22:11:51
|
Update of /cvsroot/csms/csms-core/src/java/org/fanfoot/prefs
In directory usw-pr-cvs1:/tmp/cvs-serv14619
Modified Files:
PreferenceManager.java
Log Message:
Making default config file settings for CVS version of the application the relevant config files in CVS. This means that unless the user has edited these settings locally they will always be pointing at the latest config files.
Index: PreferenceManager.java
===================================================================
RCS file: /cvsroot/csms/csms-core/src/java/org/fanfoot/prefs/PreferenceManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PreferenceManager.java 3 Nov 2002 21:02:17 -0000 1.2
--- PreferenceManager.java 6 Nov 2002 22:11:47 -0000 1.3
***************
*** 103,119 ****
private void initAutoScorerPrefs() {
Preferences prefs = userPrefs.node( AUTO_SCORER_CLASS );
if ( prefs.get( AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY, null ) == null ) {
prefs.put( AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY,
! "http://www.fanfoot.com/test/footballEvents.xml" );
}
if ( prefs.get( AUTO_SCORER_SCORES_CONFIGURATION_FILE_KEY,
null ) == null ) {
prefs.put( AUTO_SCORER_SCORES_CONFIGURATION_FILE_KEY,
! "http://www.fanfoot.com/test/ScoringConfig.xsl" );
}
if ( prefs.get( AUTO_SCORER_SCORES_TO_HTML_STYLESHEET_KEY,
null ) == null ) {
prefs.put( AUTO_SCORER_SCORES_TO_HTML_STYLESHEET_KEY,
! "http://www.fanfoot.com/test/Scores2HTML.xsl" );
}
}
--- 103,123 ----
private void initAutoScorerPrefs() {
Preferences prefs = userPrefs.node( AUTO_SCORER_CLASS );
+ /** The path from which default fiules are retrieved */
+ String strConfigPath = "http://cvs.sourceforge.net"
+ + "/cgi-bin/viewcvs.cgi/*checkout*/csms/csms-core"
+ + "/src/resources/conf/";
if ( prefs.get( AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY, null ) == null ) {
prefs.put( AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY,
! strConfigPath + "footballEvents.xml?rev=HEAD&content-type=text/xml" );
}
if ( prefs.get( AUTO_SCORER_SCORES_CONFIGURATION_FILE_KEY,
null ) == null ) {
prefs.put( AUTO_SCORER_SCORES_CONFIGURATION_FILE_KEY,
! strConfigPath + "ScoringConfig.xsl?rev=HEAD" );
}
if ( prefs.get( AUTO_SCORER_SCORES_TO_HTML_STYLESHEET_KEY,
null ) == null ) {
prefs.put( AUTO_SCORER_SCORES_TO_HTML_STYLESHEET_KEY,
! strConfigPath + "Scores2HTML.xsl?rev=HEAD" );
}
}
***************
*** 139,175 ****
String strResult = null;
strResult = userPrefs.node( strClass ).get( strName, null );
- return strResult;
- }
-
-
- /**
- * Get the default value for the preference indicated for this
- * version of the software. @ param strKey the key of the
- * preference requried
- *
- *@param strKey Description of the Parameter
- *@return The default value
- *@refactor The names of preferences should be in a hashtable or
- * something as they are duplicated here and in the
- * org.fanfoot.prefs.gui.preferenceEditor
- */
- public String getDefault( String strKey ) {
- String strResult = null;
- logger.fine( "Processing request for " + strKey );
- /** The path from which default fiules are retrieved */
- String strConfigPath = "http://www.fanfoot.com/test/";
- if ( strKey.equals( this.AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY
- + this.AUTO_SCORER_SCORES_CONFIGURATION_FILE_KEY ) ) {
- strResult = strConfigPath + "ScoringConfig.xsl";
- } else if ( strKey.equals( this.AUTO_SCORER_CLASS
- + this.AUTO_SCORER_EVENT_CONFIGURATION_FILE_KEY ) ) {
- strResult = strConfigPath + "footballEvents.xml";
- } else if ( strKey.equals( this.AUTO_SCORER_CLASS
- + this.AUTO_SCORER_SCORES_TO_HTML_STYLESHEET_KEY ) ) {
- strResult = strConfigPath + "Scores2HTML.xsl";
- } else if ( strKey.equals( "org/fanfoot/gui/ControlCentre/debug" ) ) {
- strResult = "false";
- }
- logger.fine( "Returning value: " + strResult );
return strResult;
}
--- 143,146 ----
|