dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25871
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12844: more Filter => MetaDataFilter* renamings
------------------------------------------------------------
revno: 12844
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2013-10-31 12:04:50 +0100
message:
more Filter => MetaDataFilter* renamings
removed:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultFilterService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateFilterStore.java
added:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterService.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultMetaDataFilterService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateMetaDataFilterStore.java
modified:
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/FilterListAction.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/GetFilterListSortOrderAction.java
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/SaveFilterListSortOrderAction.java
dhis-2/dhis-web/dhis-web-importexport/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/filter/FilterService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterService.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterService.java 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
-package org.hisp.dhis.filter;
-
-/*
- * Copyright (c) 2004-2013, 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.util.Collection;
-
-/**
- * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
- */
-public interface FilterService
-{
- MetaDataFilter getFilter( Integer id );
-
- MetaDataFilter getFilterByUid( String uid );
-
- Collection<MetaDataFilter> getAllFilters();
-
- Collection<MetaDataFilter> getFiltersBetweenByName( String name, int first, int max );
-
- Collection<MetaDataFilter> getFiltersBetween( int first, int max );
-
- void saveFilter( MetaDataFilter metaDataFilter );
-
- void updateFilter( MetaDataFilter metaDataFilter );
-
- void deleteFilter( MetaDataFilter metaDataFilter );
-
- int getFilterCountByName( String name );
-
- int getFilterCount();
-}
=== removed file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterStore.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/FilterStore.java 1970-01-01 00:00:00 +0000
@@ -1,39 +0,0 @@
-package org.hisp.dhis.filter;
-
-/*
- * Copyright (c) 2004-2013, 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 org.hisp.dhis.common.GenericIdentifiableObjectStore;
-
-/**
- * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
- */
-public interface FilterStore
- extends GenericIdentifiableObjectStore<MetaDataFilter>
-{
-}
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterService.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterService.java 2013-10-31 11:04:50 +0000
@@ -0,0 +1,57 @@
+package org.hisp.dhis.filter;
+
+/*
+ * Copyright (c) 2004-2013, 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.util.Collection;
+
+/**
+ * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
+ */
+public interface MetaDataFilterService
+{
+ MetaDataFilter getFilter( Integer id );
+
+ MetaDataFilter getFilterByUid( String uid );
+
+ Collection<MetaDataFilter> getAllFilters();
+
+ Collection<MetaDataFilter> getFiltersBetweenByName( String name, int first, int max );
+
+ Collection<MetaDataFilter> getFiltersBetween( int first, int max );
+
+ void saveFilter( MetaDataFilter metaDataFilter );
+
+ void updateFilter( MetaDataFilter metaDataFilter );
+
+ void deleteFilter( MetaDataFilter metaDataFilter );
+
+ int getFilterCountByName( String name );
+
+ int getFilterCount();
+}
=== added file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterStore.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/filter/MetaDataFilterStore.java 2013-10-31 11:04:50 +0000
@@ -0,0 +1,39 @@
+package org.hisp.dhis.filter;
+
+/*
+ * Copyright (c) 2004-2013, 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 org.hisp.dhis.common.GenericIdentifiableObjectStore;
+
+/**
+ * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
+ */
+public interface MetaDataFilterStore
+ extends GenericIdentifiableObjectStore<MetaDataFilter>
+{
+}
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultFilterService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultFilterService.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultFilterService.java 1970-01-01 00:00:00 +0000
@@ -1,136 +0,0 @@
-package org.hisp.dhis.filter;
-
-/*
- * Copyright (c) 2004-2013, 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 org.hisp.dhis.i18n.I18nService;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.Collection;
-
-import static org.hisp.dhis.i18n.I18nUtils.*;
-
-/**
- * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
- */
-@Transactional
-public class DefaultFilterService
- implements FilterService
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- private FilterStore filterStore;
-
- public FilterStore getFilterStore()
- {
- return filterStore;
- }
-
- public void setFilterStore( FilterStore filterStore )
- {
- this.filterStore = filterStore;
- }
-
- private I18nService i18nService;
-
- public I18nService getI18nService()
- {
- return i18nService;
- }
-
- public void setI18nService( I18nService i18nService )
- {
- this.i18nService = i18nService;
- }
-
- // -------------------------------------------------------------------------
- // Logic
- // -------------------------------------------------------------------------
-
- @Override
- public MetaDataFilter getFilter( Integer id )
- {
- return filterStore.get( id );
- }
-
- @Override
- public MetaDataFilter getFilterByUid( String uid )
- {
- return filterStore.getByUid( uid );
- }
-
- @Override
- public Collection<MetaDataFilter> getAllFilters()
- {
- return filterStore.getAll();
- }
-
- @Override
- public Collection<MetaDataFilter> getFiltersBetweenByName( String name, int first, int max )
- {
- return getObjectsBetweenByName( i18nService, filterStore, name, first, max );
- }
-
- @Override
- public Collection<MetaDataFilter> getFiltersBetween( int first, int max )
- {
- return getObjectsBetween( i18nService, filterStore, first, max );
- }
-
- @Override
- public void saveFilter( MetaDataFilter metaDataFilter )
- {
- filterStore.save( metaDataFilter );
- }
-
- @Override
- public void updateFilter( MetaDataFilter metaDataFilter )
- {
- filterStore.update( metaDataFilter );
- }
-
- @Override
- public void deleteFilter( MetaDataFilter metaDataFilter )
- {
- filterStore.delete( metaDataFilter );
- }
-
- @Override
- public int getFilterCountByName( String name )
- {
- return getCountByName( i18nService, filterStore, name );
- }
-
- @Override
- public int getFilterCount()
- {
- return filterStore.getCount();
- }
-}
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultMetaDataFilterService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultMetaDataFilterService.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/filter/DefaultMetaDataFilterService.java 2013-10-31 11:04:50 +0000
@@ -0,0 +1,136 @@
+package org.hisp.dhis.filter;
+
+/*
+ * Copyright (c) 2004-2013, 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 org.hisp.dhis.i18n.I18nService;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Collection;
+
+import static org.hisp.dhis.i18n.I18nUtils.*;
+
+/**
+ * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
+ */
+@Transactional
+public class DefaultMetaDataFilterService
+ implements MetaDataFilterService
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private MetaDataFilterStore metaDataFilterStore;
+
+ public MetaDataFilterStore getMetaDataFilterStore()
+ {
+ return metaDataFilterStore;
+ }
+
+ public void setMetaDataFilterStore( MetaDataFilterStore metaDataFilterStore )
+ {
+ this.metaDataFilterStore = metaDataFilterStore;
+ }
+
+ private I18nService i18nService;
+
+ public I18nService getI18nService()
+ {
+ return i18nService;
+ }
+
+ public void setI18nService( I18nService i18nService )
+ {
+ this.i18nService = i18nService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Logic
+ // -------------------------------------------------------------------------
+
+ @Override
+ public MetaDataFilter getFilter( Integer id )
+ {
+ return metaDataFilterStore.get( id );
+ }
+
+ @Override
+ public MetaDataFilter getFilterByUid( String uid )
+ {
+ return metaDataFilterStore.getByUid( uid );
+ }
+
+ @Override
+ public Collection<MetaDataFilter> getAllFilters()
+ {
+ return metaDataFilterStore.getAll();
+ }
+
+ @Override
+ public Collection<MetaDataFilter> getFiltersBetweenByName( String name, int first, int max )
+ {
+ return getObjectsBetweenByName( i18nService, metaDataFilterStore, name, first, max );
+ }
+
+ @Override
+ public Collection<MetaDataFilter> getFiltersBetween( int first, int max )
+ {
+ return getObjectsBetween( i18nService, metaDataFilterStore, first, max );
+ }
+
+ @Override
+ public void saveFilter( MetaDataFilter metaDataFilter )
+ {
+ metaDataFilterStore.save( metaDataFilter );
+ }
+
+ @Override
+ public void updateFilter( MetaDataFilter metaDataFilter )
+ {
+ metaDataFilterStore.update( metaDataFilter );
+ }
+
+ @Override
+ public void deleteFilter( MetaDataFilter metaDataFilter )
+ {
+ metaDataFilterStore.delete( metaDataFilter );
+ }
+
+ @Override
+ public int getFilterCountByName( String name )
+ {
+ return getCountByName( i18nService, metaDataFilterStore, name );
+ }
+
+ @Override
+ public int getFilterCount()
+ {
+ return metaDataFilterStore.getCount();
+ }
+}
=== removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateFilterStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateFilterStore.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateFilterStore.java 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
-package org.hisp.dhis.metadatafilter.hibernate;
-
-/*
- * Copyright (c) 2004-2013, 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 org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-import org.hisp.dhis.filter.MetaDataFilter;
-import org.hisp.dhis.filter.FilterStore;
-
-/**
- * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
- */
-public class HibernateFilterStore
- extends HibernateIdentifiableObjectStore<MetaDataFilter>
- implements FilterStore
-{
-}
=== added file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateMetaDataFilterStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateMetaDataFilterStore.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/metadatafilter/hibernate/HibernateMetaDataFilterStore.java 2013-10-31 11:04:50 +0000
@@ -0,0 +1,42 @@
+package org.hisp.dhis.metadatafilter.hibernate;
+
+/*
+ * Copyright (c) 2004-2013, 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 org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
+import org.hisp.dhis.filter.MetaDataFilter;
+import org.hisp.dhis.filter.MetaDataFilterStore;
+
+/**
+ * @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
+ */
+public class HibernateMetaDataFilterStore
+ extends HibernateIdentifiableObjectStore<MetaDataFilter>
+ implements MetaDataFilterStore
+{
+}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-10-31 11:04:50 +0000
@@ -56,7 +56,7 @@
</bean>
<!--@author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>-->
- <bean id="org.hisp.dhis.filter.FilterStore" class="org.hisp.dhis.metadatafilter.hibernate.HibernateFilterStore">
+ <bean id="org.hisp.dhis.filter.MetaDataFilterStore" class="org.hisp.dhis.metadatafilter.hibernate.HibernateMetaDataFilterStore">
<property name="clazz" value="org.hisp.dhis.filter.MetaDataFilter" />
<property name="sessionFactory" ref="sessionFactory" />
<property name="cacheable" value="true" />
@@ -591,8 +591,8 @@
</bean>
<!--@author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>-->
- <bean id="org.hisp.dhis.filter.FilterService" class="org.hisp.dhis.filter.DefaultFilterService">
- <property name="filterStore" ref="org.hisp.dhis.filter.FilterStore" />
+ <bean id="org.hisp.dhis.filter.MetaDataFilterService" class="org.hisp.dhis.filter.DefaultMetaDataFilterService">
+ <property name="metaDataFilterStore" ref="org.hisp.dhis.filter.MetaDataFilterStore" />
<property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
</bean>
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/DefaultExportService.java 2013-10-31 11:04:50 +0000
@@ -36,7 +36,7 @@
import org.hisp.dhis.common.IdentifiableObject;
import org.hisp.dhis.common.IdentifiableObjectManager;
import org.hisp.dhis.filter.MetaDataFilter;
-import org.hisp.dhis.filter.FilterService;
+import org.hisp.dhis.filter.MetaDataFilterService;
import org.hisp.dhis.scheduling.TaskId;
import org.hisp.dhis.system.notification.NotificationLevel;
import org.hisp.dhis.system.notification.Notifier;
@@ -78,7 +78,7 @@
private MetaDataDependencyService metaDataDependencyService;
@Autowired
- private FilterService filterService;
+ private MetaDataFilterService metaDataFilterService;
//-------------------------------------------------------------------------------------------------------
// ExportService Implementation - MetaData
@@ -234,7 +234,7 @@
@Override
public List<MetaDataFilter> getFilters()
{
- return (List<MetaDataFilter>) filterService.getAllFilters();
+ return (List<MetaDataFilter>) metaDataFilterService.getAllFilters();
}
@Override
@@ -245,26 +245,26 @@
metaDataFilter.setJsonFilter( json.getString( "jsonFilter" ) );
metaDataFilter.setAutoFields();
- filterService.saveFilter( metaDataFilter );
+ metaDataFilterService.saveFilter( metaDataFilter );
}
@Override
public void updateFilter( JSONObject json ) throws IOException
{
- MetaDataFilter metaDataFilter = filterService.getFilterByUid( json.getString( "uid" ) );
+ MetaDataFilter metaDataFilter = metaDataFilterService.getFilterByUid( json.getString( "uid" ) );
metaDataFilter.setName( json.getString( "name" ) );
metaDataFilter.setDescription( json.getString( "description" ) );
metaDataFilter.setJsonFilter( json.getString( "jsonFilter" ) );
metaDataFilter.setLastUpdated( new Date() );
- filterService.updateFilter( metaDataFilter );
+ metaDataFilterService.updateFilter( metaDataFilter );
}
@Override
public void deleteFilter( JSONObject json ) throws IOException
{
- MetaDataFilter metaDataFilter = filterService.getFilterByUid( json.getString( "uid" ) );
+ MetaDataFilter metaDataFilter = metaDataFilterService.getFilterByUid( json.getString( "uid" ) );
- filterService.deleteFilter( metaDataFilter );
+ metaDataFilterService.deleteFilter( metaDataFilter );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/FilterListAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/FilterListAction.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/FilterListAction.java 2013-10-31 11:04:50 +0000
@@ -29,7 +29,7 @@
import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
import org.hisp.dhis.filter.MetaDataFilter;
-import org.hisp.dhis.filter.FilterService;
+import org.hisp.dhis.filter.MetaDataFilterService;
import org.hisp.dhis.paging.ActionPagingSupport;
import java.util.ArrayList;
@@ -42,17 +42,17 @@
* @author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>
*/
public class FilterListAction
- extends ActionPagingSupport<MetaDataFilter>
+ extends ActionPagingSupport<MetaDataFilter>
{
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
- private FilterService filterService;
+ private MetaDataFilterService metaDataFilterService;
- public void setFilterService( FilterService filterService )
+ public void setMetaDataFilterService( MetaDataFilterService metaDataFilterService )
{
- this.filterService = filterService;
+ this.metaDataFilterService = metaDataFilterService;
}
// -------------------------------------------------------------------------
@@ -92,14 +92,15 @@
{
if ( isNotBlank( key ) ) // Filter on key only if set
{
- this.paging = createPaging( filterService.getFilterCountByName( key ) );
+ this.paging = createPaging( metaDataFilterService.getFilterCountByName( key ) );
- filters = new ArrayList<MetaDataFilter>( filterService.getFiltersBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
- } else
+ filters = new ArrayList<MetaDataFilter>( metaDataFilterService.getFiltersBetweenByName( key, paging.getStartPos(), paging.getPageSize() ) );
+ }
+ else
{
- this.paging = createPaging( filterService.getFilterCount() );
+ this.paging = createPaging( metaDataFilterService.getFilterCount() );
- filters = new ArrayList<MetaDataFilter>( filterService.getFiltersBetween( paging.getStartPos(), paging.getPageSize() ) );
+ filters = new ArrayList<MetaDataFilter>( metaDataFilterService.getFiltersBetween( paging.getStartPos(), paging.getPageSize() ) );
}
Collections.sort( filters, IdentifiableObjectNameComparator.INSTANCE );
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/GetFilterListSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/GetFilterListSortOrderAction.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/GetFilterListSortOrderAction.java 2013-10-31 11:04:50 +0000
@@ -29,7 +29,7 @@
import com.opensymphony.xwork2.Action;
import org.hisp.dhis.filter.MetaDataFilter;
-import org.hisp.dhis.filter.FilterService;
+import org.hisp.dhis.filter.MetaDataFilterService;
import java.util.ArrayList;
import java.util.List;
@@ -44,11 +44,11 @@
// Dependencies
// -------------------------------------------------------------------------
- private FilterService filterService;
+ private MetaDataFilterService metaDataFilterService;
- public void setFilterService( FilterService filterService )
+ public void setMetaDataFilterService( MetaDataFilterService metaDataFilterService )
{
- this.filterService = filterService;
+ this.metaDataFilterService = metaDataFilterService;
}
// -------------------------------------------------------------------------
@@ -74,7 +74,7 @@
@Override
public String execute() throws Exception
{
- filters = new ArrayList<MetaDataFilter>( filterService.getAllFilters() );
+ filters = new ArrayList<MetaDataFilter>( metaDataFilterService.getAllFilters() );
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/SaveFilterListSortOrderAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/SaveFilterListSortOrderAction.java 2013-10-31 10:29:22 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/dxf2/SaveFilterListSortOrderAction.java 2013-10-31 11:04:50 +0000
@@ -29,7 +29,7 @@
import com.opensymphony.xwork2.Action;
import org.hisp.dhis.filter.MetaDataFilter;
-import org.hisp.dhis.filter.FilterService;
+import org.hisp.dhis.filter.MetaDataFilterService;
import java.util.List;
@@ -43,11 +43,11 @@
// Dependencies
// -------------------------------------------------------------------------
- private FilterService filterService;
+ private MetaDataFilterService metaDataFilterService;
- public void setFilterService( FilterService filterService )
+ public void setMetaDataFilterService( MetaDataFilterService metaDataFilterService )
{
- this.filterService = filterService;
+ this.metaDataFilterService = metaDataFilterService;
}
// -------------------------------------------------------------------------
@@ -71,11 +71,11 @@
for ( String id : filters )
{
- MetaDataFilter metaDataFilter = filterService.getFilter( Integer.parseInt( id ) );
+ MetaDataFilter metaDataFilter = metaDataFilterService.getFilter( Integer.parseInt( id ) );
metaDataFilter.setSortOrder( sortOrder++ );
- filterService.updateFilter( metaDataFilter );
+ metaDataFilterService.updateFilter( metaDataFilter );
}
return SUCCESS;
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-10-30 12:51:03 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/META-INF/dhis/beans.xml 2013-10-31 11:04:50 +0000
@@ -211,17 +211,17 @@
<!--@author Ovidiu Rosu <rosu.ovi@xxxxxxxxx>-->
<bean id="org.hisp.dhis.importexport.action.dxf2.FilterListAction"
class="org.hisp.dhis.importexport.action.dxf2.FilterListAction" scope="prototype">
- <property name="filterService" ref="org.hisp.dhis.filter.FilterService" />
+ <property name="metaDataFilterService" ref="org.hisp.dhis.filter.MetaDataFilterService" />
</bean>
<bean id="org.hisp.dhis.importexport.action.dxf2.GetFilterListSortOrderAction"
class="org.hisp.dhis.importexport.action.dxf2.GetFilterListSortOrderAction" scope="prototype">
- <property name="filterService" ref="org.hisp.dhis.filter.FilterService" />
+ <property name="metaDataFilterService" ref="org.hisp.dhis.filter.MetaDataFilterService" />
</bean>
<bean id="org.hisp.dhis.importexport.action.dxf2.SaveFilterListSortOrderAction"
class="org.hisp.dhis.importexport.action.dxf2.SaveFilterListSortOrderAction" scope="prototype">
- <property name="filterService" ref="org.hisp.dhis.filter.FilterService" />
+ <property name="metaDataFilterService" ref="org.hisp.dhis.filter.MetaDataFilterService" />
</bean>
<bean id="org.hisp.dhis.importexport.action.dxf2.FilterExportFormAction"