=== added directory 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/options' === added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSetting.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSetting.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSetting.java 2011-05-26 11:45:58 +0000 @@ -0,0 +1,84 @@ +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 Stian Strandli + * @version $Id: SystemSetting.java 3340 2007-06-03 04:01:04Z hanssto $ + */ +public class SystemSetting +{ + private int id; + + private String name; + + private Serializable value; + + public SystemSetting() + { + + } + + public boolean hasValue() + { + return value != null; + } + + public int getId() + { + return id; + } + + public void setId( int id ) + { + this.id = id; + } + + public String getName() + { + return name; + } + + public void setName( String name ) + { + this.name = name; + } + + public Serializable getValue() + { + return value; + } + + public void setValue( Serializable value ) + { + this.value = value; + } + +} === added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-05-26 11:45:58 +0000 @@ -0,0 +1,86 @@ +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; +import java.util.Collection; +import java.util.List; +import java.util.SortedMap; + +/** + * @author Stian Strandli + * @version $Id: SystemSettingManager.java 4910 2008-04-15 17:55:02Z larshelg $ + */ +public interface SystemSettingManager +{ + final String ID = SystemSettingManager.class.getName(); + + final String KEY_SYSTEM_IDENTIFIER = "keySystemIdentifier"; + final String KEY_APPLICATION_TITLE = "applicationTitle"; + final String KEY_FLAG = "flag"; + final String KEY_START_MODULE = "startModule"; + final String KEY_FORUM_INTEGRATION = "forumIntegration"; + final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart"; + final String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory"; + final String KEY_MAX_NUMBER_OF_ATTEMPTS = "maxAttempts"; + final String KEY_TIMEFRAME_MINUTES = "lockoutTimeframe"; + final String KEY_GOOGLE_MAPS_API_KEY = "googleMapsAPIKey"; + final String KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED = "dataEntryFormCompleted"; + final String KEY_FACTOR_OF_DEVIATION = "factorDeviation"; + final String KEY_AGGREGATION_STRATEGY = "aggregationStrategy"; + final String KEY_COMPLETENESS_OFFSET = "completenessOffset"; + final String KEY_PATIENT_EXCEL_TEMPLATE_FILE_NAME = "patientExcelTemplateFileName"; + final String KEY_DATAMART_TASK = "keyDataMartTask"; + final String KEY_DATASETCOMPLETENESS_TASK = "keyDataSetCompletenessTask"; + + final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20; + final int DEFAULT_TIMEFRAME_MINUTES = 1; + final double DEFAULT_FACTOR_OF_DEVIATION = 2.0; + + final String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w"; + final String AGGREGATION_STRATEGY_REAL_TIME = "real_time"; + final String AGGREGATION_STRATEGY_BATCH = "batch"; + final String DEFAULT_AGGREGATION_STRATEGY = AGGREGATION_STRATEGY_REAL_TIME; + final int DEFAULT_COMPLETENESS_OFFSET = 15; + + void saveSystemSetting( String name, Serializable value ); + + Serializable getSystemSetting( String name ); + + Serializable getSystemSetting( String name, Serializable defaultValue ); + + Collection getAllSystemSettings(); + + void deleteSystemSetting( String name ); + + SortedMap getFlags(); + + List getAggregationStrategies(); + + String getSystemIdentifier(); +} === added 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 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/options/UserSettingManager.java 2011-05-26 11:45:58 +0000 @@ -0,0 +1,54 @@ +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; +import java.util.Arrays; +import java.util.List; + +/** + * @author mortenoh + */ +public interface UserSettingManager +{ + final String ID = UserSettingManager.class.getName(); + + final String KEY_CHARTS_IN_DASHBOARD = "keyChartsInDashboard"; + + final int DEFAULT_CHARTS_IN_DASHBOARD = 4; + + final List DASHBOARD_CHARTS_TO_DISPLAY = Arrays.asList( 4, 6, 8 ); + + public Serializable getUserSetting( String key ); + + public void saveUserSetting( String key, Serializable value ); + + public List getChartsInDashboardOptions(); + + public Integer getChartsInDashboard(); +} === removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSetting.java' --- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSetting.java 2010-04-12 21:23:33 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSetting.java 1970-01-01 00:00:00 +0000 @@ -1,84 +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 Stian Strandli - * @version $Id: SystemSetting.java 3340 2007-06-03 04:01:04Z hanssto $ - */ -public class SystemSetting -{ - private int id; - - private String name; - - private Serializable value; - - public SystemSetting() - { - - } - - public boolean hasValue() - { - return value != null; - } - - public int getId() - { - return id; - } - - public void setId( int id ) - { - this.id = id; - } - - public String getName() - { - return name; - } - - public void setName( String name ) - { - this.name = name; - } - - public Serializable getValue() - { - return value; - } - - public void setValue( Serializable value ) - { - this.value = value; - } - -} === removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java' --- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 2011-05-14 19:32:53 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/SystemSettingManager.java 1970-01-01 00:00:00 +0000 @@ -1,86 +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; -import java.util.Collection; -import java.util.List; -import java.util.SortedMap; - -/** - * @author Stian Strandli - * @version $Id: SystemSettingManager.java 4910 2008-04-15 17:55:02Z larshelg $ - */ -public interface SystemSettingManager -{ - final String ID = SystemSettingManager.class.getName(); - - final String KEY_SYSTEM_IDENTIFIER = "keySystemIdentifier"; - final String KEY_APPLICATION_TITLE = "applicationTitle"; - final String KEY_FLAG = "flag"; - final String KEY_START_MODULE = "startModule"; - final String KEY_FORUM_INTEGRATION = "forumIntegration"; - final String KEY_OMIT_INDICATORS_ZERO_NUMERATOR_DATAMART = "omitIndicatorsZeroNumeratorDataMart"; - final String KEY_REPORT_TEMPLATE_DIRECTORY = "reportTemplateDirectory"; - final String KEY_MAX_NUMBER_OF_ATTEMPTS = "maxAttempts"; - final String KEY_TIMEFRAME_MINUTES = "lockoutTimeframe"; - final String KEY_GOOGLE_MAPS_API_KEY = "googleMapsAPIKey"; - final String KEY_DISABLE_DATAENTRYFORM_WHEN_COMPLETED = "dataEntryFormCompleted"; - final String KEY_FACTOR_OF_DEVIATION = "factorDeviation"; - final String KEY_AGGREGATION_STRATEGY = "aggregationStrategy"; - final String KEY_COMPLETENESS_OFFSET = "completenessOffset"; - final String KEY_PATIENT_EXCEL_TEMPLATE_FILE_NAME = "patientExcelTemplateFileName"; - final String KEY_DATAMART_TASK = "keyDataMartTask"; - final String KEY_DATASETCOMPLETENESS_TASK = "keyDataSetCompletenessTask"; - - final int DEFAULT_MAX_NUMBER_OF_ATTEMPTS = 20; - final int DEFAULT_TIMEFRAME_MINUTES = 1; - final double DEFAULT_FACTOR_OF_DEVIATION = 2.0; - - final String DEFAULT_GOOGLE_MAPS_API_KEY = "ABQIAAAAut6AhySExnYIXm5s2OFIkxRKNzJ-_9njnryRTbvC6CtrS4sRvRREWnxwlZUa630pLuPf3nD9i4fq9w"; - final String AGGREGATION_STRATEGY_REAL_TIME = "real_time"; - final String AGGREGATION_STRATEGY_BATCH = "batch"; - final String DEFAULT_AGGREGATION_STRATEGY = AGGREGATION_STRATEGY_REAL_TIME; - final int DEFAULT_COMPLETENESS_OFFSET = 15; - - void saveSystemSetting( String name, Serializable value ); - - Serializable getSystemSetting( String name ); - - Serializable getSystemSetting( String name, Serializable defaultValue ); - - Collection getAllSystemSettings(); - - void deleteSystemSetting( String name ); - - SortedMap getFlags(); - - List getAggregationStrategies(); - - String getSystemIdentifier(); -} === removed file 'dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/UserSettingManager.java' --- dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/UserSettingManager.java 2011-04-07 07:21:11 +0000 +++ dhis-2/dhis-services/dhis-service-options/src/main/java/org/hisp/dhis/options/UserSettingManager.java 1970-01-01 00:00:00 +0000 @@ -1,54 +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; -import java.util.Arrays; -import java.util.List; - -/** - * @author mortenoh - */ -public interface UserSettingManager -{ - final String ID = UserSettingManager.class.getName(); - - final String KEY_CHARTS_IN_DASHBOARD = "keyChartsInDashboard"; - - final int DEFAULT_CHARTS_IN_DASHBOARD = 4; - - final List DASHBOARD_CHARTS_TO_DISPLAY = Arrays.asList( 4, 6, 8 ); - - public Serializable getUserSetting( String key ); - - public void saveUserSetting( String key, Serializable value ); - - public List getChartsInDashboardOptions(); - - public Integer getChartsInDashboard(); -}