You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by jm...@apache.org on 2007/02/12 05:53:13 UTC
svn commit: r506298 [1/2] - in /incubator/xap/trunk:
buildsystem/JSDoc-1.9.9.2/ codebase/src/xap/ codebase/src/xap/application/
codebase/src/xap/bridges/basic/ codebase/src/xap/bridges/dojo/
codebase/src/xap/bridges/google/ codebase/src/xap/bridges/mic...
Author: jmargaris
Date: Sun Feb 11 21:53:11 2007
New Revision: 506298
URL: http://svn.apache.org/viewvc?view=rev&rev=506298
Log:
logging changes and misc cleanup
Added:
incubator/xap/trunk/unittests/testsrc/xap/log/_TestLogger.html (with props)
incubator/xap/trunk/unittests/testsrc/xap/log/_TestLogger.js (with props)
Modified:
incubator/xap/trunk/buildsystem/JSDoc-1.9.9.2/main-site.tmpl
incubator/xap/trunk/codebase/src/xap/Xap.js
incubator/xap/trunk/codebase/src/xap/application/Application.js
incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/basic/HtmlHostBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoButtonBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoDatePickerBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoGenericWidgetBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconsBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleInfoWindowBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMapBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkerBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkersBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconsBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEInfoWindowBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMapBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkerBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkersBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconsBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooInfoWindowBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMapBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkerBridge.js
incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkersBridge.js
incubator/xap/trunk/codebase/src/xap/data/DataFramework.js
incubator/xap/trunk/codebase/src/xap/data/DataNamespaceHandler.js
incubator/xap/trunk/codebase/src/xap/data/bridge/DataFrameworkBridge.js
incubator/xap/trunk/codebase/src/xap/data/bridge/DataSourceBridge.js
incubator/xap/trunk/codebase/src/xap/data/bridge/FormatterBridge.js
incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js
incubator/xap/trunk/codebase/src/xap/data/formatter/FormatterChain.js
incubator/xap/trunk/codebase/src/xap/macro/MacroNamespaceHandler.js
incubator/xap/trunk/codebase/src/xap/mco/McoNamespaceHandler.js
incubator/xap/trunk/codebase/src/xap/session/ClientSession.js
incubator/xap/trunk/codebase/src/xap/session/Container.js
incubator/xap/trunk/codebase/src/xap/session/DeclarativeArgumentParser.js
incubator/xap/trunk/codebase/src/xap/taghandling/PluginDocumentHandler.js
incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js
incubator/xap/trunk/codebase/src/xap/util/HttpUtils.js
incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js
incubator/xap/trunk/codebase/src/xap/xml/NamespaceHandlerManager.js
incubator/xap/trunk/codebase/src/xap/xml/XalNamespaceHandler.js
incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js
incubator/xap/trunk/codebase/src/xap/xml/xmodify/CommandDirective.js
incubator/xap/trunk/codebase/src/xap/xml/xmodify/Xmodify.js
incubator/xap/trunk/samples/WebContent/XapConfig.js
incubator/xap/trunk/samples/WebContent/examples/widgets/src-js/AttributeTester.js
incubator/xap/trunk/unittests/jsunit-server-properties.xml
incubator/xap/trunk/unittests/testsrc/XapUnitTestSuite.html
incubator/xap/trunk/unittests/testsrc/xap/performance/_TestParserPerformance.js
incubator/xap/trunk/unittests/testsrc/xap/session/_TestContainer.js
Modified: incubator/xap/trunk/buildsystem/JSDoc-1.9.9.2/main-site.tmpl
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/buildsystem/JSDoc-1.9.9.2/main-site.tmpl?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/buildsystem/JSDoc-1.9.9.2/main-site.tmpl (original)
+++ incubator/xap/trunk/buildsystem/JSDoc-1.9.9.2/main-site.tmpl Sun Feb 11 21:53:11 2007
@@ -129,10 +129,13 @@
style="vertical-align: middle; background-image: url(images/menu.gif); background-repeat: no-repeat; background-position: top; height: 18px; padding: 1px; margin-bottom: 1px; margin-top: 12px;"><b> Logging</b></div>
<img src="images/menu_bullet.gif" border=0
style="vertical-align: middle;"> <a
- href="xap.util.LogFactory.html">LogFactory</a><br>
+ href="xap.log.Logger.html">Logger</a><br>
<img src="images/menu_bullet.gif" border=0
style="vertical-align: middle;"> <a
- href="xap.util.LogFactory.ConsoleLog.html">LogConsole</a><br>
+ href="xap.log.ConsoleAppender.html">ConsoleAppender</a><br>
+ <img src="images/menu_bullet.gif" border=0
+ style="vertical-align: middle;"> <a
+ href="xap.log.AlertAppender.html">ConsoleAppender</a><br>
</div>
</td>
<td><image src="images/spaced.gif" border=0 height=250
Modified: incubator/xap/trunk/codebase/src/xap/Xap.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/Xap.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/Xap.js (original)
+++ incubator/xap/trunk/codebase/src/xap/Xap.js Sun Feb 11 21:53:11 2007
@@ -237,8 +237,6 @@
subclassConstructor.prototype.toString = function(){
return subclassName ;
}
-
- subclassConstructor.s_log = xap.util.LogFactory.getLog( subclassName ) ;
}
Xap.getDebuggingObject = function(){
Modified: incubator/xap/trunk/codebase/src/xap/application/Application.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/application/Application.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/application/Application.js (original)
+++ incubator/xap/trunk/codebase/src/xap/application/Application.js Sun Feb 11 21:53:11 2007
@@ -20,7 +20,7 @@
Xap.provide("xap.application.Application");
Xap.require("xap.util.Exception");
Xap.require("xap.session.ClientSession");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
/**
@@ -82,12 +82,20 @@
throw new xap.util.Exception(" bad argument, no configuration object supplied to the Xap.createApplication",
null, null, "xap.application.Application.prototype.create");
}
+
+ var level = xap.util.ArrayHelper.indexOf(xap.log.Logger.LEVEL_NAMES, this._applicationConfig.logLevel);
+
+ if (level>=0){
+ xap.log.Logger.getRootLogger().setLevel(level);
+ }
+
+ var appenders = this._applicationConfig.logAppenders;
+ if (appenders){
+ for (var i = 0; i< appenders.length; i++){
+ xap.log.Logger.getRootLogger().addAppender(eval('new ' + appenders[i] + '();'));
+ }
+ }
- if(this._applicationConfig.logging == true) {
- xap.util.LogFactory.enableLogging()
- } else {
- xap.util.LogFactory.disableLogging();
- }
//need to make sure there is a default context supplied.
if (this._applicationConfig.context == null){
Modified: incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/basic/AbstractWidgetBridge.js Sun Feb 11 21:53:11 2007
@@ -21,7 +21,6 @@
Xap.require("xap.util.Utils");
Xap.require("xap.util.Exception");
-Xap.require("xap.util.LogFactory") ;
Xap.require("xap.taghandling.AbstractTagImpl") ;
Xap.require("xap.widgets.dojo.RichtextTooltip") ;
Xap.require("dojo.event.*") ;
@@ -476,8 +475,6 @@
allowedAttributes = allowedAttributes.concat(this.superclass.getAllowedAttributes());
}
this.constructor._allowedAttributes = allowedAttributes;
- xap.util.LogFactory.getLog("AbstractWidget").debug("Widget " + this +
- " supports the following attributes:" + allowedAttributes);
return allowedAttributes;
}
Modified: incubator/xap/trunk/codebase/src/xap/bridges/basic/HtmlHostBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/basic/HtmlHostBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/basic/HtmlHostBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/basic/HtmlHostBridge.js Sun Feb 11 21:53:11 2007
@@ -18,7 +18,7 @@
*/
Xap.provide("xap.bridges.basic.HtmlHostBridge");
-// Auto-added---o.k.?
+
Xap.require("xap.taghandling.AbstractTagImpl");
/**
@@ -44,8 +44,6 @@
}
xap.bridges.basic.HtmlHostBridge.prototype = new xap.taghandling.AbstractTagImpl;
-
-xap.bridges.basic.HtmlHostBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.basic.HtmlHostBridge" );
xap.bridges.basic.HtmlHostBridge.prototype.toString = function() {
return "xap.bridges.basic.HtmlHostBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoButtonBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoButtonBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoButtonBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoButtonBridge.js Sun Feb 11 21:53:11 2007
@@ -26,7 +26,6 @@
Xap.provide("xap.bridges.dojo.DojoButtonBridge");
-Xap.require("xap.util.LogFactory");
Xap.require("xap.bridges.dojo.DojoWidgetBridge");
Xap.require("dojo.widget.html.Button") ;
Xap.require("dojo.widget.Button");
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoColorPaletteBridge.js Sun Feb 11 21:53:11 2007
@@ -17,7 +17,6 @@
*
*/
Xap.provide("xap.bridges.dojo.DojoColorPaletteBridge");
-Xap.require("xap.util.LogFactory");
Xap.require("xap.bridges.dojo.DojoWidgetBridge");
Xap.require("dojo.widget.ColorPalette");
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoDatePickerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoDatePickerBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoDatePickerBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoDatePickerBridge.js Sun Feb 11 21:53:11 2007
@@ -17,7 +17,6 @@
*
*/
Xap.provide("xap.bridges.dojo.DojoDatePickerBridge");
-Xap.require("xap.util.LogFactory");
Xap.require("xap.bridges.dojo.DojoWidgetBridge");
Xap.require("dojo.widget.DatePicker");
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoFloatingPaneBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoFloatingPaneBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoFloatingPaneBridge.js Sun Feb 11 21:53:11 2007
@@ -29,8 +29,6 @@
Xap.require("xap.bridges.dojo.DojoWidgetBridge");
// Peer:
Xap.require("dojo.widget.FloatingPane");
-// Auto-added---o.k.?
-Xap.require("xap.util.LogFactory");
/**
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoGenericWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoGenericWidgetBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoGenericWidgetBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/DojoGenericWidgetBridge.js Sun Feb 11 21:53:11 2007
@@ -24,8 +24,6 @@
// No way of knowing what the peer class will be; make that someone
// else's responsibility---something for the html?
-// Auto-added---o.k.?
-Xap.require("xap.util.LogFactory");
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleBridge.js Sun Feb 11 21:53:11 2007
@@ -45,8 +45,6 @@
xap.bridges.google.GoogleBridge.prototype = new xap.taghandling.AbstractTagImpl;
-xap.bridges.google.GoogleBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleBridge" );
-
xap.bridges.google.GoogleBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleBridge";
}
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconBridge.js Sun Feb 11 21:53:11 2007
@@ -50,7 +50,7 @@
xap.bridges.google.GoogleIconBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleIconBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleIconBridge" );
+xap.bridges.google.GoogleIconBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleIconBridge" );
xap.bridges.google.GoogleIconBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleIconBridge";
@@ -100,6 +100,8 @@
alert(e);
}
} else {
+
+ //TODO this message is lame
xap.bridges.google.GoogleIconBridge.s_log.error("Bogus parent peer:" + parentPeer );
}
}
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconsBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconsBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconsBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleIconsBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.google.GoogleIconsBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleIconsBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleIconsBridge" );
+xap.bridges.google.GoogleIconsBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleIconsBridge" );
xap.bridges.google.GoogleIconsBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleIconsBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleInfoWindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleInfoWindowBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleInfoWindowBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleInfoWindowBridge.js Sun Feb 11 21:53:11 2007
@@ -43,7 +43,7 @@
xap.bridges.google.GoogleInfoWindowBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleInfoWindowBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleInfoWindowBridge" );
+xap.bridges.google.GoogleInfoWindowBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleInfoWindowBridge" );
xap.bridges.google.GoogleInfoWindowBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleInfoWindowBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMapBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMapBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMapBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMapBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.google.GoogleMapBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleMapBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleMapBridge" );
+xap.bridges.google.GoogleMapBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleMapBridge" );
xap.bridges.google.GoogleMapBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleMapBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkerBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkerBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkerBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.google.GoogleMarkerBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleMarkerBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleMarkerBridge" );
+xap.bridges.google.GoogleMarkerBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleMarkerBridge" );
xap.bridges.google.GoogleMarkerBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleMarkerBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkersBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkersBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkersBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/google/GoogleMarkersBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.google.GoogleMarkersBridge.prototype = new xap.bridges.google.GoogleBridge;
-xap.bridges.google.GoogleMarkersBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.google.GoogleMarkersBridge" );
+xap.bridges.google.GoogleMarkersBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.google.GoogleMarkersBridge" );
xap.bridges.google.GoogleMarkersBridge.prototype.toString = function() {
return "xap.bridges.google.GoogleMarkersBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEBridge.js Sun Feb 11 21:53:11 2007
@@ -45,8 +45,6 @@
xap.bridges.microsoft.VEBridge.prototype = new xap.taghandling.AbstractTagImpl;
-xap.bridges.microsoft.VEBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEBridge" );
-
xap.bridges.microsoft.VEBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEBridge";
}
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconBridge.js Sun Feb 11 21:53:11 2007
@@ -50,7 +50,7 @@
xap.bridges.microsoft.VEIconBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEIconBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEIconBridge" );
+xap.bridges.microsoft.VEIconBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEIconBridge" );
xap.bridges.microsoft.VEIconBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEIconBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconsBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconsBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconsBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEIconsBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.microsoft.VEIconsBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEIconsBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEIconsBridge" );
+xap.bridges.microsoft.VEIconsBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEIconsBridge" );
xap.bridges.microsoft.VEIconsBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEIconsBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEInfoWindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEInfoWindowBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEInfoWindowBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEInfoWindowBridge.js Sun Feb 11 21:53:11 2007
@@ -43,7 +43,7 @@
xap.bridges.microsoft.VEInfoWindowBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEInfoWindowBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEInfoWindowBridge" );
+xap.bridges.microsoft.VEInfoWindowBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEInfoWindowBridge" );
xap.bridges.microsoft.VEInfoWindowBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEInfoWindowBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMapBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMapBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMapBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMapBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.microsoft.VEMapBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEMapBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEMapBridge" );
+xap.bridges.microsoft.VEMapBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEMapBridge" );
xap.bridges.microsoft.VEMapBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEMapBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkerBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkerBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkerBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.microsoft.VEMarkerBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEMarkerBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEMarkerBridge" );
+xap.bridges.microsoft.VEMarkerBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEMarkerBridge" );
xap.bridges.microsoft.VEMarkerBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEMarkerBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkersBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkersBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkersBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/microsoft/VEMarkersBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.microsoft.VEMarkersBridge.prototype = new xap.bridges.microsoft.VEBridge;
-xap.bridges.microsoft.VEMarkersBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.microsoft.VEMarkersBridge" );
+xap.bridges.microsoft.VEMarkersBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.microsoft.VEMarkersBridge" );
xap.bridges.microsoft.VEMarkersBridge.prototype.toString = function() {
return "xap.bridges.microsoft.VEMarkersBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooBridge.js Sun Feb 11 21:53:11 2007
@@ -45,8 +45,6 @@
xap.bridges.yahoo.YahooBridge.prototype = new xap.taghandling.AbstractTagImpl;
-xap.bridges.yahoo.YahooBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooBridge" );
-
xap.bridges.yahoo.YahooBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooBridge";
}
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconBridge.js Sun Feb 11 21:53:11 2007
@@ -50,7 +50,7 @@
xap.bridges.yahoo.YahooIconBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooIconBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooIconBridge" );
+xap.bridges.yahoo.YahooIconBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.yahoo.YahooIconBridge" );
xap.bridges.yahoo.YahooIconBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooIconBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconsBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconsBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconsBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooIconsBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.yahoo.YahooIconsBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooIconsBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooIconsBridge" );
+xap.bridges.yahoo.YahooIconsBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.yahoo.YahooIconsBridge" );
xap.bridges.yahoo.YahooIconsBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooIconsBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooInfoWindowBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooInfoWindowBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooInfoWindowBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooInfoWindowBridge.js Sun Feb 11 21:53:11 2007
@@ -43,7 +43,7 @@
xap.bridges.yahoo.YahooInfoWindowBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooInfoWindowBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooInfoWindowBridge" );
+xap.bridges.yahoo.YahooInfoWindowBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.yahoo.YahooInfoWindowBridge" );
xap.bridges.yahoo.YahooInfoWindowBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooInfoWindowBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMapBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMapBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMapBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMapBridge.js Sun Feb 11 21:53:11 2007
@@ -46,7 +46,7 @@
xap.bridges.yahoo.YahooMapBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooMapBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooMapBridge" );
+xap.bridges.yahoo.YahooMapBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.yahoo.YahooMapBridge" );
xap.bridges.yahoo.YahooMapBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooMapBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkerBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkerBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkerBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkerBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.yahoo.YahooMarkerBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooMarkerBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooMarkerBridge" );
+xap.bridges.yahoo.YahooMarkerBridge.s_log = xap.log.Logger.getLogger( "xap.bridges.yahoo.YahooMarkerBridge" );
xap.bridges.yahoo.YahooMarkerBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooMarkerBridge";
Modified: incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkersBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkersBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkersBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/yahoo/YahooMarkersBridge.js Sun Feb 11 21:53:11 2007
@@ -49,7 +49,7 @@
xap.bridges.yahoo.YahooMarkersBridge.prototype = new xap.bridges.yahoo.YahooBridge;
-xap.bridges.yahoo.YahooMarkersBridge.s_log = xap.util.LogFactory.getLog( "xap.bridges.yahoo.YahooMarkersBridge" );
+xap.bridges.yahoo.YahooMarkersBridge.s_log =xap.log.Logger.getLogger.getLog( "xap.bridges.yahoo.YahooMarkersBridge" );
xap.bridges.yahoo.YahooMarkersBridge.prototype.toString = function() {
return "xap.bridges.yahoo.YahooMarkersBridge";
Modified: incubator/xap/trunk/codebase/src/xap/data/DataFramework.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/DataFramework.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/DataFramework.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/DataFramework.js Sun Feb 11 21:53:11 2007
@@ -19,25 +19,22 @@
Xap.provide("xap.data.DataFramework");
-
-Xap.require("xap.session.ClientEvent");
-Xap.require("xap.session.ClientSession");
-Xap.require("xap.mco.ContainerLifeCycleObject");
-Xap.require("xap.session.DeclarativeArgumentParser");
Xap.require("xap.data.controller.Binding") ;
Xap.require("xap.session.Container") ;
Xap.require("xap.data.controller.BindingType") ;
-Xap.require("xap.util.EscapeSyntaxException") ;
Xap.require("xap.resolver.ResolutionInfo");
+Xap.require("xap.data.controller.IteratorContainerImpl");
+
/**
- * Thisclass encapsulates all the data primitives available for a client session.
+ * This class encapsulates all the data primitives available for a client session.
* It may be used to lookup bindings, formatters, data source, and validators.
*
* @author dgennaco
+ * @author jmargaris
*/
-Xap.setupClassAsSubclassOf("xap.data.DataFramework", "xap.mco.ContainerLifeCycleObject");
+
/**
* @constructor
* @param sess{ClientSession}
@@ -47,100 +44,107 @@
this._session = sess;
this._dataSourceContainer = new xap.session.Container(sess);
this._bindingContainer = new xap.session.Container(sess);
-// TODO: use the appropriate containers---just
-// placeholders here to avoid follow-on errors.
+
this._formatterContainer = new xap.session.Container(sess);
this._iteratorContainer = new xap.data.controller.IteratorContainerImpl(sess);
- //add the dataSourceContainer to the container of containers
- //to support doing something like dataSource://myDataSource.do()
+ //add the dataSourceContainer to the container of containers
+ //to support doing something like dataSource://myDataSource.do()
this._session.addContainer("dataSource", this._dataSourceContainer);
this._session.addContainer("formatter", this._formatterContainer);
this._session.addContainer("binding", this._bindingContainer);
};
-/* private static final String */
-xap.data.DataFramework.MCO_ID = "DataService";
-/* private ClientSession */
-xap.data.DataFramework.prototype._session = null;
-/*private BindingContainerImpl */
-xap.data.DataFramework.prototype._bindingContainer = null;
-
-
-/*private BindingResolver */
-xap.data.DataFramework.prototype._bindingResolver = null;
-/*private IteratorContainerImpl */
-xap.data.DataFramework.prototype._iteratorContainer = null;
-/**
- * this.get the data service associated with the session.
- *
- * @param sess{ClientSession} The session.
- *
- * @return The data service.
- */
-/*public DataServiceImpl*/
+
+
+/**
+ * this.get the data service associated with the session.
+ *
+ * @param sess{ClientSession} The session.
+ *
+ * @return The data service.
+ */
xap.data.DataFramework.getDataService = function (sess) {
/*DataFramework*/
- var dataService = /*(DataFramework)*/
- sess.getSystemContainer().get(xap.data.DataFramework.MCO_ID);
+ var dataService = sess.getSystemContainer().get('DataService');
if (!dataService) {
dataService = new xap.data.DataFramework(sess);
- sess.getSystemContainer().put(xap.data.DataFramework.MCO_ID, dataService);
- /*McoArgumentParser*/
+ sess.getSystemContainer().put('DataService', dataService);
- // TODO: Get the parser...
+ /*McoArgumentParser*/
mcoParser = sess.getSystemContainer().get("McoArgumentParser");
- // add shortcuts to the binding methods.
+ // add shortcuts to the binding methods.
// ...so we can do the following:
- mcoParser.addFunctionShortcut("*", xap.data.DataFramework.MCO_ID + ".relativeBind");
- mcoParser.addFunctionShortcut("bind", xap.data.DataFramework.MCO_ID + ".bind");
+ mcoParser.addFunctionShortcut("*", 'DataService.relativeBind');
+ mcoParser.addFunctionShortcut("bind", 'DataService.bind');
}
return dataService;
};
+
/**
- * Returns the binding resolver for the data service. INTERNAL
- * USE ONLY!
- *
- * @return the binding resolver.
- */
-/*public BindingResolver*/
+ * Returns the binding resolver for the data service.
+ *
+ * @return {xap.data.controller.BindingResolver} The binding resolver.
+ */
xap.data.DataFramework.prototype.getBindingResolver = function () {
return this._bindingResolver;
};
+
/**
- * Set the binding resolver for the data service. INTERNAL
- * USE ONLY!
- *
- * @param b{BindingResolver} the binding resolver
- */
-/*public void*/
+ * Set the binding resolver for the data service.
+ *
+ * @param {xap.data.controller.BindingResolver} b The binding resolver
+ */
xap.data.DataFramework.prototype.setBindingResolver = function (b) {
this._bindingResolver = b;
};
+
/**
- * Get the iterator container, INTERNAL USE ONLY!
- * FUTURE expose this, and make a binding interface
- *
- * @return the iterator container
- */
-/*public BindingContainer*/
+ * Returns the binding container for the data service.
+ *
+ * @return {xap.session.Container} The binding container.
+ */
xap.data.DataFramework.prototype.getBindingContainer = function () {
return this._bindingContainer;
};
-
-
/**
- * Get the iterator container, INTERNAL USE ONLY!
- *
- * @return the iterator container
- */
-/*public IteratorContainer*/
+ * Returns the binding container for the data service.
+ *
+ * @return {xap.data.controller.IteratorContainerImpl} The iterator container.
+ */
xap.data.DataFramework.prototype.getIteratorContainer = function () {
return this._iteratorContainer;
};
+/**
+ * Returns the formatter container for the data service.
+ *
+ * @return {xap.session.Container} The formatter container.
+ */
+xap.data.DataFramework.prototype.getFormatterContainer = function () {
+ return this._formatterContainer;
+};
+
+/**
+ * Returns the data source container for the data service.
+ *
+ * @return {xap.session.Container} The data source container.
+ */
+xap.data.DataFramework.prototype.getDataSourceContainer = function () {
+ return this._dataSourceContainer;
+};
+
+
+xap.data.DataFramework.prototype.removedFromContainer = function () {
+ this._bindingContainer.destroy();
+ this._formatterContainer.destroy();
+ this._dataSourceContainer.destroy();
+ this._iteratorContainer.destroy();
+};
+
+
/**
@@ -169,72 +173,12 @@
bindString,
this._session,
xap.data.controller.BindingType.ONE_TIME,
- null
- );
+ null);
return this.bindBinding(binding);
};
-/*public void*/
-xap.data.DataFramework.prototype.unload = function () {
- this._bindingContainer.destroy();
- this._formatterContainer.destroy();
- this_dataSourceContainer.destroy();
- this._iteratorContainer.destroy();
- xap.mco.ContainerLifeCycleObject.unload.call(this);
-};
-
-
-// Implementors of DataService
-/*private container */
-xap.data.DataFramework.prototype._formatterContainer = null;
-/*private container */
-xap.data.DataFramework.prototype._dataSourceContainer = null;
-
-/**
- * The exception type used for all data framework exception
- * reporting.
-
- Fake it for now:
-
- *public static final int
- */
-// Implementor of DataService interface: xap.data.DataFramework.DATA_FRAMEWORK_EXCEPTION_TYPE = 10000;
-xap.data.DataFramework.DATA_FRAMEWORK_EXCEPTION_TYPE = "Data framework exception." ; //10000;
-//ExceptionContext.MAX_RANGE + 100;
-/**
- * Get the formatter container.
- *
- * @return The container of formatters, never <code>null</code>.
- *
- * @public
- * @return {FormatterContainer}
- **/
-// Implementor of DataService interface: xap.data.DataFramework.prototype.getFormatterContainer = function () {
-xap.data.DataFramework.prototype.getFormatterContainer = function () {
- return this._formatterContainer;
-};
-// Implementor of DataService interface: xap.data.DataFramework.prototype.setFormatterContainer = function (aContainer) {
-xap.data.DataFramework.prototype.setFormatterContainer = function (aContainer) {
- this._formatterContainer = aContainer;
-};
-/**
- * Get the data source container.
- *
- * @return The data source container, never <code>null</code>.
- *
- * @public
- * @return {DataSourceContainer}
- **/
-// Implementor of DataService interface: xap.data.DataFramework.prototype.getDataSourceContainer = function () {
-xap.data.DataFramework.prototype.getDataSourceContainer = function () {
- return this._dataSourceContainer;
-};
-// Implementor of DataService interface: xap.data.DataFramework.prototype.setDataSourceContainer = function (aContainer) {
-xap.data.DataFramework.prototype.setDataSourceContainer = function (aContainer) {
- this._dataSourceContainer = aContainer;
-};
xap.data.DataFramework.prototype.bind = function( stringOrBinding){
if ( typeof stringOrBinding == "string"){
Modified: incubator/xap/trunk/codebase/src/xap/data/DataNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/DataNamespaceHandler.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/DataNamespaceHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/DataNamespaceHandler.js Sun Feb 11 21:53:11 2007
@@ -19,6 +19,9 @@
*/
Xap.provide("xap.data.DataNamespaceHandler");
+Xap.require("xap.xml.ParserFactory");
+Xap.require("xap.taghandling.PluginDocumentHandler");
+Xap.require("xap.data.controller.BindingResolver") ;
/**
* @class
@@ -38,25 +41,12 @@
* @return {DataNamespaceHandler}
**/
xap.data.DataNamespaceHandler = function (sess) {
- Xap.require("xap.data.controller.IteratorContainerImpl") ;
- Xap.require("xap.xml.sax.ParserException");
- Xap.require("xap.xml.ParserFactory");
- Xap.require("xap.session.ClientSession");
- Xap.require("xap.taghandling.PluginDocumentHandler");
- Xap.require("xap.xml.dom.Document");
- Xap.require("xap.xml.DocumentContainer");
- Xap.require("xap.xml.dom.XapElement");
- Xap.require("xap.data.controller.BindingResolver") ;
-
this._session = sess;
- // Substitute for a session-held document registry, at least for now:
- this._documentRegistry = new Object();
+
+ var parser = xap.xml.ParserFactory.getParser();
for (var i = 0; i < xap.data.DataNamespaceHandler.DOCUMENT_NAMES.length; i++) {
var currentDocumentName = xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i];
try {
- //the root tag for the doc is just the doc name
- /*Document*/
- var parser = xap.xml.ParserFactory.getParser();
// This is _kludgy_; replace as soon as possible with
// just element/document creation and setting:
var documentRootString = "<" + currentDocumentName + "/>";
@@ -67,88 +57,32 @@
//we need to document that they not use these names
this._session.getDocumentContainer().put(currentDocumentName, dataDocument);
- //for each document, create namespace
- //handler for that document
- /*PluginDocumentHandler*/
+ //for each document, create namespace
+ //handler for that document
var p = new xap.taghandling.PluginDocumentHandler(sess, dataDocument, xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i]);
- // In an older version, the above wasn't done on creation: );
- // p.addDocument(dataDocument, xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i]);
+
}
catch (ex) {
/*ParserException*/
//if we did this right this should never ever happen
//it can only happen if DOCUMENTS[i] was screwed up somehow
//ex.printStackTrace();
- xap.data.DataNamespaceHandler.s_log.error(ex);
+ sess.handleException(ex);
}
}
};
-
-// Object superclass for lack of anything better---I don't think there's enough
-// common namespace handler behavior to abstract into a better superclass:
-Xap.setupClassAsSubclassOf("xap.data.DataNamespaceHandler", "Object");
-/*public static final String*/
-xap.data.DataNamespaceHandler.BINDING_DOCUMENT = "bindings";
-/*public static final String*/
-xap.data.DataNamespaceHandler.DATA_SOURCES_DOCUMENT = "dataSources";
-/*public static final String*/
-xap.data.DataNamespaceHandler.FORMATTERS_DOCUMENT = "formatters";
//the names of the documents to create and make plug-in aware
/*private static final String[]*/
xap.data.DataNamespaceHandler.DOCUMENT_NAMES = [
- xap.data.DataNamespaceHandler.BINDING_DOCUMENT,
- xap.data.DataNamespaceHandler.DATA_SOURCES_DOCUMENT,
- xap.data.DataNamespaceHandler.FORMATTERS_DOCUMENT
- ];
-xap.data.DataNamespaceHandler.s_log = xap.util.LogFactory.getLog("xap.data.DataNamespaceHandler");
-/**
- * @private {ClientSession}
- **/
-xap.data.DataNamespaceHandler.prototype._session = null;
-/**
- * @public
- * @param tagName{String}
- * @return {boolean}
- **/
-xap.data.DataNamespaceHandler.prototype.isTagHandled = function (tagName) {
- if ("iterator" == tagName) {
- return false;
- }
-
-
- //see if the tag was mapped to one of our data docs. If so return true
- for (var i = 0; i < xap.data.DataNamespaceHandler.DOCUMENT_NAMES.length; i++) {
- /*String*/
- var document = xap.data.DataNamespaceHandler.DOCUMENT_NAMES[i];
- /*Element*/
- var definition = this._session.getPluginRegistry().getPluginDefinition(tagName, "http://openxal.apache.org/data", document);
- if (definition != null) {
- return true;
- }
- }
-
- //if it wasn't mapped to any return false
- return false;
-};
-/**
- * @public
- * @param ns{String} namespace designator
- * @param tagName{String} tag name without namspace string
- * @param registry{DocumentRegistry}
- * @return {void}
- * @throws xap.util.Exception
- **/
-xap.data.DataNamespaceHandler.prototype.handleUnknownTagInNamespace = function (ns, tagName, registry) {
- // Iterators shouldn't have anything printed to the log, they should
- // be in our namespace, but they shouldn't be handled by this handler,
- // they will be handled later by the iterator plugin. This will
- // result in the iterator tag remaining in the document as we
- // desire. All other tags should be handled the default way.
- // TODO All of this
-};
+ "bindings",
+ "dataSources",
+ "formatters" ];
+
+
+
xap.data.DataNamespaceHandler.prototype.pluginLoaded = function (session) {
session.getNamespaceHandlerManager().addHandler("http://openxal.org/core/data", this);
this._session = session;
@@ -211,6 +145,6 @@
//an error
//TODO: fix exception handling
var ex = new xap.util.Exception("UNHANDLED_TAG_IN_NAMESPACE" + ": " + element.getNamespaceUri() + ", " + element.getLocalName()) ;
- clientSession.handleException(xap.data.DataFramework.DATA_FRAMEWORK_EXCEPTION_TYPE + ex,ex);
+ clientSession.handleException(ex);
};
Modified: incubator/xap/trunk/codebase/src/xap/data/bridge/DataFrameworkBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/bridge/DataFrameworkBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/bridge/DataFrameworkBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/bridge/DataFrameworkBridge.js Sun Feb 11 21:53:11 2007
@@ -19,7 +19,6 @@
Xap.provide("xap.data.bridge.DataFrameworkBridge");
Xap.require("xap.taghandling.AbstractTagImpl");
Xap.require("xap.data.DataFramework");
-Xap.require("xap.util.LogFactory");
/**
* The base class for all data framework tags, provides convenience methods
* for common data operations.
@@ -61,6 +60,6 @@
//-----------------------------------------------------------------------
/*protected Log*/
xap.data.bridge.DataFrameworkBridge.prototype.getLog = function () {
- return xap.util.LogFactory.getLog("DataFrameworkBridge");
+ return xap.log.Logger.getLogger("DataFrameworkBridge");
};
Modified: incubator/xap/trunk/codebase/src/xap/data/bridge/DataSourceBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/bridge/DataSourceBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/bridge/DataSourceBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/bridge/DataSourceBridge.js Sun Feb 11 21:53:11 2007
@@ -21,7 +21,6 @@
Xap.require("xap.data.bridge.DataFrameworkBridge");
Xap.require("xap.session.ClientEvent");
-Xap.require("xap.util.LogFactory");
Xap.require("xap.data.bridge.XmlDataTokens") ;
Xap.require("xap.xml.dom.XapElement");
Xap.require("xap.util.Exception");
@@ -83,7 +82,7 @@
* @return {Log}
*/
xap.data.bridge.DataSourceBridge.prototype.getLog = function () {
- return xap.util.LogFactory.getLog("xap.data.bridge.DataSourceBridge");
+ return xap.log.Logger.getLogger("xap.data.bridge.DataSourceBridge");
};
//-----------------------------------------------------------------------
Modified: incubator/xap/trunk/codebase/src/xap/data/bridge/FormatterBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/bridge/FormatterBridge.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/bridge/FormatterBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/bridge/FormatterBridge.js Sun Feb 11 21:53:11 2007
@@ -79,7 +79,7 @@
this.initializeFormatter();
}
catch (e) { // InitializationException e
- this.getSession().handleException(xap.data.DataFramework.DATA_FRAMEWORK_EXCEPTION_TYPE, e);
+ this.getSession().handleException(e);
}
/*catch () { // InvalidXmlException e
this.getSession().handleException( ExceptionContext.INVALID_XML_EXCEPTION, e );
Modified: incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/datasource/AbstractDataSource.js Sun Feb 11 21:53:11 2007
@@ -17,12 +17,11 @@
*
*/
Xap.provide("xap.data.datasource.AbstractDataSource");
-Xap.require("xap.mco.ContainerLifeCycleObject");
Xap.require("xap.requestservice.NetServiceListener");
Xap.require("xap.requestservice.RequestService");
Xap.require("xap.session.ClientSession");
Xap.require("xap.session.Container");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
Xap.require("xap.util.ResourceDictionary");
Xap.require("xap.util.Vector");
Xap.require("xap.data.datasource.QueryRecord") ;
@@ -195,27 +194,6 @@
}
};
-//-----------------------------------------------------------------------
-// ContainerLifecycleObject Interface.
-//-----------------------------------------------------------------------
-
-/**
- * @public
- * @return {void}
- **/
-/**
- * @param container{Container}
- * @param name{String}
- **/
-xap.data.datasource.AbstractDataSource.prototype.addedToContainer = function (container, name) {
- //NOOP
-};
-
-
-/**
- * @public
- * @return {void}
- **/
/**
* @param container{Container}
* @param name{String}
@@ -453,7 +431,7 @@
* @return {Log}
**/
xap.data.datasource.AbstractDataSource.prototype.getLog = function () {
- return xap.util.LogFactory.getLog("DataSource");
+ return xap.log.Logger.getLogger("DataSource");
};
//-----------------------------------------------------------------------
Modified: incubator/xap/trunk/codebase/src/xap/data/formatter/FormatterChain.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/data/formatter/FormatterChain.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/data/formatter/FormatterChain.js (original)
+++ incubator/xap/trunk/codebase/src/xap/data/formatter/FormatterChain.js Sun Feb 11 21:53:11 2007
@@ -21,7 +21,7 @@
Xap.require("xap.session.ClientSession");
Xap.require("xap.data.formatter.JsFormatterImpl") ;
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
Xap.require("xap.xml.dom.XapElement");
Xap.require("xap.util.ArrayHelper");
@@ -128,6 +128,6 @@
* @return {Log}
**/
xap.data.formatter.FormatterChain.prototype.getLog = function () {
- return xap.util.LogFactory.getLog("xap.data.formatter.FormatterChain");
+ return xap.log.Logger.getLogger("xap.data.formatter.FormatterChain");
};
Modified: incubator/xap/trunk/codebase/src/xap/macro/MacroNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/macro/MacroNamespaceHandler.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/macro/MacroNamespaceHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/macro/MacroNamespaceHandler.js Sun Feb 11 21:53:11 2007
@@ -20,7 +20,7 @@
Xap.require("xap.xml.dom.XapElement");
Xap.require("xap.xml.InvalidXmlException");
Xap.require("xap.macro.Macro");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
/**
@@ -37,7 +37,7 @@
//-----------------------------------------------------------------------
// Class variables.
//-----------------------------------------------------------------------
-xap.macro.MacroNamespaceHandler.s_log = xap.util.LogFactory.getLog( "xap.macro.MacroNamespaceHandler" );
+xap.macro.MacroNamespaceHandler.s_log = xap.log.Logger.getLogger( "xap.macro.MacroNamespaceHandler" );
//-----------------------------------------------------------------------
@@ -75,7 +75,11 @@
new Array( "name", element.toXml( true ))));
}
}
- if (xap.util.LogFactory.s_loggingEnabled)
+
+ //IMPORTANT I'm fairly certain that this.s_log will work as well even
+ //though s_log is not on the prototype. If so we should use that notation
+ //here and in a bunch of other places as it involves less dereferencing
+ if (xap.macro.MacroNamespaceHandler.s_log.isDebug())
xap.macro.MacroNamespaceHandler.s_log.debug( "Create macro name: ["+ name +
"] from element: [" + element.toXml() + "]");
Modified: incubator/xap/trunk/codebase/src/xap/mco/McoNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/mco/McoNamespaceHandler.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/mco/McoNamespaceHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/mco/McoNamespaceHandler.js Sun Feb 11 21:53:11 2007
@@ -21,7 +21,7 @@
Xap.require("xap.xml.dom.XapElement");
Xap.require("xap.xml.InvalidXmlException");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
/**
* @fileoverview The handler for the mco namespace.
@@ -34,7 +34,7 @@
//-----------------------------------------------------------------------
// Class Variables.
//-----------------------------------------------------------------------
-xap.mco.McoNamespaceHandler.s_log = xap.util.LogFactory.getLog( "xap.mco.McoNamespaceHandler" );
+xap.mco.McoNamespaceHandler.s_log = xap.log.Logger.getLogger( "xap.mco.McoNamespaceHandler" );
//-----------------------------------------------------------------------
// xap.xml.NamespaceHandler Implementation.
@@ -132,7 +132,7 @@
}
}
- if (xap.util.LogFactory.s_loggingEnabled)
+ if (xap.mco.McoNamespaceHandler.s_log.isDebug())
xap.mco.McoNamespaceHandler.s_log.debug( "Creating mco id: ["+ id + "] from class: ["
+ className + "]");
@@ -152,7 +152,8 @@
try {
// We can do the following because we're argless:
var mco = new mcoConstructor ;
- if (xap.util.LogFactory.s_loggingEnabled) xap.mco.McoNamespaceHandler.s_log.debug("Created mco: " + mco);
+ if (xap.mco.McoNamespaceHandler.s_log.isDebug())
+ xap.mco.McoNamespaceHandler.s_log.debug("Created mco: " + mco);
//TODO info if replacing existing macro?
session.getMcoContainer().put( id, mco );
Modified: incubator/xap/trunk/codebase/src/xap/session/ClientSession.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/session/ClientSession.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/session/ClientSession.js (original)
+++ incubator/xap/trunk/codebase/src/xap/session/ClientSession.js Sun Feb 11 21:53:11 2007
@@ -22,7 +22,6 @@
Xap.require("xap.xml.NamespaceHandlerManager");
Xap.require("xap.xml.DocumentContainer");
Xap.require("xap.util.XapException");
-Xap.require("xap.util.LogFactory");
Xap.require("xap.util.Hashtable");
Xap.require("xap.taghandling.PluginRegistryImpl");
Xap.require("xap.taghandling.PluginDocumentHandler");
@@ -32,6 +31,7 @@
Xap.require("xap.session.DeclarativeArgumentParser");
Xap.require("xap.session.Container");
Xap.require("xap.requestservice.RequestService");
+Xap.require("xap.log.Logger");
/**
@@ -83,8 +83,6 @@
}
-xap.session.ClientSession.s_log = xap.util.LogFactory.getLog( "xap.session.ClientSession" );
-
//-----------------------------------------------------------------------
// Public Methods.
//-----------------------------------------------------------------------
@@ -182,7 +180,8 @@
}
xap.session.ClientSession.prototype.handleException = function( exception ) {
- alert(xap.util.XapException.exceptionToString(exception));
+ //IMPORTANT get rid of handleException entirelty and just use log
+ xap.log.Logger.getLogger("exception").error("Exception occured", exception);
}
@@ -222,16 +221,7 @@
/**
* @private
*/
-xap.session.ClientSession.prototype._start = function() {
- //enable logging if needed.
- if(this.getApplication().getConfiguration().loggingEnabled != null) {
- if(this.getApplication().getConfiguration().loggingEnabled == "true") {
- xap.util.LogFactory.enableLogging()
- } else {
- xap.util.LogFactory.disableLogging();
- }
- }
-
+xap.session.ClientSession.prototype._start = function() {
//process any plugin class or files.
if (this.getApplication().getConfiguration().pluginFiles){
this._processPluginConfigurationFiles( this.getApplication().getConfiguration().pluginFiles );
Modified: incubator/xap/trunk/codebase/src/xap/session/Container.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/session/Container.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/session/Container.js (original)
+++ incubator/xap/trunk/codebase/src/xap/session/Container.js Sun Feb 11 21:53:11 2007
@@ -105,6 +105,14 @@
if (obj.addedToContainer) {
obj.addedToContainer(this, name);
}
+
+ //inject a getSession on the object
+ var self = this;
+ if (!obj.getSession){
+ obj.getSession = function(){
+ return self._clientSession;
+ }
+ }
return previousObject;
}
Modified: incubator/xap/trunk/codebase/src/xap/session/DeclarativeArgumentParser.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/session/DeclarativeArgumentParser.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/session/DeclarativeArgumentParser.js (original)
+++ incubator/xap/trunk/codebase/src/xap/session/DeclarativeArgumentParser.js Sun Feb 11 21:53:11 2007
@@ -32,7 +32,7 @@
Xap.require("xap.util.Exception");
Xap.require("xap.util.Character");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
Xap.require("xap.util.Hashtable");
Xap.require("xap.util.EscapeSyntaxParser");
@@ -85,6 +85,10 @@
*
*/
xap.session.DeclarativeArgumentParser = function( session ) {
+
+ //we use logging in this file so often just save a reference
+ this._log = xap.session.DeclarativeArgumentParser.s_log;
+
this._session = session;
this._functionShortcuts = new xap.util.Hashtable() ;
//add ourselves to the system MCO container so that the data framework
@@ -103,7 +107,7 @@
new xap.util.EscapeSyntaxParser('\\', ['\\','\''], ['\\','\''], false);
/** @private */
-xap.session.DeclarativeArgumentParser.s_log = xap.util.LogFactory.getLog("xap.session.DeclarativeArgumentParser");
+xap.session.DeclarativeArgumentParser.s_log = xap.log.Logger.getLogger("xap.session.DeclarativeArgumentParser");
//-----------------------------------------------------------------------
// Public Methods.
//-----------------------------------------------------------------------
@@ -156,8 +160,9 @@
xap.session.DeclarativeArgumentParser.prototype.parseArgument = function( args, startIndex,
sourceElement, clientEvent) {
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Parse argument [ " + args + "] at start index:" + startIndex);
+ if (this._log.isTrace())
+ this._log.trace("Parse argument [ " + args + "] at start index:" + startIndex);
+
var arg = new String();
var parseResult = null;
@@ -168,15 +173,11 @@
//we had better hit a ',' or a ')' next
if (parseResult!=null){
if (c==','){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("HIt a comma, returning arg" + arg);
parseResult._terminatingIndex = nextChar;
parseResult._parseStatus = this._ParseResult.COMMA_ENCOUNTERED;
return parseResult;
}
else if (c==')'){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("HIt a close paren, returning arg" + arg);
parseResult._terminatingIndex = nextChar;
parseResult._parseStatus = this._ParseResult.CLOSING_PAREN;
return parseResult;
@@ -185,7 +186,7 @@
; //trailing whitespace is ok
}
else{
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit a character after the full arg:" + arg);
+ this._log.trace("Hit a character after the full arg:" + arg);
throw new xap.util.Exception("Bad parameter trailing characters");
//TODO
}
@@ -198,16 +199,12 @@
//if we hit a ' or " with only whitespace before it that's
//a string
if ( (c=='\"' || c=='\'') && arg.trim().length==0){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit an open string char, parsing string");
parseResult = this._parseString(args,nextChar, c);
nextChar = parseResult._terminatingIndex;
}
//if we get an '(' anywhere it means this must be an 'mco' call of some sort
else if (c=='('){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit an open paren, parsing args");
var mcoCallResult = this._parseArguments(args,sourceElement,nextChar+1, clientEvent);
//TODO trim is needed here
@@ -247,14 +244,9 @@
var mcoName = mco.substring(0,periodIndex);
var methodName = mco.substring(periodIndex+1);
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Firing an object event");
var callResult =
this._fireObjectEvent(containerName,mcoName,methodName,mcoCallResult._resultObject);
-
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Object event returned : " + callResult);
-
+
parseResult = new this._ParseResult(callResult,mcoCallResult._terminatingIndex);
nextChar = mcoCallResult._terminatingIndex;
@@ -263,8 +255,6 @@
//if we hit a comma we must have had a plain old literal
//if the literal is all whitespace this will throw an exception
else if (c==','){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit comma after arg:" + arg);
return new this._ParseResult(this._stringToMcoArgument(arg, sourceElement, clientEvent),
nextChar,this._ParseResult.COMMA_ENCOUNTERED);
//TODO check for all whitespace here or someplace else?
@@ -274,9 +264,6 @@
//if we hit a ) we are also done
else if (c==')'){
-
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit a close paren");
//an empty thing is fine if for example we got
//myMco.doSomething()
@@ -311,16 +298,12 @@
//so you can't do something like
//text="{ }"
if (parseResult==null){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Exited loop without a parse result at all");
return new this._ParseResult(this._stringToMcoArgument(arg,sourceElement, clientEvent),
args.length-1,this._ParseResult.END_OF_STRING);
}
//if there was a parse result just set the terminating index up properly
else{
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Exited loop with a parse result");
parseResult._terminatingIndex = args.length-1;
parseResult._parseStatus = this._ParseResult.END_OF_STRING;
return parseResult;
@@ -335,8 +318,8 @@
* @private
*/
xap.session.DeclarativeArgumentParser.prototype._parseArguments = function( argumentsString, sourceElement, index, clientEvent){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Parse arguments: " + argumentsString + " at index " + index);
+ if (this._log.isTrace())
+ this._log.trace("Parse arguments: " + argumentsString + " at index " + index);
var args = new Array();
//keep calling parseAgument until we are done,
//then stick all the results in an object[]
@@ -346,12 +329,10 @@
//why do we do +1 here? because if the last terminating character
//was , we need to start our search one AFTER the comma!
var result = this.parseArgument(argumentsString,argumentStart+1,sourceElement, clientEvent);
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Got back result " + result._resultObject);
+ if (this._log.isTrace())
+ this._log.trace("Got back result " + result._resultObject);
if (result._resultObject!=null){
args.push(result._resultObject);
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Push result: " + result._resultObject);
argumentStart = result._terminatingIndex;
if (result._parseStatus==this._ParseResult.CLOSING_PAREN){
break;
@@ -368,8 +349,8 @@
break;
}
}
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Return parse result: " + args);
+ if (this._log.isTrace())
+ this._log.trace("Return parse result: " + args);
return new this._ParseResult(args,argumentStart);
}
@@ -402,12 +383,8 @@
xap.session.DeclarativeArgumentParser.prototype._stringToMcoArgument =
function(arg, thisElement, clientEvent){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Convert string [" + arg + "] to argument");
arg = arg.trim();
if (arg.indexOf(":")!=-1){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Found a colon, convert to object reference");
var index = arg.indexOf(":");
var containerName = arg.substring(0,index);
var mcoName = arg.substring(index+1);
@@ -428,20 +405,14 @@
//note that this RETURNS a macro and does not RUN it!
}
else if (arg=="true") {
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Found true");
//TODO do we have to do this sort of thing, can we rely on JS type conversion stuff?
return true ;
}
else if (arg=="false"){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Found false");
return false ;
}
else{
var num = parseFloat(arg);
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Converted to float: " + num);
if (!isNaN(num)){
return num;
}
@@ -449,8 +420,6 @@
//TODO do we really want to do this?
if (arg=="event"){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Found event string");
return clientEvent;
}
@@ -468,14 +437,10 @@
if (!element && elementName=="this"){
element = thisElement;
}
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Found element: " + element);
if (element){
if (!elementAttribute) return element;
var attributeValue = element.getAttribute(elementAttribute);
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("FOund attribute: " + attributeValue);
if (!attributeValue) attributeValue = "";
return attributeValue;
@@ -534,7 +499,7 @@
}
- if (xap.util.LogFactory.s_loggingEnabled)
+ if (this._log.isTrace())
xap.session.DeclarativeArgumentParser.s_log.debug("Fire object event [" + methodName +"] on the object " + mcoName +
" with arguments " + args);
try{
@@ -560,8 +525,8 @@
xap.session.DeclarativeArgumentParser.prototype._parseString = function(args, startIndex, terminatingCharacter){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Parse string :" + args + " at start index " + startIndex);
+ if (this._log.isTrace())
+ this._log.trace("Parse string :" + args + " at start index " + startIndex);
var result = new this._ParseResult(null,startIndex);
var arg = new String();
startIndex++; //first must be a " or '
@@ -578,8 +543,6 @@
//if we got the terminating char we are done
if (c==terminatingCharacter){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.session.DeclarativeArgumentParser.s_log.debug("Hit terminating char " + c + " result string=" + arg);
result._resultObject = arg;
result._terminatingIndex = nextChar;
break;
Modified: incubator/xap/trunk/codebase/src/xap/taghandling/PluginDocumentHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/taghandling/PluginDocumentHandler.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/taghandling/PluginDocumentHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/taghandling/PluginDocumentHandler.js Sun Feb 11 21:53:11 2007
@@ -60,7 +60,7 @@
}
/** @private */
-xap.taghandling.PluginDocumentHandler.s_log = xap.util.LogFactory.getLog( "xap.taghandling.PluginDocumentHandler" );
+xap.taghandling.PluginDocumentHandler.s_log = xap.log.Logger.getLogger( "xap.taghandling.PluginDocumentHandler" );
//-----------------------------------------------------------------------
@@ -119,7 +119,7 @@
//IMPORTANT all handlers should have some unload or some
//other lifecycle notification, we should come up with something
- //better than unload
+ //better than unload. Use removedFromContainer instead??
if (handler.unload){
handler.unload();
}
@@ -147,9 +147,8 @@
Xap.require( bridgeClassName );
handlerConstructor = Xap.resolveConstructor(bridgeClassName ) ;
} catch (classNotLoadableException){
- xap.taghandling.PluginDocumentHandler.s_log.exception( "Exception while loading '"
- + bridgeClassName +"'"
- + classNotLoadableException.toString() );
+ xap.taghandling.PluginDocumentHandler.s_log.error( "Exception while loading: " + bridgeClassName,
+ classNotLoadableException );
// If we didn't create a new handler just now,
// handler==null, so this.setHandlerForElement below
@@ -190,12 +189,10 @@
//if the implementing class name is null do what we used to do
//and print out an error
if ( bridgeClass == null ) {
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.taghandling.PluginDocumentHandler.s_log.debug( "No mapping for tag name [" +
+ if (xap.taghandling.PluginDocumentHandler.s_log.isWarn())
+ xap.taghandling.PluginDocumentHandler.s_log.warn( "No mapping for tag name [" +
tagName + "] with namespace [" +
namespace + "] on document [" + this._documentName + "]");
- xap.taghandling.PluginDocumentHandler.s_log.error( "No mapping found for tag " +
- tagName + ", namespace=" + namespace );
return null;
}
//if it's not a string this means it is a valid tag but
@@ -212,8 +209,7 @@
handler = this.obtainHandler( bridgeClass ) ;
}
catch( ex ) {
- xap.taghandling.PluginDocumentHandler.s_log.exception( "Exception during eval:" +
- ex.toString() );
+ xap.taghandling.PluginDocumentHandler.s_log.error( "Exception during eval", ex);
//if that fails, try again with just the stuff after the
//last period. For example if we tried:
@@ -230,8 +226,7 @@
handler = this.obtainHandler( bridgeClass ) ;
}
catch(ex2){
- xap.taghandling.PluginDocumentHandler.s_log.exception( "Exception during eval:" +
- ex.toString() );
+ xap.taghandling.PluginDocumentHandler.s_log.error( "Exception during eval", ex);
// If we didn't create a new handler just now,
// handler==null, so this.setHandlerForElement below
Modified: incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js (original)
+++ incubator/xap/trunk/codebase/src/xap/taghandling/PluginRegistryImpl.js Sun Feb 11 21:53:11 2007
@@ -23,7 +23,7 @@
Xap.require("xap.util.Hashtable");
Xap.require("google.xpath");
Xap.require("xap.xml.ParserFactory");
-Xap.require("xap.util.LogFactory");
+Xap.require("xap.log.Logger");
/**
* @fileoverview Work in progress.
@@ -57,7 +57,7 @@
this._session = session;
}
-xap.taghandling.PluginRegistryImpl.s_log = xap.util.LogFactory.getLog( "xap.taghandling.PluginRegistryImpl" );
+xap.taghandling.PluginRegistryImpl.s_log = xap.log.Logger.getLogger( "xap.taghandling.PluginRegistryImpl" );
xap.taghandling.PluginRegistryImpl.TAG_MAPPINGS_PATH = "/plugin/tag-mappings";
@@ -80,7 +80,9 @@
*/
xap.taghandling.PluginRegistryImpl.prototype.addPluginDescription = function( fileContents ){
- if (xap.util.LogFactory.s_loggingEnabled) xap.taghandling.PluginRegistryImpl.s_log.debug("Add plugin description");
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace("Add plugin description");
+
var parser = xap.xml.ParserFactory.getParser();
var pluginDocument = null;
@@ -96,13 +98,17 @@
//TODO this returs what an array of nodes?
var tagMappingSections =
google.xpathDomEval(xap.taghandling.PluginRegistryImpl.TAG_MAPPINGS_PATH , pluginDocument);
- xap.taghandling.PluginRegistryImpl.s_log.debug(tagMappingSections.value.length + " mapped tags");
+
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace(tagMappingSections.value.length + " mapped tags");
this._parseTagMappingElements(tagMappingSections.value,true);
- if (xap.util.LogFactory.s_loggingEnabled) xap.taghandling.PluginRegistryImpl.s_log.debug("Parse unmapped tags");
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace("Parse unmapped tags");
tagMappingSections =
google.xpathDomEval(xap.taghandling.PluginRegistryImpl.UNMAPPED_TAGS_PATH , pluginDocument);
- if (xap.util.LogFactory.s_loggingEnabled) xap.taghandling.PluginRegistryImpl.s_log.debug(tagMappingSections.value.length + " unmapped tags");
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace(tagMappingSections.value.length + " unmapped tags");
this._parseTagMappingElements(tagMappingSections.value,false);
//TODO this returns an array but we want a string, get the first element node value?
@@ -117,8 +123,8 @@
xap.taghandling.PluginRegistryImpl.prototype.loadLifecycleObject = function( lifecycleClassName ){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.taghandling.PluginRegistryImpl.s_log.debug("lifecycle class = " + lifecycleClassName);
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace("lifecycle class = " + lifecycleClassName);
if (lifecycleClassName){
try{
@@ -212,12 +218,11 @@
tagName = tagElement.getAttribute("name");
if (tagName==null || tagName.length==0){
- if (xap.util.LogFactory.s_loggingEnabled)
+ if (xap.taghandling.PluginRegistryImpl.s_log.isError())
xap.taghandling.PluginRegistryImpl.s_log.error(
"Missing tag name (\"local name\") from tag element:\n"
+ tagElement
- +"\n...; mapping will continue for other tag defs."
- ) ;
+ +"\n...; mapping will continue for other tag defs.") ;
continue;
}
@@ -239,7 +244,8 @@
}
- xap.taghandling.PluginRegistryImpl.s_log.debug("Add tag mapping:" + tagName + ":" + className);
+ if (xap.taghandling.PluginRegistryImpl.s_log.isTrace())
+ xap.taghandling.PluginRegistryImpl.s_log.trace("Add tag mapping:" + tagName + ":" + className);
this._addTagMapping(tagName,className,nameSpace,documentName,tagElement);
}
}
Modified: incubator/xap/trunk/codebase/src/xap/util/HttpUtils.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/HttpUtils.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/HttpUtils.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/HttpUtils.js Sun Feb 11 21:53:11 2007
@@ -35,12 +35,11 @@
*/
Xap.provide("xap.util.HttpUtils");
Xap.require("xap.requestservice.HttpRequest");
-Xap.require("xap.util.LogFactory");
xap.util.HttpUtils = function () {
};
-xap.util.HttpUtils.s_log = xap.util.LogFactory.getLog("HttpUtils");
+
xap.util.HttpUtils.OK = 200;
xap.util.HttpUtils.URI_NA = 404;
if (window.XMLHttpRequest) {
Modified: incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js Sun Feb 11 21:53:11 2007
@@ -18,7 +18,7 @@
*/
Xap.provide( "xap.util.ResourceDictionary" ) ;
-Xap.require('xap.util.LogFactory');
+Xap.require('xap.log.Logger');
Xap.require("xap.util.MessageFormat");
Xap.require("xap.util.Hashtable");
@@ -39,7 +39,7 @@
// Class Variables.
//-------------------------------------------------------------------
xap.util.ResourceDictionary.s_classnameToResourceObject = new xap.util.Hashtable();
-xap.util.ResourceDictionary.s_log = xap.util.LogFactory.getLog( "xap.util.ResourceDictionary" );
+xap.util.ResourceDictionary.s_log = xap.log.Logger.getLogger( "xap.util.ResourceDictionary" );
//-------------------------------------------------------------------
// Public Class Methods.
@@ -53,9 +53,9 @@
resourceObject = eval ( "new " + className + "Res();" );
xap.util.ResourceDictionary.s_classnameToResourceObject.put( className, resourceObject );
} catch ( e ){
- xap.util.ResourceDictionary.s_log.exception( "Exception getting message:" +
+ xap.util.ResourceDictionary.s_log.error( "Exception getting message:" +
"id=" + msgId + ",classname=" + className +
- ", args:" + args + ", exception:" + e );
+ ", args:" + args + ", exception:" + e , e);
}
}
if( resourceObject ) {
Modified: incubator/xap/trunk/codebase/src/xap/xml/NamespaceHandlerManager.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/xml/NamespaceHandlerManager.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/xml/NamespaceHandlerManager.js (original)
+++ incubator/xap/trunk/codebase/src/xap/xml/NamespaceHandlerManager.js Sun Feb 11 21:53:11 2007
@@ -56,7 +56,7 @@
/** @private */
-xap.xml.NamespaceHandlerManager.s_log = xap.util.LogFactory.getLog( "xap.xml.NamespaceHandler" );
+xap.xml.NamespaceHandlerManager.s_log = xap.log.Logger.getLogger( "xap.xml.NamespaceHandler" );
//-----------------------------------------------------------------------
@@ -73,8 +73,8 @@
try {
handler.receiveDispatch( element );
} catch ( e ) {
- if (xap.xml.NamespaceHandlerManager.s_log.isDebug()){
- xap.xml.NamespaceHandlerManager.s_log.debug( "xap.xml.NamespaceHandler.dispatch:" + e );
+ if (xap.xml.NamespaceHandlerManager.s_log.isTrace()){
+ xap.xml.NamespaceHandlerManager.s_log.trace( "xap.xml.NamespaceHandler.dispatch:" + e );
}
throw new xap.xml.sax.ParserException(
xap.xml.sax.ParserException.NAMESPACE_HANDLER_FAILURE,
Modified: incubator/xap/trunk/codebase/src/xap/xml/XalNamespaceHandler.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/xml/XalNamespaceHandler.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/xml/XalNamespaceHandler.js (original)
+++ incubator/xap/trunk/codebase/src/xap/xml/XalNamespaceHandler.js Sun Feb 11 21:53:11 2007
@@ -18,8 +18,6 @@
*/
Xap.provide( "xap.xml.XalNamespaceHandler" ) ;
-
-Xap.require( "xap.util.LogFactory" ) ;
/**
* @fileoverview Handles the xal namespace when it is at the first
@@ -53,7 +51,7 @@
//-----------------------------------------------------------------------
// Class variables.
//-----------------------------------------------------------------------
-xap.xml.XalNamespaceHandler.s_log = xap.util.LogFactory.getLog( "xap.xml.XalNamespaceHandler" );
+xap.xml.XalNamespaceHandler.s_log = xap.log.Logger.getLogger( "xap.xml.XalNamespaceHandler" );
//-----------------------------------------------------------------------
@@ -76,9 +74,8 @@
* @throws UpdateException
*/
xap.xml.XalNamespaceHandler.prototype.receiveDispatch = function( element ) {
- if (xap.xml.XalNamespaceHandler.s_log.isDebug()){
- if (xap.util.LogFactory.s_loggingEnabled)
- xap.xml.XalNamespaceHandler.s_log.debug("receiveDispatch:" + element);
+ if (xap.xml.XalNamespaceHandler.s_log.isTrace()){
+ xap.xml.XalNamespaceHandler.s_log.trace("receiveDispatch:" + element);
}
//get the root and just append to it
Modified: incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js?view=diff&rev=506298&r1=506297&r2=506298
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js (original)
+++ incubator/xap/trunk/codebase/src/xap/xml/dom/XapElement.js Sun Feb 11 21:53:11 2007
@@ -142,7 +142,7 @@
xap.xml.dom.XapElement.ENCODE_EVERYTHING_IN_ATTRIBUTES = 2;
/** @private */
-xap.xml.dom.XapElement.s_log = xap.util.LogFactory.getLog( "xap.xml.dom.DocumentObjectModel" );
+xap.xml.dom.XapElement.s_log = xap.log.Logger.getLogger( "xap.xml.dom.DocumentObjectModel" );
//-----------------------------------------------------------------------
// Public Class Methods.
@@ -722,7 +722,7 @@
i = i - 1;
}
} catch ( t ) {
- xap.xml.dom.XapElement.s_log.exception
+ xap.xml.dom.XapElement.s_log.error
( xap.util.ResourceDictionary.getMessage
( xap.xml.dom.XapElement.DOC_OWNERSHIP_FAILURE,
xap.xml.dom.XapElement.CLASSNAME ), t );
@@ -743,7 +743,7 @@
i = i - 1;
}
} catch ( t ) {
- xap.xml.dom.XapElement.s_log.exception
+ xap.xml.dom.XapElement.s_log.error
( xap.util.ResourceDictionary.getMessage
( xap.xml.dom.XapElement.DOC_OWNERSHIP_FAILURE,
xap.xml.dom.XapElement.CLASSNAME ), t );