This is an automated email from the ASF dual-hosted git repository.

ofuks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/develop by this push:
     new 8dcb3f8  Added statuses for auto complete feature
8dcb3f8 is described below

commit 8dcb3f8d4273647905cf9cc0704f1e007dd68ed9
Author: Oleh Fuks <olegfuk...@gmail.com>
AuthorDate: Thu Aug 27 16:00:50 2020 +0300

    Added statuses for auto complete feature
---
 .../AutoCompleteEnum.java}                                 | 14 +++-----------
 .../epam/dlab/backendapi/domain/ExploratoryLibList.java    |  4 ++--
 .../backendapi/resources/dto/LibraryAutoCompleteDTO.java   |  3 ++-
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/AutoCompleteEnum.java
similarity index 77%
copy from 
services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
copy to 
services/self-service/src/main/java/com/epam/dlab/backendapi/domain/AutoCompleteEnum.java
index 6c1d7b7..46a3402 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/AutoCompleteEnum.java
@@ -17,16 +17,8 @@
  * under the License.
  */
 
-package com.epam.dlab.backendapi.resources.dto;
+package com.epam.dlab.backendapi.domain;
 
-import lombok.Builder;
-import lombok.Data;
-
-import java.util.List;
-
-@Data
-@Builder
-public class LibraryAutoCompleteDTO {
-       private boolean autoComplete;
-       private List<LibraryDTO> libraries;
+public enum AutoCompleteEnum {
+       NONE, UPDATING, ENABLED
 }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
index 19b5176..b5a8d95 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/domain/ExploratoryLibList.java
@@ -166,7 +166,7 @@ public class ExploratoryLibList {
                Map<String, String> libMap = getLibs(group);
                if (libMap == null) {
                        return LibraryAutoCompleteDTO.builder()
-                                       .autoComplete(Boolean.FALSE)
+                                       .autoComplete(isUpdating() ? 
AutoCompleteEnum.UPDATING : AutoCompleteEnum.NONE)
                                        .libraries(Collections.emptyList())
                                        .build();
                }
@@ -177,7 +177,7 @@ public class ExploratoryLibList {
                                .collect(Collectors.toList());
 
                return LibraryAutoCompleteDTO.builder()
-                               .autoComplete(Boolean.TRUE)
+                               .autoComplete(AutoCompleteEnum.ENABLED)
                                .libraries(libraries)
                                .build();
        }
diff --git 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
index 6c1d7b7..a74fdbc 100644
--- 
a/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
+++ 
b/services/self-service/src/main/java/com/epam/dlab/backendapi/resources/dto/LibraryAutoCompleteDTO.java
@@ -19,6 +19,7 @@
 
 package com.epam.dlab.backendapi.resources.dto;
 
+import com.epam.dlab.backendapi.domain.AutoCompleteEnum;
 import lombok.Builder;
 import lombok.Data;
 
@@ -27,6 +28,6 @@ import java.util.List;
 @Data
 @Builder
 public class LibraryAutoCompleteDTO {
-       private boolean autoComplete;
+       private AutoCompleteEnum autoComplete;
        private List<LibraryDTO> libraries;
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org

Reply via email to