diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/SortDirection.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SortDirection.java similarity index 97% rename from dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/SortDirection.java rename to dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SortDirection.java index 66231ac4ce6a..60abd8544d75 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/SortDirection.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/SortDirection.java @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.webapi.controller.event.mapper; +package org.hisp.dhis.common; import java.util.Arrays; import lombok.AllArgsConstructor; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/OrderParam.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/OrderParam.java index 652ae26483b1..1b461abea13d 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/OrderParam.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/mapper/OrderParam.java @@ -28,6 +28,7 @@ package org.hisp.dhis.webapi.controller.event.mapper; import lombok.Value; +import org.hisp.dhis.common.SortDirection; /** * Order parameter container to use within services. diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteria.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteria.java index c3d3a686e4c3..225eeecddc25 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteria.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteria.java @@ -35,8 +35,8 @@ import lombok.AllArgsConstructor; import lombok.Value; import org.apache.commons.lang3.StringUtils; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.webapi.controller.event.mapper.OrderParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; /** * This class is used as a container for order parameters and is deserialized from web requests diff --git a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/program/EnrollmentQueryParamsTest.java b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/program/EnrollmentQueryParamsTest.java index dba18b111d02..949654215422 100644 --- a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/program/EnrollmentQueryParamsTest.java +++ b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/program/EnrollmentQueryParamsTest.java @@ -31,8 +31,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import com.google.common.collect.ImmutableList; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.webapi.controller.event.mapper.OrderParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.Test; class EnrollmentQueryParamsTest { diff --git a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteriaTest.java b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteriaTest.java index a443b4059b94..bead3fb09dfc 100644 --- a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteriaTest.java +++ b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/OrderCriteriaTest.java @@ -33,7 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.List; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; +import org.hisp.dhis.common.SortDirection; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; diff --git a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/PagingAndSortingCriteriaAdapterTest.java b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/PagingAndSortingCriteriaAdapterTest.java index 255a66b66169..a0b1daa34ee7 100644 --- a/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/PagingAndSortingCriteriaAdapterTest.java +++ b/dhis-2/dhis-api/src/test/java/org/hisp/dhis/webapi/controller/event/webrequest/PagingAndSortingCriteriaAdapterTest.java @@ -39,7 +39,7 @@ import java.util.List; import java.util.stream.Collectors; import lombok.SneakyThrows; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; +import org.hisp.dhis.common.SortDirection; import org.junit.jupiter.api.Test; class PagingAndSortingCriteriaAdapterTest { diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/params/AnalyticsSortingParams.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/params/AnalyticsSortingParams.java index 8cb12f170279..841d54ab4320 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/params/AnalyticsSortingParams.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/params/AnalyticsSortingParams.java @@ -31,7 +31,7 @@ import lombok.Data; import org.hisp.dhis.analytics.common.params.dimension.DimensionIdentifier; import org.hisp.dhis.analytics.common.params.dimension.DimensionParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; +import org.hisp.dhis.common.SortDirection; /** This class represents the sorting parameters for analytics. */ @Data diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/processing/CommonQueryRequestMapper.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/processing/CommonQueryRequestMapper.java index f735f5ce3e3f..89da313b3257 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/processing/CommonQueryRequestMapper.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/processing/CommonQueryRequestMapper.java @@ -74,11 +74,11 @@ import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.common.IllegalQueryException; import org.hisp.dhis.common.QueryItem; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramService; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.springframework.stereotype.Component; /** diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/query/Order.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/query/Order.java index 2391a496c228..eb55af840edd 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/query/Order.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/common/query/Order.java @@ -27,11 +27,11 @@ */ package org.hisp.dhis.analytics.common.query; -import static org.hisp.dhis.webapi.controller.event.mapper.SortDirection.DESC; +import static org.hisp.dhis.common.SortDirection.DESC; import lombok.Builder; import lombok.RequiredArgsConstructor; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; +import org.hisp.dhis.common.SortDirection; @Builder(toBuilder = true) @RequiredArgsConstructor(staticName = "of") diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/tei/query/TeiSqlQueryTest.java b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/tei/query/TeiSqlQueryTest.java index 8ea5e9d286da..175055a58e27 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/tei/query/TeiSqlQueryTest.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/test/java/org/hisp/dhis/analytics/tei/query/TeiSqlQueryTest.java @@ -55,10 +55,10 @@ import org.hisp.dhis.analytics.tei.query.context.sql.SqlQueryCreatorService; import org.hisp.dhis.common.BaseDimensionalObject; import org.hisp.dhis.common.DimensionalObject; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramIndicatorService; import org.hisp.dhis.program.ProgramStage; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/Order.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/Order.java index 62fc5d1a1cb4..7680ee5cb9ff 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/Order.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/Order.java @@ -28,9 +28,9 @@ package org.hisp.dhis.tracker.export; import lombok.Value; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; /** * Tracker exporter APIs allow ordering by different types. For example events can be ordered by diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParams.java index f7fc475dcc22..3f1fbb94ddbc 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParams.java @@ -37,9 +37,9 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; import org.hisp.dhis.common.OrganisationUnitSelectionMode; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.program.ProgramStatus; import org.hisp.dhis.tracker.export.Order; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; @Getter @Builder(toBuilder = true) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentQueryParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentQueryParams.java index d80e33fd2c5a..00baa1f3b2ac 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentQueryParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentQueryParams.java @@ -36,6 +36,7 @@ import lombok.Data; import lombok.experimental.Accessors; import org.hisp.dhis.common.OrganisationUnitSelectionMode; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramStatus; @@ -43,7 +44,6 @@ import org.hisp.dhis.trackedentity.TrackedEntityType; import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; /** * @author Morten Olav Hansen diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventOperationParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventOperationParams.java index 6ad66809acee..c513a29dd18a 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventOperationParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventOperationParams.java @@ -44,12 +44,12 @@ import org.hisp.dhis.common.IdSchemes; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.program.ProgramStatus; import org.hisp.dhis.program.ProgramType; import org.hisp.dhis.tracker.export.Order; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; @Getter @Builder(toBuilder = true) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQueryParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQueryParams.java index b1561121d31b..2b66185db7a0 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQueryParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/event/EventQueryParams.java @@ -43,6 +43,7 @@ import org.hisp.dhis.common.IdSchemes; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -53,7 +54,6 @@ import org.hisp.dhis.trackedentity.TrackedEntity; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; import org.hisp.dhis.tracker.export.Order; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; /** * @author Lars Helge Overland diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/HibernateRelationshipStore.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/HibernateRelationshipStore.java index 8268b2f94719..d9272e293951 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/HibernateRelationshipStore.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/HibernateRelationshipStore.java @@ -42,6 +42,7 @@ import javax.persistence.criteria.Subquery; import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.common.Pager; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.hibernate.SoftDeleteHibernateObjectStore; import org.hisp.dhis.hibernate.JpaQueryParameters; import org.hisp.dhis.program.Enrollment; @@ -54,7 +55,6 @@ import org.hisp.dhis.tracker.export.Page; import org.hisp.dhis.tracker.export.PageParams; import org.hisp.dhis.user.CurrentUserService; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.springframework.context.ApplicationEventPublisher; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Repository; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParams.java index dad9871f5419..9ff33a76e336 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParams.java @@ -33,9 +33,9 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.tracker.TrackerType; import org.hisp.dhis.tracker.export.Order; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; @Getter @Builder(toBuilder = true) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParams.java index e7f2dc653070..d539c7b0dfa6 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParams.java @@ -41,12 +41,12 @@ import org.hisp.dhis.common.AssignedUserQueryParam; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.program.ProgramStatus; import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; @Getter @Builder(toBuilder = true) diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityQueryParams.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityQueryParams.java index 843512052ae3..5adba3dd20f8 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityQueryParams.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityQueryParams.java @@ -46,6 +46,7 @@ import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; @@ -55,7 +56,6 @@ import org.hisp.dhis.trackedentity.TrackedEntityType; import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; @ToString public class TrackedEntityQueryParams { diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParamsMapperTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParamsMapperTest.java index 8a4ec8584c05..5a91d1a7f39c 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParamsMapperTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/enrollment/EnrollmentOperationParamsMapperTest.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Set; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -54,7 +55,6 @@ import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventOperationParamsMapperTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventOperationParamsMapperTest.java index dddd35ce9537..67d087f49a31 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventOperationParamsMapperTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventOperationParamsMapperTest.java @@ -61,6 +61,7 @@ import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; @@ -80,7 +81,6 @@ import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserRole; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventQueryParamsTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventQueryParamsTest.java index 5db323d59b87..8f1119cc9b92 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventQueryParamsTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/event/EventQueryParamsTest.java @@ -36,10 +36,10 @@ import org.hisp.dhis.DhisConvenienceTest; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.trackedentity.TrackedEntityAttribute; import org.hisp.dhis.tracker.export.Order; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParamsMapperTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParamsMapperTest.java index 9c9869df0e91..1794da669b7c 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParamsMapperTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipOperationParamsMapperTest.java @@ -38,6 +38,7 @@ import java.util.List; import org.hisp.dhis.DhisConvenienceTest; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.feedback.NotFoundException; import org.hisp.dhis.organisationunit.OrganisationUnit; @@ -53,7 +54,6 @@ import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParamsMapperTest.java b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParamsMapperTest.java index 3d9e1fd28b5c..d9f46ab82ae2 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParamsMapperTest.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/tracker/export/trackedentity/TrackedEntityOperationParamsMapperTest.java @@ -57,6 +57,7 @@ import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.feedback.BadRequestException; @@ -76,7 +77,6 @@ import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/deduplication/DeduplicationServiceIntegrationTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/deduplication/DeduplicationServiceIntegrationTest.java index 1d20feeb6eaf..963157bf5699 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/deduplication/DeduplicationServiceIntegrationTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/deduplication/DeduplicationServiceIntegrationTest.java @@ -37,10 +37,10 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.test.integration.IntegrationTestBase; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserService; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityServiceTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityServiceTest.java index 7880f7fbdd17..1f8f6622939b 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityServiceTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityServiceTest.java @@ -43,6 +43,7 @@ import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryItem; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; import org.hisp.dhis.program.Enrollment; @@ -60,7 +61,6 @@ import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserService; import org.hisp.dhis.webapi.controller.event.mapper.OrderParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/OrderAndPaginationExporterTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/OrderAndPaginationExporterTest.java index 6a6c1fcbf173..e24430d1bbfd 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/OrderAndPaginationExporterTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/OrderAndPaginationExporterTest.java @@ -50,6 +50,7 @@ import org.hisp.dhis.common.Pager; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.feedback.ForbiddenException; @@ -77,7 +78,6 @@ import org.hisp.dhis.tracker.imports.TrackerImportParams; import org.hisp.dhis.tracker.imports.TrackerImportService; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -520,7 +520,7 @@ void shouldOrderTrackedEntitiesByMultipleAttributesDesc() @Test void shouldReturnPaginatedEnrollmentsGivenNonDefaultPageSize() - throws ForbiddenException, BadRequestException, NotFoundException { + throws ForbiddenException, BadRequestException { EnrollmentOperationParams operationParams = EnrollmentOperationParams.builder() .orgUnitUids(Set.of(orgUnit.getUid())) @@ -552,7 +552,7 @@ void shouldReturnPaginatedEnrollmentsGivenNonDefaultPageSize() @Test void shouldReturnPaginatedEnrollmentsGivenNonDefaultPageSizeAndTotalPages() - throws ForbiddenException, BadRequestException, NotFoundException { + throws ForbiddenException, BadRequestException { EnrollmentOperationParams operationParams = EnrollmentOperationParams.builder() .orgUnitUids(Set.of(orgUnit.getUid())) @@ -584,7 +584,7 @@ void shouldReturnPaginatedEnrollmentsGivenNonDefaultPageSizeAndTotalPages() @Test void shouldOrderEnrollmentsByPrimaryKeyDescByDefault() - throws ForbiddenException, BadRequestException, NotFoundException { + throws ForbiddenException, BadRequestException { Enrollment nxP7UnKhomJ = get(Enrollment.class, "nxP7UnKhomJ"); Enrollment TvctPPhpD8z = get(Enrollment.class, "TvctPPhpD8z"); List expected = @@ -605,8 +605,7 @@ void shouldOrderEnrollmentsByPrimaryKeyDescByDefault() } @Test - void shouldOrderEnrollmentsByEnrolledAtAsc() - throws ForbiddenException, BadRequestException, NotFoundException { + void shouldOrderEnrollmentsByEnrolledAtAsc() throws ForbiddenException, BadRequestException { EnrollmentOperationParams params = EnrollmentOperationParams.builder() .orgUnitUids(Set.of(orgUnit.getUid())) @@ -620,8 +619,7 @@ void shouldOrderEnrollmentsByEnrolledAtAsc() } @Test - void shouldOrderEnrollmentsByEnrolledAtDesc() - throws ForbiddenException, BadRequestException, NotFoundException { + void shouldOrderEnrollmentsByEnrolledAtDesc() throws ForbiddenException, BadRequestException { EnrollmentOperationParams params = EnrollmentOperationParams.builder() .orgUnitUids(Set.of(orgUnit.getUid())) @@ -1008,6 +1006,66 @@ void shouldOrderEventsByOccurredAtAsc() throws ForbiddenException, BadRequestExc assertEquals(List.of("pTzf9KYMk72", "D9PbzJY8bJM"), events); } + @Test + void shouldOrderEventsByCreatedAtClientInAscOrder() + throws ForbiddenException, BadRequestException { + EventOperationParams params = + eventParamsBuilder + .orgUnitUid(orgUnit.getUid()) + .programStageUid(programStage.getUid()) + .orderBy("createdAtClient", SortDirection.ASC) + .build(); + + List events = getEvents(params); + + assertEquals(List.of("D9PbzJY8bJM", "pTzf9KYMk72"), events); + } + + @Test + void shouldOrderEventsByCreatedAtClientInDescOrder() + throws ForbiddenException, BadRequestException { + EventOperationParams params = + eventParamsBuilder + .orgUnitUid(orgUnit.getUid()) + .programStageUid(programStage.getUid()) + .orderBy("createdAtClient", SortDirection.DESC) + .build(); + + List events = getEvents(params); + + assertEquals(List.of("pTzf9KYMk72", "D9PbzJY8bJM"), events); + } + + @Test + void shouldOrderEventsByUpdatedAtClientInAscOrder() + throws ForbiddenException, BadRequestException { + EventOperationParams params = + eventParamsBuilder + .orgUnitUid(orgUnit.getUid()) + .programStageUid(programStage.getUid()) + .orderBy("lastUpdatedAtClient", SortDirection.ASC) + .build(); + + List events = getEvents(params); + + assertEquals(List.of("pTzf9KYMk72", "D9PbzJY8bJM"), events); + } + + @Test + void shouldOrderEventsByUpdatedAtClientInDescOrder() + throws ForbiddenException, BadRequestException { + EventOperationParams params = + eventParamsBuilder + .orgUnitUid(orgUnit.getUid()) + .programStageUid(programStage.getUid()) + .orderBy("lastUpdatedAtClient", SortDirection.DESC) + .build(); + + List events = getEvents(params); + + assertEquals(List.of("D9PbzJY8bJM", "pTzf9KYMk72"), events); + } + @Test void shouldOrderEventsRespectingOrderWhenAttributeOrderSuppliedBeforeOrderParam() throws ForbiddenException, BadRequestException { @@ -1300,7 +1358,7 @@ private List getTrackedEntities(TrackedEntityOperationParams params) } private List getEnrollments(EnrollmentOperationParams params) - throws ForbiddenException, BadRequestException, NotFoundException { + throws ForbiddenException, BadRequestException { return uids(enrollmentService.getEnrollments(params)); } diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/event/EventExporterTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/event/EventExporterTest.java index 5f8497927428..9049d65b0214 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/event/EventExporterTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/event/EventExporterTest.java @@ -57,6 +57,7 @@ import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryItem; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.feedback.BadRequestException; @@ -76,7 +77,6 @@ import org.hisp.dhis.tracker.imports.TrackerImportService; import org.hisp.dhis.user.User; import org.hisp.dhis.util.DateUtils; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; @@ -180,62 +180,6 @@ void shouldReturnEventsWithNotes() throws ForbiddenException, BadRequestExceptio () -> assertNote(importUser, "comment value", notes.get(1))); } - @Test - void shouldOrderEventsByCreatedAtClientInAscOrder() - throws ForbiddenException, BadRequestException { - EventOperationParams params = - operationParamsBuilder - .programStageUid(programStage.getUid()) - .orderBy("createdAtClient", SortDirection.ASC) - .build(); - - List events = getEvents(params); - - assertEquals(List.of("D9PbzJY8bJM", "pTzf9KYMk72"), events); - } - - @Test - void shouldOrderEventsByCreatedAtClientInDescOrder() - throws ForbiddenException, BadRequestException { - EventOperationParams params = - operationParamsBuilder - .programStageUid(programStage.getUid()) - .orderBy("createdAtClient", SortDirection.DESC) - .build(); - - List events = getEvents(params); - - assertEquals(List.of("pTzf9KYMk72", "D9PbzJY8bJM"), events); - } - - @Test - void shouldOrderEventsByUpdatedAtClientInAscOrder() - throws ForbiddenException, BadRequestException { - EventOperationParams params = - operationParamsBuilder - .programStageUid(programStage.getUid()) - .orderBy("lastUpdatedAtClient", SortDirection.ASC) - .build(); - - List events = getEvents(params); - - assertEquals(List.of("pTzf9KYMk72", "D9PbzJY8bJM"), events); - } - - @Test - void shouldOrderEventsByUpdatedAtClientInDescOrder() - throws ForbiddenException, BadRequestException { - EventOperationParams params = - operationParamsBuilder - .programStageUid(programStage.getUid()) - .orderBy("lastUpdatedAtClient", SortDirection.DESC) - .build(); - - List events = getEvents(params); - - assertEquals(List.of("D9PbzJY8bJM", "pTzf9KYMk72"), events); - } - @Test void testExportEvents() throws ForbiddenException, BadRequestException { EventOperationParams params = diff --git a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipServiceTest.java b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipServiceTest.java index 31e7bffabfbd..915eba1be384 100644 --- a/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipServiceTest.java +++ b/dhis-2/dhis-test-integration/src/test/java/org/hisp/dhis/tracker/export/relationship/RelationshipServiceTest.java @@ -41,6 +41,7 @@ import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdentifiableObjectManager; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.commons.util.RelationshipUtils; import org.hisp.dhis.feedback.ForbiddenException; import org.hisp.dhis.feedback.NotFoundException; @@ -61,7 +62,6 @@ import org.hisp.dhis.trackedentity.TrackedEntityType; import org.hisp.dhis.user.User; import org.hisp.dhis.user.UserService; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deprecated/tracker/TrackedEntityCriteriaMapperTest.java b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deprecated/tracker/TrackedEntityCriteriaMapperTest.java index 0fc235cb1c9e..55873ba163d2 100644 --- a/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deprecated/tracker/TrackedEntityCriteriaMapperTest.java +++ b/dhis-2/dhis-test-web-api/src/test/java/org/hisp/dhis/webapi/controller/deprecated/tracker/TrackedEntityCriteriaMapperTest.java @@ -51,6 +51,7 @@ import org.hisp.dhis.common.IllegalQueryException; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.organisationunit.OrganisationUnitService; @@ -67,7 +68,6 @@ import org.hisp.dhis.user.UserService; import org.hisp.dhis.webapi.DhisWebSpringTest; import org.hisp.dhis.webapi.controller.event.mapper.OrderParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/deprecated/tracker/EventRequestToSearchParamsMapper.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/deprecated/tracker/EventRequestToSearchParamsMapper.java index 87457025717e..cd3b86c98a4d 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/deprecated/tracker/EventRequestToSearchParamsMapper.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/deprecated/tracker/EventRequestToSearchParamsMapper.java @@ -56,6 +56,7 @@ import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryItem; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.commons.collection.CollectionUtils; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; @@ -79,7 +80,6 @@ import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; import org.hisp.dhis.webapi.controller.event.mapper.OrderParam; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.springframework.stereotype.Component; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventMapper.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventMapper.java index 1e8566f6c14f..f840ead21e73 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventMapper.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventMapper.java @@ -72,7 +72,10 @@ public interface EventMapper entry("enrollmentStatus", "enrollment.status"), entry("event", "uid"), entry("followUp", "enrollment.followUp"), - entry("followup", "enrollment.followUp"), // Deprecated 2.41 + entry( + "followup", + "enrollment.followUp"), // TODO(tracker): Deprecated 2.41, making it a TODO so we + // tracker remember to remove this. entry("occurredAt", "occurredDate"), entry("orgUnit", "organisationUnit.uid"), entry("program", "enrollment.program.uid"), @@ -93,7 +96,11 @@ public interface EventMapper @Mapping(target = "orgUnit", source = "organisationUnit.uid") @Mapping(target = "occurredAt", source = "occurredDate") @Mapping(target = "scheduledAt", source = "scheduledDate") - @Mapping(target = "legacyFollowUp", source = "enrollment.followup") // Deprecated 2.41 + @Mapping( + target = "legacyFollowUp", + source = + "enrollment.followup") // TODO(tracker): Deprecated 2.41, making it a TODO so we tracker + // remember to remove this. @Mapping(target = "followUp", source = "enrollment.followup") @Mapping(target = "createdAt", source = "created") @Mapping(target = "createdAtClient", source = "createdAtClient") diff --git a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentImportRequestParamsMapperTest.java b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentImportRequestParamsMapperTest.java index 0992f6a81eaa..055d79ce32b1 100644 --- a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentImportRequestParamsMapperTest.java +++ b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/enrollment/EnrollmentImportRequestParamsMapperTest.java @@ -44,6 +44,7 @@ import java.util.List; import java.util.Set; import org.hisp.dhis.common.OrganisationUnitSelectionMode; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.fieldfiltering.FieldFilterParser; @@ -51,7 +52,6 @@ import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.tracker.export.enrollment.EnrollmentOperationParams; import org.hisp.dhis.tracker.export.enrollment.EnrollmentParams; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; diff --git a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventImportRequestParamsMapperTest.java b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventImportRequestParamsMapperTest.java index 63c994fe2da8..bfab48b8a88b 100644 --- a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventImportRequestParamsMapperTest.java +++ b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/event/EventImportRequestParamsMapperTest.java @@ -52,6 +52,7 @@ import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.dataelement.DataElementService; @@ -74,7 +75,6 @@ import org.hisp.dhis.tracker.export.event.EventParams; import org.hisp.dhis.user.CurrentUserService; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipImportRequestParamsMapperTest.java b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipImportRequestParamsMapperTest.java index c96eec658f96..0403f6900b3f 100644 --- a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipImportRequestParamsMapperTest.java +++ b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/relationship/RelationshipImportRequestParamsMapperTest.java @@ -38,11 +38,11 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.List; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.feedback.BadRequestException; import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.tracker.export.relationship.RelationshipOperationParams; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.Test; diff --git a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntityImportRequestParamsMapperTest.java b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntityImportRequestParamsMapperTest.java index adf61884fde9..2930a0dc2209 100644 --- a/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntityImportRequestParamsMapperTest.java +++ b/dhis-2/dhis-web-api/src/test/java/org/hisp/dhis/webapi/controller/tracker/export/trackedentity/TrackedEntityImportRequestParamsMapperTest.java @@ -49,6 +49,7 @@ import org.hisp.dhis.common.AssignedUserSelectionMode; import org.hisp.dhis.common.QueryFilter; import org.hisp.dhis.common.QueryOperator; +import org.hisp.dhis.common.SortDirection; import org.hisp.dhis.common.UID; import org.hisp.dhis.event.EventStatus; import org.hisp.dhis.feedback.BadRequestException; @@ -56,7 +57,6 @@ import org.hisp.dhis.tracker.export.Order; import org.hisp.dhis.tracker.export.trackedentity.TrackedEntityOperationParams; import org.hisp.dhis.user.User; -import org.hisp.dhis.webapi.controller.event.mapper.SortDirection; import org.hisp.dhis.webapi.controller.event.webrequest.OrderCriteria; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test;