-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into vithu-clean-architecture
- Loading branch information
Showing
5 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/callhub/connect/data_access/MessageDataAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package callhub.connect.data_access; | ||
|
||
import callhub.connect.entities.Message; | ||
import callhub.connect.entities.Sender; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.context.ApplicationContext; | ||
import org.springframework.context.annotation.Bean; | ||
|
||
public class MessageDataAccess { | ||
|
||
private ApplicationContext context; | ||
private MessageRepository messageRepository; | ||
|
||
public MessageDataAccess(ApplicationContext context) { | ||
this.context = context; | ||
this.messageRepository = context.getBean(MessageRepository.class); | ||
} | ||
|
||
public void sendResponseToDatabase(String content, String sessionId, Sender sender) { | ||
Message message = new Message(content, sessionId, sender); | ||
messageRepository.save(message); | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
src/main/java/callhub/connect/drivers/MessageWebSocketAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package callhub.connect.drivers; | ||
|
||
public class MessageWebSocketAccess { | ||
// this class was moved to MessageController | ||
// this class and its functionality was moved to MessageController and the other MessageCA classes | ||
// Attempting to see if this resolves the merge conflict | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,4 +33,8 @@ public String getCode() { | |
return code; | ||
} | ||
|
||
public ArrayList<Message> getMessages() { | ||
return this.messages; | ||
} | ||
|
||
} |