Skip to content
Browse files

refactor remove deprecated members of environment.WidgetSettings

Removed the following methods and cfgBeans members:
getWidgetLib()
getWidgetLibClassName()
defaultWidgetLib

The supported equivalents are:
aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs,
aria.widgetLibs.environment.WidgetLibsSettingsCfgBeans.AppCfg.defaultWidgetLibs
and Aria.getClassRef.
  • Loading branch information...
1 parent 48a5586 commit b2e09a3ed037858fc46020793bc1791c57f81514 @jakub-g committed Mar 4, 2013
View
11 src/aria/widgetLibs/environment/WidgetLibsSettings.js
@@ -37,16 +37,7 @@ Aria.classDefinition({
getWidgetLibs : function () {
var res = this.checkApplicationSettings("defaultWidgetLibs");
- /* BACKWARD-COMPATIBILITY-BEGIN */
- var ariaLib = this.checkApplicationSettings("defaultWidgetLib");
- if (ariaLib) {
- // make a copy before changing the value:
- res = aria.utils.Json.copy(res, false);
- res.aria = ariaLib;
- }
- /* BACKWARD-COMPATIBILITY-END */
-
return res;
}
}
-});
+});
View
29 src/aria/widgets/environment/WidgetSettings.js
@@ -22,8 +22,7 @@
Aria.classDefinition({
$classpath : "aria.widgets.environment.WidgetSettings",
$extends : "aria.core.environment.EnvironmentBase",
- $dependencies : ["aria.widgets.environment.WidgetSettingsCfgBeans",
- /* BACKWARD-COMPATIBILITY-BEGIN */"aria.widgetLibs.environment.WidgetLibsSettings"/* BACKWARD-COMPATIBILITY-END */],
+ $dependencies : ["aria.widgets.environment.WidgetSettingsCfgBeans"],
$singleton : true,
$prototype : {
/**
@@ -33,30 +32,6 @@ Aria.classDefinition({
_cfgPackage : "aria.widgets.environment.WidgetSettingsCfgBeans.AppCfg",
/**
- * This method is deprecated. There is no longer a single default library. Instead of this method, you can
- * consider using the getWidgetLibs method in aria.widgetLibs.environment.WidgetLibsSettings, along with
- * Aria.getClassRef.
- * @public
- * @return {Object}
- * @deprecated
- */
- getWidgetLib : function () {
- return Aria.getClassRef(this.getWidgetLibClassName());
- },
-
- /**
- * This method is deprecated. There is no longer a single default library. Instead of this method, you can
- * consider using the getWidgetLibs method in aria.widgetLibs.environment.WidgetLibsSettings.
- * @public
- * @return {String}
- * @deprecated
- */
- getWidgetLibClassName : function () {
- this.$logWarn("The getWidgetLibClassName and getWidgetLib methods are deprecated. There is no longer a single default library. Instead of these methods, you can consider using the getWidgetLibs method in aria.widgetLibs.environment.WidgetLibsSettings.");
- return aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs().aria;
- },
-
- /**
* Returns the widget settings
* @public
* @return {aria.widgets.environment.WidgetSettingsCfgBeans.AppCfg.WidgetSettingsCfg}
@@ -66,4 +41,4 @@ Aria.classDefinition({
}
}
-});
+});
View
6 src/aria/widgets/environment/WidgetSettingsCfgBeans.js
@@ -33,10 +33,6 @@ Aria.beanDefinitions({
$type : "WidgetSettingsCfg",
$description : "Default widget settings for the application",
$default : {}
- },
- "defaultWidgetLib" : {
- $type : "json:String",
- $description : "Deprecated. There is no longer a single default library. Please use defaultWidgetLibs instead (defined in aria.widgetLibs.environment.WidgetLibsSettingsCfgBeans.AppCfg)."
}
}
},
@@ -78,4 +74,4 @@ Aria.beanDefinitions({
}
}
}
-});
+});
View
29 test/aria/widgetLibs/environment/WidgetLibsSettingsTest.js
@@ -18,11 +18,7 @@
*/
Aria.classDefinition({
$classpath : 'test.aria.widgetLibs.environment.WidgetLibsSettingsTest',
- $dependencies : ['aria.widgetLibs.environment.WidgetLibsSettings'
- /* BACKWARD-COMPATIBILITY-BEGIN */
- , "aria.widgets.environment.WidgetSettings"
- /* BACKWARD-COMPATIBILITY-END */
- ],
+ $dependencies : ['aria.widgetLibs.environment.WidgetLibsSettings'],
$extends : 'aria.jsunit.TestCase',
$prototype : {
testGetWidgetLibs : function () {
@@ -32,17 +28,6 @@ Aria.classDefinition({
aria : "aria.widgets.AriaLib"
}, "Invalid default environment value for defaultWidgetLibs");
- /* BACKWARD-COMPATIBILITY-BEGIN */
- aria.core.AppEnvironment.setEnvironment({
- defaultWidgetLib : "aria.wlibsTest.OtherWidgetLib"
- });
- widgetLibs = aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs();
- this.assertJsonEquals(widgetLibs, {
- aria : "aria.wlibsTest.OtherWidgetLib"
- }, "Invalid environment value for defaultWidgetLibs");
- aria.core.AppEnvironment.setEnvironment({});
- /* BACKWARD-COMPATIBILITY-END */
-
aria.core.AppEnvironment.setEnvironment({
defaultWidgetLibs : {
a : "aria.a.ALib",
@@ -57,11 +42,6 @@ Aria.classDefinition({
b : "aria.b.BLib"
}, "Invalid default environment value for defaultWidgetLibs");
- /* BACKWARD-COMPATIBILITY-BEGIN */
- var ariaLibClassName = aria.widgets.environment.WidgetSettings.getWidgetLibClassName();
- this.assertTrue(ariaLibClassName == null);
- /* BACKWARD-COMPATIBILITY-END */
-
aria.core.AppEnvironment.setEnvironment({});
aria.core.AppEnvironment.setEnvironment({
@@ -80,11 +60,6 @@ Aria.classDefinition({
b : "aria.b.BLib"
}, "Invalid default environment value for defaultWidgetLibs");
- /* BACKWARD-COMPATIBILITY-BEGIN */
- ariaLibClassName = aria.widgets.environment.WidgetSettings.getWidgetLibClassName();
- this.assertTrue(ariaLibClassName === "aria.a.NewAriaLib");
- /* BACKWARD-COMPATIBILITY-END */
-
aria.core.AppEnvironment.setEnvironment({});
// test again the default value
widgetLibs = aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs();
@@ -94,4 +69,4 @@ Aria.classDefinition({
}
}
-});
+});
View
16 test/aria/widgets/environment/WidgetSettings.js
@@ -18,20 +18,6 @@ Aria.classDefinition({
$extends : "aria.jsunit.TestCase",
$dependencies : ["aria.widgets.environment.WidgetSettings"],
$prototype : {
- testGetSetWidgetLibClassName : function () {
- aria.core.AppEnvironment.setEnvironment({
- defaultWidgetLib : "aria.widgets.NewAriaLib"
- });
-
- var settings = aria.widgets.environment.WidgetSettings.getWidgetLibClassName();
- this.assertTrue(settings === "aria.widgets.NewAriaLib");
-
- aria.core.AppEnvironment.setEnvironment({});
-
- settings = aria.widgets.environment.WidgetSettings.getWidgetLibClassName();
- this.assertTrue(settings === "aria.widgets.AriaLib");
- },
-
testGetSetWidgetSettings : function () {
aria.core.AppEnvironment.setEnvironment({
widgetSettings : {
@@ -106,4 +92,4 @@ Aria.classDefinition({
});
}
}
-});
+});

0 comments on commit b2e09a3

Please sign in to comment.
Something went wrong with that request. Please try again.