dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14256
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4779: Removed UserSettingManager, merged into UserSettingService
------------------------------------------------------------
revno: 4779
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-09-30 12:24:49 +0200
message:
Removed UserSettingManager, merged into UserSettingService
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/UserSettingManager.java
dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/setting/DefaultUserSettingManager.java
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java
dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultUserStyleManager.java
dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/SetCurrentDataDictionaryAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentChartsInDashboardAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/UserSettingManager.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/UserSettingManager.java 2011-09-30 09:50:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/UserSettingManager.java 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
-package org.hisp.dhis.options;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.Serializable;
-
-/**
- * @author mortenoh
- */
-public interface UserSettingManager
-{
- final String ID = UserSettingManager.class.getName();
-
- final String KEY_CURRENT_DATADICTIONARY = "currentDataDictionary";
-
- public Serializable getUserSetting( String key );
-
- public void saveUserSetting( String key, Serializable value );
-}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java 2011-09-30 09:50:17 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserSettingService.java 2011-09-30 10:24:49 +0000
@@ -45,12 +45,11 @@
final String AUTO_SAVE_DATA_ENTRY_FORM = "autoSaveDataEntryForm";
final String KEY_CHARTS_IN_DASHBOARD = "keyChartsInDashboard";
+ final String KEY_CURRENT_DATADICTIONARY = "currentDataDictionary";
final int DEFAULT_CHARTS_IN_DASHBOARD = 4;
final List<Integer> DASHBOARD_CHARTS_TO_DISPLAY = Arrays.asList( 4, 6, 8 );
- public static final String KEY_DASHBOARD_CHARTS_TO_DISPLAY = "keyDashboardChartsToDisplay";
-
/**
* Saves the name/value pair as a user setting connected to the currently
* logged in user.
=== removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/setting/DefaultUserSettingManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/setting/DefaultUserSettingManager.java 2011-09-30 09:50:17 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/setting/DefaultUserSettingManager.java 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
-package org.hisp.dhis.options.setting;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- * be used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import java.io.Serializable;
-
-import org.hisp.dhis.options.UserSettingManager;
-import org.hisp.dhis.user.UserSettingService;
-
-public class DefaultUserSettingManager
- implements UserSettingManager
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private UserSettingService userSettingService;
-
- public void setUserSettingService( UserSettingService userSettingService )
- {
- this.userSettingService = userSettingService;
- }
-
- // -------------------------------------------------------------------------
- // UserSettingManager implementation
- // -------------------------------------------------------------------------
-
- public Serializable getUserSetting( String key )
- {
- return userSettingService.getUserSetting( key );
- }
-
- public void saveUserSetting( String key, Serializable value )
- {
- userSettingService.saveUserSetting( key, value );
- }
-}
=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultUserStyleManager.java'
--- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultUserStyleManager.java 2011-09-30 09:19:11 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/style/DefaultUserStyleManager.java 2011-09-30 10:24:49 +0000
@@ -34,9 +34,7 @@
/**
* @author Chau Thu Tran
- * @version DefaultUserStyleManager.java 2010-10-26 20:08:27Z $
*/
-
public class DefaultUserStyleManager
implements UserStyleManager
{
=== modified file 'dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 08:52:43 +0000
+++ dhis-2/dhis-services/dhis-service-options/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 10:24:49 +0000
@@ -323,8 +323,4 @@
<bean id="org.hisp.dhis.options.help.HelpManager" class="org.hisp.dhis.options.help.DefaultHelpManager" />
- <bean id="org.hisp.dhis.options.UserSettingManager" class="org.hisp.dhis.options.setting.DefaultUserSettingManager">
- <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
- </bean>
-
</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/SetCurrentDataDictionaryAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/SetCurrentDataDictionaryAction.java 2011-09-30 08:52:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/datadictionary/SetCurrentDataDictionaryAction.java 2011-09-30 10:24:49 +0000
@@ -27,7 +27,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.options.UserSettingManager;
+import org.hisp.dhis.user.UserSettingService;
import com.opensymphony.xwork2.Action;
@@ -42,11 +42,11 @@
// Dependencies
// -------------------------------------------------------------------------
- private UserSettingManager userSettingManager;
+ private UserSettingService userSettingService;
- public void setUserSettingManager( UserSettingManager userSettingManager )
+ public void setUserSettingService( UserSettingService userSettingService )
{
- this.userSettingManager = userSettingManager;
+ this.userSettingService = userSettingService;
}
// -------------------------------------------------------------------------
@@ -66,7 +66,7 @@
public String execute()
{
- userSettingManager.saveUserSetting( UserSettingManager.KEY_CURRENT_DATADICTIONARY, id );
+ userSettingService.saveUserSetting( UserSettingService.KEY_CURRENT_DATADICTIONARY, id );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java 2011-09-30 08:52:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/dataelement/GetDataElementListAction.java 2011-09-30 10:24:49 +0000
@@ -28,7 +28,7 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.options.UserSettingManager.KEY_CURRENT_DATADICTIONARY;
+import static org.hisp.dhis.user.UserSettingService.KEY_CURRENT_DATADICTIONARY;
import java.util.ArrayList;
import java.util.Collections;
@@ -40,9 +40,9 @@
import org.hisp.dhis.datadictionary.comparator.DataDictionaryNameComparator;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.options.UserSettingManager;
import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import org.hisp.dhis.paging.ActionPagingSupport;
+import org.hisp.dhis.user.UserSettingService;
/**
* @author Torgeir Lorange Ostby
@@ -61,11 +61,11 @@
this.dataElementService = dataElementService;
}
- private UserSettingManager userSettingManager;
+ private UserSettingService userSettingService;
- public void setUserSettingManager( UserSettingManager userSettingManager )
+ public void setUserSettingService( UserSettingService userSettingService )
{
- this.userSettingManager = userSettingManager;
+ this.userSettingService = userSettingService;
}
private DataDictionaryService dataDictionaryService;
@@ -151,17 +151,17 @@
{
if ( dataDictionaryId == null ) // None, get current data dictionary
{
- dataDictionaryId = (Integer) userSettingManager.getUserSetting( KEY_CURRENT_DATADICTIONARY );
+ dataDictionaryId = (Integer) userSettingService.getUserSetting( KEY_CURRENT_DATADICTIONARY );
}
else if ( dataDictionaryId == -1 ) // All, reset current data dictionary
{
- userSettingManager.saveUserSetting( KEY_CURRENT_DATADICTIONARY, null );
+ userSettingService.saveUserSetting( KEY_CURRENT_DATADICTIONARY, null );
dataDictionaryId = null;
}
else // Specified, set current data dictionary
{
- userSettingManager.saveUserSetting( KEY_CURRENT_DATADICTIONARY, dataDictionaryId );
+ userSettingService.saveUserSetting( KEY_CURRENT_DATADICTIONARY, dataDictionaryId );
}
dataDictionaries = new ArrayList<DataDictionary>( dataDictionaryService.getAllDataDictionaries() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java 2011-09-30 08:52:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/indicator/GetIndicatorListAction.java 2011-09-30 10:24:49 +0000
@@ -28,7 +28,7 @@
*/
import static org.apache.commons.lang.StringUtils.isNotBlank;
-import static org.hisp.dhis.options.UserSettingManager.KEY_CURRENT_DATADICTIONARY;
+import static org.hisp.dhis.user.UserSettingService.*;
import java.util.ArrayList;
import java.util.Collections;
@@ -40,9 +40,9 @@
import org.hisp.dhis.datadictionary.comparator.DataDictionaryNameComparator;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorService;
-import org.hisp.dhis.options.UserSettingManager;
import org.hisp.dhis.options.displayproperty.DisplayPropertyHandler;
import org.hisp.dhis.paging.ActionPagingSupport;
+import org.hisp.dhis.user.UserSettingService;
/**
* @author Torgeir Lorange Ostby
@@ -63,11 +63,11 @@
this.indicatorService = indicatorService;
}
- private UserSettingManager userSettingManager;
+ private UserSettingService userSettingService;
- public void setUserSettingManager( UserSettingManager userSettingManager )
+ public void setUserSettingService( UserSettingService userSettingService )
{
- this.userSettingManager = userSettingManager;
+ this.userSettingService = userSettingService;
}
private DataDictionaryService dataDictionaryService;
@@ -153,17 +153,17 @@
{
if ( dataDictionaryId == null ) // None, get current data dictionary
{
- dataDictionaryId = (Integer) userSettingManager.getUserSetting( KEY_CURRENT_DATADICTIONARY );
+ dataDictionaryId = (Integer) userSettingService.getUserSetting( KEY_CURRENT_DATADICTIONARY );
}
else if ( dataDictionaryId == -1 ) // All, reset current data dictionary
{
- userSettingManager.saveUserSetting( KEY_CURRENT_DATADICTIONARY, null );
+ userSettingService.saveUserSetting( KEY_CURRENT_DATADICTIONARY, null );
dataDictionaryId = null;
}
else // Specified, set current data dictionary
{
- userSettingManager.saveUserSetting( KEY_CURRENT_DATADICTIONARY, dataDictionaryId );
+ userSettingService.saveUserSetting( KEY_CURRENT_DATADICTIONARY, dataDictionaryId );
}
dataDictionaries = new ArrayList<DataDictionary>( dataDictionaryService.getAllDataDictionaries() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 08:52:43 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 10:24:49 +0000
@@ -10,8 +10,8 @@
<property name="dataElementService">
<ref bean="org.hisp.dhis.dataelement.DataElementService" />
</property>
- <property name="userSettingManager">
- <ref bean="org.hisp.dhis.options.UserSettingManager" />
+ <property name="userSettingService">
+ <ref bean="org.hisp.dhis.user.UserSettingService" />
</property>
<property name="dataDictionaryService">
<ref bean="org.hisp.dhis.datadictionary.DataDictionaryService" />
@@ -420,8 +420,8 @@
<property name="indicatorService">
<ref bean="org.hisp.dhis.indicator.IndicatorService" />
</property>
- <property name="userSettingManager">
- <ref bean="org.hisp.dhis.options.UserSettingManager" />
+ <property name="userSettingService">
+ <ref bean="org.hisp.dhis.user.UserSettingService" />
</property>
<property name="dataDictionaryService">
<ref bean="org.hisp.dhis.datadictionary.DataDictionaryService" />
@@ -542,8 +542,8 @@
<bean id="org.hisp.dhis.dd.action.datadictionary.SetCurrentDataDictionaryAction" class="org.hisp.dhis.dd.action.datadictionary.SetCurrentDataDictionaryAction"
scope="prototype">
- <property name="userSettingManager">
- <ref bean="org.hisp.dhis.options.UserSettingManager" />
+ <property name="userSettingService">
+ <ref bean="org.hisp.dhis.user.UserSettingService" />
</property>
</bean>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java 2011-06-09 14:43:14 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/GetAvailableUserSettingsAction.java 2011-09-30 10:24:49 +0000
@@ -37,7 +37,6 @@
import org.hisp.dhis.i18n.I18nService;
import org.hisp.dhis.i18n.locale.LocaleManager;
import org.hisp.dhis.i18n.resourcebundle.ResourceBundleManager;
-import org.hisp.dhis.options.UserSettingManager;
import org.hisp.dhis.options.displayproperty.DisplayPropertyManager;
import org.hisp.dhis.options.sortorder.SortOrderManager;
import org.hisp.dhis.options.style.StyleManager;
@@ -46,6 +45,8 @@
import com.opensymphony.xwork2.Action;
+import static org.hisp.dhis.user.UserSettingService.*;
+
/**
* @author Chau Thu Tran
* @version $ GetAvailableUserSettingsAction.java May 31, 2011 9:31:54 AM $
@@ -86,13 +87,6 @@
this.sortOrderManager = sortOrderManager;
}
- private UserSettingManager userSettingManager;
-
- public void setUserSettingManager( UserSettingManager userSettingManager )
- {
- this.userSettingManager = userSettingManager;
- }
-
private UserSettingService userSettingService;
public void setUserSettingService( UserSettingService userSettingService )
@@ -272,9 +266,9 @@
// Get Charts in Dashboard
// ---------------------------------------------------------------------
- chartsInDashboard = userSettingManager.getChartsInDashboard();
+ chartsInDashboard = (Integer) userSettingService.getUserSetting( KEY_CHARTS_IN_DASHBOARD, DEFAULT_CHARTS_IN_DASHBOARD );
- chartsInDashboardOptions = userSettingManager.getChartsInDashboardOptions();
+ chartsInDashboardOptions = UserSettingService.DASHBOARD_CHARTS_TO_DISPLAY;
// ---------------------------------------------------------------------
// Get Display Properties
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentChartsInDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentChartsInDashboardAction.java 2011-04-06 11:39:06 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/java/org/hisp/dhis/settings/action/user/SetCurrentChartsInDashboardAction.java 2011-09-30 10:24:49 +0000
@@ -27,18 +27,20 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import org.hisp.dhis.options.UserSettingManager;
+import org.hisp.dhis.user.UserSettingService;
import com.opensymphony.xwork2.Action;
+import static org.hisp.dhis.user.UserSettingService.*;
+
public class SetCurrentChartsInDashboardAction
implements Action
{
- private UserSettingManager userSettingManager;
+ private UserSettingService userSettingService;
- public void setUserSettingManager( UserSettingManager userSettingManager )
+ public void setUserSettingService( UserSettingService userSettingService )
{
- this.userSettingManager = userSettingManager;
+ this.userSettingService = userSettingService;
}
private Integer chartsInDashboard;
@@ -52,7 +54,7 @@
public String execute()
throws Exception
{
- userSettingManager.saveUserSetting( UserSettingManager.KEY_CHARTS_IN_DASHBOARD, chartsInDashboard );
+ userSettingService.saveUserSetting( KEY_CHARTS_IN_DASHBOARD, chartsInDashboard );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-06-23 14:44:17 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/META-INF/dhis/beans.xml 2011-09-30 10:24:49 +0000
@@ -42,9 +42,6 @@
<property name="sortOrderManager">
<ref bean="org.hisp.dhis.options.sortorder.SortOrderManager" />
</property>
- <property name="userSettingManager">
- <ref bean="org.hisp.dhis.options.UserSettingManager" />
- </property>
<property name="displayPropertyManager">
<ref bean="org.hisp.dhis.options.displayproperty.DisplayPropertyManager" />
</property>
@@ -82,8 +79,8 @@
<bean id="org.hisp.dhis.settings.action.user.SetCurrentChartsInDashboardAction" class="org.hisp.dhis.settings.action.user.SetCurrentChartsInDashboardAction"
scope="prototype">
- <property name="userSettingManager">
- <ref bean="org.hisp.dhis.options.UserSettingManager" />
+ <property name="userSettingService">
+ <ref bean="org.hisp.dhis.user.UserSettingService" />
</property>
</bean>