-
Notifications
You must be signed in to change notification settings - Fork 11
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' of https://github.com/samagra-comms/message-rosa
- Loading branch information
Showing
18 changed files
with
321 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Build & Deploy on Tag & Push | ||
name: Github Package | ||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
branches: | ||
["release-4.*.*", "release-5.*.*", "release-v2.*.*"] | ||
pull_request: | ||
branches: | ||
["release-4.*.*", "release-5.*.*", "release-v2.*.*"] | ||
|
||
jobs: | ||
build-deploy-github: | ||
name: Build & Deploy to GitHub | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'temurin' | ||
server-id: github | ||
server-username: GITHUB_USERNAME | ||
server-password: GITHUB_TOKEN | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2- | ||
|
||
- name: Delete package specific version | ||
uses: smartsquaregmbh/[email protected] | ||
with: | ||
version: 2.1.0 # This should be same as in the pom.xml file, | ||
# to delete only the pom specified version, not the other older versions | ||
names: | | ||
com.uci.message-rosa | ||
token: ${{ secrets.TOKEN }} | ||
|
||
- name: Deploy | ||
run: mvn clean install -Pgithub deploy | ||
env: | ||
GITHUB_USERNAME: ${{ secrets.USERNAME }} | ||
GITHUB_TOKEN: ${{ secrets.TOKEN }} |
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,31 @@ | ||
# Build on Push & Pull Request | ||
name: Maven Build | ||
on: | ||
push: | ||
branches: | ||
["release-4.*.*", "release-5.*.*", "release-v2.*.*"] | ||
pull_request: | ||
branches: | ||
["release-4.*.*", "release-5.*.*", "release-v2.*.*"] | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'temurin' | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Build and analyze | ||
run: mvn clean install |
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,22 @@ | ||
![Maven Build](https://github.com/samagra-comms/message-rosa/actions/workflows/build.yml/badge.svg) | ||
![Github Package](https://github.com/samagra-comms/message-rosa/actions/workflows/build-deploy.yml/badge.svg) | ||
|
||
# Overview | ||
Message Rosa holds all the core models for XMessage & its property fields. | ||
|
||
# Getting Started | ||
|
||
## Prerequisites | ||
|
||
* java 11 or above | ||
* docker | ||
* kafka | ||
* lombok plugin for IDE | ||
* maven | ||
|
||
## Build | ||
* build with tests run using command **mvn clean install -U** | ||
* or build without tests run using command **mvn clean install -DskipTests** | ||
|
||
# Detailed Documentation | ||
[Click here](https://uci.sunbird.org/use/developer/uci-basics) |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -10,4 +10,5 @@ | |
public class ButtonChoice { | ||
private String key; | ||
private String text; | ||
private Boolean backmenu; | ||
} |
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,14 @@ | ||
package messagerosa.core.model; | ||
|
||
|
||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class Data { | ||
private String key; | ||
private String value; | ||
} |
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,26 @@ | ||
package messagerosa.core.model; | ||
|
||
public enum DeviceType { | ||
PHONE("phone"), | ||
FCM("fcm"), | ||
PHONE_PWA("ucipwa"), | ||
PHONE_FCM("phonefcm"); | ||
|
||
|
||
private String name; | ||
|
||
DeviceType(String deviceType) { | ||
name=deviceType; | ||
} | ||
|
||
public String toString(){ | ||
return name; | ||
} | ||
|
||
public static String getEnumByString(String code){ | ||
for(DeviceType e : DeviceType.values()){ | ||
if(e.name.equals(code)) return e.name(); | ||
} | ||
return null; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package messagerosa.core.model; | ||
|
||
public enum MediaCategory { | ||
IMAGE("image"), | ||
AUDIO("audio"), | ||
VIDEO("video"), | ||
VOICE("voice"), | ||
FILE("file"); | ||
|
||
private String name; | ||
|
||
MediaCategory(String mediaCategory) { | ||
name=mediaCategory; | ||
} | ||
|
||
public String toString(){ | ||
return name; | ||
} | ||
|
||
public static String getEnumByString(String code){ | ||
for(MediaCategory e : MediaCategory.values()){ | ||
if(e.name.equals(code)) return e.name(); | ||
} | ||
return null; | ||
} | ||
} |
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
23 changes: 23 additions & 0 deletions
23
src/main/java/messagerosa/core/model/MessageMediaError.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,23 @@ | ||
package messagerosa.core.model; | ||
|
||
public enum MessageMediaError { | ||
PAYLOAD_TO_LARGE("payloadTooLarge"), | ||
EMPTY_RESPONSE("emptyResponse"); | ||
private String name; | ||
|
||
MessageMediaError(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String toString() {return name;} | ||
|
||
public static MessageMediaError getErrorByText(String text){ | ||
for (MessageMediaError e : MessageMediaError.values()){ | ||
if(e.name.equals(text)) | ||
return e; | ||
} | ||
return null; | ||
} | ||
} | ||
|
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
Oops, something went wrong.