Skip to content

Commit

Permalink
solved two problems -> trello and contact mgmt system
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishal M Yadav committed Dec 1, 2024
1 parent 699be80 commit 0d8fc65
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.gatomalvado.todo.contactmgmt;
package com.gatomalvado.done.contactmgmt;

import java.util.UUID;

import com.gatomalvado.todo.contactmgmt.entities.Contact;
import com.gatomalvado.todo.contactmgmt.services.ContactRepository;
import com.gatomalvado.todo.contactmgmt.services.MapBasedStrategy;
import com.gatomalvado.todo.contactmgmt.services.SearchStrategy;
import com.gatomalvado.done.contactmgmt.entities.Contact;
import com.gatomalvado.done.contactmgmt.services.ContactRepository;
import com.gatomalvado.done.contactmgmt.services.MapBasedStrategy;
import com.gatomalvado.done.contactmgmt.services.SearchStrategy;

public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.contactmgmt.entities;
package com.gatomalvado.done.contactmgmt.entities;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.contactmgmt.entities;
package com.gatomalvado.done.contactmgmt.entities;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.gatomalvado.todo.contactmgmt.services;
package com.gatomalvado.done.contactmgmt.services;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.gatomalvado.todo.contactmgmt.entities.Contact;
import com.gatomalvado.todo.contactmgmt.entities.SearchResult;
import com.gatomalvado.done.contactmgmt.entities.Contact;
import com.gatomalvado.done.contactmgmt.entities.SearchResult;

public class ContactRepository {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.contactmgmt.services;
package com.gatomalvado.done.contactmgmt.services;


public class ContactTrie {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.gatomalvado.todo.contactmgmt.services;
package com.gatomalvado.done.contactmgmt.services;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import com.gatomalvado.todo.contactmgmt.entities.Contact;
import com.gatomalvado.todo.contactmgmt.entities.SearchResult;
import com.gatomalvado.done.contactmgmt.entities.Contact;
import com.gatomalvado.done.contactmgmt.entities.SearchResult;

public class MapBasedStrategy implements SearchStrategy {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.gatomalvado.todo.contactmgmt.services;
package com.gatomalvado.done.contactmgmt.services;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.gatomalvado.todo.contactmgmt.entities.Contact;
import com.gatomalvado.done.contactmgmt.entities.Contact;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.gatomalvado.done.contactmgmt.services;

import com.gatomalvado.done.contactmgmt.entities.Contact;
import com.gatomalvado.done.contactmgmt.entities.SearchResult;

public interface SearchStrategy {

void access(Contact contact);

void remove(Contact contact);

SearchResult search(String fieldValue, String fieldName);

}
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package com.gatomalvado.todo.trello;
package com.gatomalvado.done.trello;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.gatomalvado.todo.trello.entities.TaskUser;
import com.gatomalvado.todo.trello.entities.TrelloBoard;
import com.gatomalvado.todo.trello.enums.Status;
import com.gatomalvado.todo.trello.service.BoardService;
import com.gatomalvado.done.trello.entities.TaskUser;
import com.gatomalvado.done.trello.service.BoardService;

public class Main {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.trello.entities;
package com.gatomalvado.done.trello.entities;

public abstract class BaseEntity {
public abstract String getEntityType();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.gatomalvado.todo.trello.entities;
package com.gatomalvado.done.trello.entities;

import java.util.Objects;

import com.gatomalvado.todo.trello.enums.EntityType;
import com.gatomalvado.done.trello.enums.EntityType;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.gatomalvado.todo.trello.entities;
package com.gatomalvado.done.trello.entities;

import java.util.Objects;
import java.util.Set;

import com.gatomalvado.todo.trello.enums.EntityType;
import com.gatomalvado.done.trello.enums.EntityType;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.gatomalvado.todo.trello.entities;
package com.gatomalvado.done.trello.entities;

import java.util.Objects;
import java.util.Set;

import com.gatomalvado.todo.trello.enums.EntityType;
import com.gatomalvado.done.trello.enums.EntityType;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.gatomalvado.todo.trello.entities;
package com.gatomalvado.done.trello.entities;

import java.util.Objects;
import java.util.Set;

import com.gatomalvado.todo.trello.enums.EntityType;
import com.gatomalvado.todo.trello.enums.Status;
import com.gatomalvado.done.trello.enums.EntityType;
import com.gatomalvado.done.trello.enums.Status;

import lombok.AllArgsConstructor;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.trello.enums;
package com.gatomalvado.done.trello.enums;

public enum EntityType {
BOARD("board"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gatomalvado.todo.trello.enums;
package com.gatomalvado.done.trello.enums;

public enum Status {
PUBLIC,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.gatomalvado.todo.trello.service;
package com.gatomalvado.done.trello.service;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.UUID;

import com.gatomalvado.todo.trello.entities.BaseEntity;
import com.gatomalvado.todo.trello.entities.TrelloBoard;
import com.gatomalvado.todo.trello.entities.Card;
import com.gatomalvado.todo.trello.entities.SubGroup;
import com.gatomalvado.todo.trello.entities.TaskUser;
import com.gatomalvado.todo.trello.enums.Status;
import com.gatomalvado.done.trello.entities.BaseEntity;
import com.gatomalvado.done.trello.entities.TrelloBoard;
import com.gatomalvado.done.trello.entities.Card;
import com.gatomalvado.done.trello.entities.SubGroup;
import com.gatomalvado.done.trello.entities.TaskUser;
import com.gatomalvado.done.trello.enums.Status;

public class BoardService {

Expand Down

This file was deleted.

0 comments on commit 0d8fc65

Please sign in to comment.