Skip to content

Commit

Permalink
Update master with release-3.0.0 (#465)
Browse files Browse the repository at this point in the history
* SH 55 Generate OTP API changes for managed user (#405)

* SH-55 SH-89 Generate OTP API changes for ward login

* SH-55 SH-89 Generate OTP API changes for ward login

* SH-136 Accept Terms and Conditions API changes (#418)

* SH-55 SH-89 Generate OTP API changes for ward login

* SH-136 Accept Terms and Conditions API – changes to be made to take additional 'userId' param

* SH-136 Accept Terms and Conditions API – changes to be made to take additional 'userId' param

* SB-19367 Remove submodules and add code directly (#419)

* SB-19367 Unify mw and util actors

* SB-19367 Bring in code from other repo

Co-authored-by: indrajra-ilimi <[email protected]>

* SH-162 add new endpoint create-user and authenticating token  (#422)

* Issue #SH-135 added new endpoint for authenticating token during signup

* Issue #SH-135 added validation methods for singupv2

* Issue #SH-135 added new endpoint for createv4

* Issue #SH-162 merged to latest release-3.0.0

* Issue #SH-135 create user of managedUser actor changes

* Issue #SH-135 auth-token changes

* Issue #SH-162 removed duplicate code

* Issue #SH-162 separate methods for createUserV3 and createUserV4

* Issue #SH-162 redudant code moved to common methods

* Issue #SH-162 removed unused code

* SH-135 updating managedby account. (#424)

* Issue #SH-135 added new endpoint for authenticating token during signup

* Issue #SH-135 added validation methods for singupv2

* Issue #SH-135 added new endpoint for createv4

* Issue #SH-162 merged to latest release-3.0.0

* update account details by own and account handler

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 managedUser creation actor changes

* Issue #SH-135 reverting createuser actor changes

* Issue #SH-135 removed sending password link related code

* Issue #SH-135 removed sending password link related code

* SH-175 Allow only N managed users to be created under LIUA (#429)

* SH-55 SH-89 Generate OTP API changes for ward login

* SH-175 Allow only 30 managed users to be created under LIUA

* SH-175 Allow only 30 managed users to be created under LIUA

* SH-175 Allow only 30 managed users to be created under LIUA

* SH-136 Accept Terms and Conditions API – changes to be made to take additional 'userId' param

* SH-136 Accept Terms and Conditions API – changes to be made to take additional 'userId' param

* Fixing testcase issues

* Code coverage fix

* Code review fix

* SH-215  Remove uniqueness check for external id values in cust org (#434)

* SH-55 SH-89 Generate OTP API changes for ward login

* SH-215 Remove  check uniqueness for external id values in cust org

* SH-215 Fixing testcase errors

* SH-215 review changes

* SH-215 review changes

* SH-215 review changes

* Issue #SB-19446 Merge SB-19300, SB-19334 from 2.10 to 3.0.0 (#435)

Co-authored-by: Rajesh Rathnam <[email protected]>

* SH#161 update email/phone for MUA by LIUA (#431)

* Issue #SH-135 added new endpoint for authenticating token during signup

* Issue #SH-135 added validation methods for singupv2

* Issue #SH-135 added new endpoint for createv4

* Issue #SH-162 merged to latest release-3.0.0

* update account details by own and account handler

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 managedUser creation actor changes

* Issue #SH-135 reverting createuser actor changes

* Issue #SH-135 removed sending password link related code

* Issue #SH-135 removed sending password link related code

* Issue #SH-161 sending reset password link while LIUA update email/password of MU

* Issue #SH-161 added log

* Issue #SH-161 corrected the unauthorised condition

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 added reset-password to actor-config in UserOnboardingNotificationActor

* Issue SH-161 removed unnecessary code

* Issue SH-161 validateUserId method modified in create and update flow

* SH-245 Authenticating MUA managedBy userid wrto token userid (#439)

* Issue #SH-135 added new endpoint for authenticating token during signup

* Issue #SH-135 added validation methods for singupv2

* Issue #SH-135 added new endpoint for createv4

* Issue #SH-162 merged to latest release-3.0.0

* update account details by own and account handler

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 managedUser creation actor changes

* Issue #SH-135 reverting createuser actor changes

* Issue #SH-135 removed sending password link related code

* Issue #SH-135 removed sending password link related code

* Issue #SH-161 sending reset password link while LIUA update email/password of MU

* Issue #SH-161 added log

* Issue #SH-161 corrected the unauthorised condition

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 added reset-password to actor-config in UserOnboardingNotificationActor

* Issue SH-161 removed unnecessary code

* Issue SH-161 validateUserId method modified in create and update flow

* Issue #SH-245 null check while fetching user with externalIds and during create-user skipping the getuserdetails

* Issue #SH-245 during create-user skipping the getuserdetails

* Issue #SH-245 during create-user ctxtUserId is getting value from REQUESTED_BY in contextMap

* Issue #SH-245 modified the validate-user validation

* Issue #SB-19458 Merge 2.10.0 load test changes to 3.0 (#440)

* SH-328 read api changes for MUA (#442)

* Issue #SH-135 added new endpoint for authenticating token during signup

* Issue #SH-135 added validation methods for singupv2

* Issue #SH-135 added new endpoint for createv4

* Issue #SH-162 merged to latest release-3.0.0

* update account details by own and account handler

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 revert sh-162 changes

* Issue #SH-135 managedUser creation actor changes

* Issue #SH-135 reverting createuser actor changes

* Issue #SH-135 removed sending password link related code

* Issue #SH-135 removed sending password link related code

* Issue #SH-161 sending reset password link while LIUA update email/password of MU

* Issue #SH-161 added log

* Issue #SH-161 corrected the unauthorised condition

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 first checks if the LIU updating MU details

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 correcting proper condition to check the valid user while updating

* Issue #SH-161 added reset-password to actor-config in UserOnboardingNotificationActor

* Issue SH-161 removed unnecessary code

* Issue SH-161 validateUserId method modified in create and update flow

* Issue #SH-245 null check while fetching user with externalIds and during create-user skipping the getuserdetails

* Issue #SH-245 during create-user skipping the getuserdetails

* Issue #SH-245 during create-user ctxtUserId is getting value from REQUESTED_BY in contextMap

* Issue #SH-245 modified the validate-user validation

* Issue #SH-245 read api changes for MUA

* Issue #SH-328 added logs for read-api

* Issue #SH-328 added logs for read-api

* Issue #SH-333 Accept TnC for MUA (#444)

* SH-373 Fix OTP message (#447)

merge issue

* SB 19442 Read using primary key from the ExternalId table (#448)

* Issue #SH-333 code merge issue

* Issue #SH-333 while updating external-id details getting DB error

* Issue #SB-19442 user externalId code changes wrto table primary key change

* Issue #SB-19442 fixed testcase testAddUserToOrgFailureWithUserNotFoundWithUserExtId

* Issue #SB-19442 fixed test class SupportMultipleExternalIdsTest

Co-authored-by: Rajesh Rathnam <[email protected]>

* Issue #SB-19484 feat: shift akka tell call and logs (#446)

* Issue #SB-19484 feat: shift akka tell call and logs

* Update OTPActor.java

Co-authored-by: Rajesh Rathnam <[email protected]>

* SH-379 List API to fetch managedUsers of a user (#449)

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fe

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 changes

* SH-380 Enhance the user read API to accept an optional flag 'withTokens' (#452)

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fe

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-380 Enhance the user read API to accept an optional flag 'withTokens'

* Issue #SB-19549 Fix start time type check for telemetry (#453)

Co-authored-by: Rajesh Rathnam <[email protected]>

* SH-379 Fix URL (#454)

* SH-379 Create a new API to fetch managedUsers of a uuid

* SH-379 Create a new API to fetch managedUsers of a uuid

Co-authored-by: Rajesh Rathnam <[email protected]>

* SB 19549 shadow-user bulk upload issue (#455)

* Issue #SB-19549 checking is not necessary for telemetry

* Issue #SB-19549 changing telemetryContext data type

* Issue #SB-SB19549 removing the start-time

* Issue #SB-SB19549 revoking BulkMigrationUser changes

* Issue #SB-SB19549 revoking UserBulkMigrationActor.java changes

Co-authored-by: Rajesh Rathnam <[email protected]>

* SH-411 Enhance the fetch managed users API to accept options sortBy  (#456)

* SH-411 Enhance the fetch managed users API to accept options sortBy and order

* SH-411 Code review comments applied

* Issue #SH-397 validating the managedBy token (#451)

* Issue #SH-397 validating the managedBy token

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 Shifted the auth-verifier files to sunbird-utils

* Issue #SH-397 logs refactored

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 validation logic changed in validateUserId and in read api

* Issue #SH-397 not handling the exception

* Issue #SH-397 added logs related to access token properties

* Issue #SH-397 exception handling if keys are not loading

* Issue #SH-397 shoduld call only when token for MUA is sent

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 changes done for testing

* Issue #SH-397 changes done for testing

* Issue #SH-397 error while creating child user

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 undone the unnecessary changes which is added previously for testing

* SH-445 read api with fields and fix request interceptor (#457)

* Issue #SH-397 validating the managedBy token

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 Shifted the auth-verifier files to sunbird-utils

* Issue #SH-397 logs refactored

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 validation logic changed in validateUserId and in read api

* Issue #SH-397 not handling the exception

* Issue #SH-397 added logs related to access token properties

* Issue #SH-397 exception handling if keys are not loading

* Issue #SH-397 shoduld call only when token for MUA is sent

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 changes done for testing

* Issue #SH-397 changes done for testing

* Issue #SH-397 error while creating child user

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 undone the unnecessary changes which is added previously for testing

* Issue #SH-445 reap api with fileds added to it giving internal error

* Issue #SH-445 removing error printtrace

* Issue #SH-445 added error logs to AdminUtilHandler

* SH 445 - read api throwing unauthorised when x-authenticated-for is empty (#458)

* Issue #SH-397 validating the managedBy token

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 Shifted the auth-verifier files to sunbird-utils

* Issue #SH-397 logs refactored

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 validation logic changed in validateUserId and in read api

* Issue #SH-397 not handling the exception

* Issue #SH-397 added logs related to access token properties

* Issue #SH-397 exception handling if keys are not loading

* Issue #SH-397 shoduld call only when token for MUA is sent

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 changes done for testing

* Issue #SH-397 changes done for testing

* Issue #SH-397 error while creating child user

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 undone the unnecessary changes which is added previously for testing

* Issue #SH-445 reap api with fileds added to it giving internal error

* Issue #SH-445 removing error printtrace

* Issue #SH-445 added error logs to AdminUtilHandler

* Issue managedtoken is not created when it is already there in request header(read-api)

* Issue #SH-445 copy token from http-header

* Issue #SH-445 file format change

* Issue SH-445 Fix 500 error caused due to Optional

* Issue SH-445 Fix 500 error caused due to Optional (#459)

Co-authored-by: indrajra-ilimi <[email protected]>

* SH-461 Ignore x-authenticated-for token if userid matches with token subject (#460)

* Issue SH-445 Fix 500 error caused due to Optional

* SH-461 Ignore managed token if userid matches with token sub

Co-authored-by: indrajra-ilimi <[email protected]>

* SH-461 Fix user search regression (#461)

* Issue SH-445 Fix 500 error caused due to Optional

* SH-461 Ignore managed token if userid matches with token sub

* SH-461 Fix user search regression

Co-authored-by: indrajra-ilimi <[email protected]>

* SH-445 Issues in search api and updating mua details (#462)

* Issue #SH-397 validating the managedBy token

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 added x-authenticate-for feat

* Issue #SH-397 Shifted the auth-verifier files to sunbird-utils

* Issue #SH-397 logs refactored

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 code changes wrto review comments

* Issue #SH-397 validation logic changed in validateUserId and in read api

* Issue #SH-397 not handling the exception

* Issue #SH-397 added logs related to access token properties

* Issue #SH-397 exception handling if keys are not loading

* Issue #SH-397 shoduld call only when token for MUA is sent

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 checking exception for loading properties

* Issue #SH-397 changes done for testing

* Issue #SH-397 changes done for testing

* Issue #SH-397 error while creating child user

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 issue while reading the record

* Issue #SH-397 undone the unnecessary changes which is added previously for testing

* Issue #SH-445 reap api with fileds added to it giving internal error

* Issue #SH-445 removing error printtrace

* Issue #SH-445 added error logs to AdminUtilHandler

* Issue managedtoken is not created when it is already there in request header(read-api)

* Issue #SH-445 copy token from http-header

* Issue #SH-445 file format change

* Issue #SH-445 MUA details not updating

* SH-470 Play flash is holding the managed for token (#463)

* adding the log

* #SH-470 adding the log

* #SH-470 adding the log

* #SH-470 adding the log

* #SH-470 adding the log

* #SH-470 adding the log

* Issue SH-470 removed logs

* Issue SH-470 removed logs

* Issue #SH-470 added logs

Co-authored-by: reshmi-nair <[email protected]>
Co-authored-by: indrajra-ilimi <[email protected]>
Co-authored-by: Hari-stackroute <[email protected]>
Co-authored-by: AMIT KUMAR <[email protected]>
  • Loading branch information
5 people authored Jun 23, 2020
1 parent 4b9ff6b commit c39a163
Show file tree
Hide file tree
Showing 657 changed files with 108,447 additions and 500 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ USER sunbird
COPY ./service/target/learning-service-1.0-SNAPSHOT-dist.zip /home/sunbird/learner/
RUN unzip /home/sunbird/learner/learning-service-1.0-SNAPSHOT-dist.zip -d /home/sunbird/learner/
WORKDIR /home/sunbird/learner/
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -cp '/home/sunbird/learner/learning-service-1.0-SNAPSHOT/lib/*' play.core.server.ProdServerStart /home/sunbird/learner/learning-service-1.0-SNAPSHOT
CMD java -XX:+PrintFlagsFinal $JAVA_OPTIONS -Dplay.server.http.idleTimeout=180s -cp '/home/sunbird/learner/learning-service-1.0-SNAPSHOT/lib/*' play.core.server.ProdServerStart /home/sunbird/learner/learning-service-1.0-SNAPSHOT

1 change: 0 additions & 1 deletion actors/sunbird-lms-mw
Submodule sunbird-lms-mw deleted from fd4f8c
25 changes: 25 additions & 0 deletions actors/sunbird-lms-mw/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/target/
project/project
project/target
target
tmp
.history
dist
/.idea
/*.iml
/out
/.idea_modules
/.classpath
/.project
/.settings
/.target/
/bin/
/logs
.settings
.classpath
.project
**/*.iml
**/.DS_Store
actors/badge/logs
dependency-reduced-pom.xml
**/velocity.log
82 changes: 82 additions & 0 deletions actors/sunbird-lms-mw/actors/badge/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.sunbird</groupId>
<artifactId>mw-actors</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>badge</artifactId>
<name>Badging Infra</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.sunbird</groupId>
<artifactId>actor-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-testkit_2.11</artifactId>
<version>2.5.19</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.5.201505241946</version>
<configuration>
<destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
<dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
</configuration>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<!-- <skipTests>true</skipTests> -->
<includes>
<include>**/*Spec.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.sunbird.badge;

/** @author Mahesh Kumar Gangula */
public enum BadgeOperations {
assignBadgeMessage,
revokeBadgeMessage,
createBadgeIssuer,
createBadgeAssertion,
assignBadgeToUser,
revokeBadgeFromUser,
getBadgeIssuer,
getAllIssuer,
deleteIssuer
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/** */
package org.sunbird.badge.actors;

import java.io.IOException;
import java.util.Map;
import org.sunbird.actor.core.BaseActor;
import org.sunbird.actor.router.ActorConfig;
import org.sunbird.badge.BadgeOperations;
import org.sunbird.badge.service.impl.BadgingFactory;
import org.sunbird.badge.util.BadgeAssertionValidator;
import org.sunbird.badge.util.BadgingUtil;
import org.sunbird.common.models.response.Response;
import org.sunbird.common.models.util.BadgingJsonKey;
import org.sunbird.common.models.util.JsonKey;
import org.sunbird.common.models.util.LoggerEnum;
import org.sunbird.common.models.util.ProjectLogger;
import org.sunbird.common.models.util.TelemetryEnvKey;
import org.sunbird.common.request.Request;
import org.sunbird.learner.util.Util;

/** @author Manzarul */
@ActorConfig(
tasks = {"createBadgeAssertion", "getBadgeAssertion", "getBadgeAssertionList", "revokeBadge"},
asyncTasks = {}
)
public class BadgeAssertionActor extends BaseActor {

@Override
public void onReceive(Request request) throws Throwable {
ProjectLogger.log("BadgeAssertionActor onReceive called", LoggerEnum.INFO.name());
String operation = request.getOperation();

Util.initializeContext(request, TelemetryEnvKey.BADGE_ASSERTION);

switch (operation) {
case "createBadgeAssertion":
createAssertion(request);
break;
case "getBadgeAssertion":
getAssertionDetails(request);
break;
case "getBadgeAssertionList":
getAssertionList(request);
break;
case "revokeBadge":
revokeAssertion(request);
break;
default:
onReceiveUnsupportedOperation("BadgeClassActor");
}
}

/**
* This method will call the badger server to create badge assertion.
*
* @param actorMessage Request
*/
private void createAssertion(Request actorMessage) throws IOException {
ProjectLogger.log(
"BadgeAssertionActor:createAssertion: Call started ",
actorMessage.getRequest(),
LoggerEnum.INFO.name());
String recipientId = (String) actorMessage.getRequest().get(BadgingJsonKey.RECIPIENT_ID);
String objectType = (String) actorMessage.getRequest().get(BadgingJsonKey.RECIPIENT_TYPE);
String badgeId = (String) actorMessage.getRequest().get(BadgingJsonKey.BADGE_ID);
BadgeAssertionValidator.validateRootOrg(recipientId, objectType, badgeId);
Response result = BadgingFactory.getInstance().badgeAssertion(actorMessage);
ProjectLogger.log(
"BadgeAssertionActor:createAssertion: Assertion Response : " + result.getResult(),
LoggerEnum.INFO.name());
sender().tell(result, self());
Map<String, Object> map = BadgingUtil.createBadgeNotifierMap(result.getResult());
Request request = new Request();
ProjectLogger.log(
"BadgeAssertionActor:createAssertion: Notifying badge assertion for "
+ objectType
+ " with id: "
+ recipientId,
actorMessage.getRequest(),
LoggerEnum.INFO.name());
map.put(JsonKey.OBJECT_TYPE, objectType);
map.put(JsonKey.ID, recipientId);
request.getRequest().putAll(map);
request.setOperation(BadgeOperations.assignBadgeMessage.name());
tellToAnother(request);
}

/**
* This method will get single assertion details based on issuerSlug, badgeClassSlug and
* assertionSlug
*
* @param request Request
*/
private void getAssertionDetails(Request request) throws IOException {
Response result = BadgingFactory.getInstance().getAssertionDetails(request);
sender().tell(result, self());
}

/**
* This method will get single assertion details based on issuerSlug, badgeClassSlug and
* assertionSlug
*
* @param request Request
*/
private void getAssertionList(Request request) throws IOException {
Response result = BadgingFactory.getInstance().getAssertionList(request);
sender().tell(result, self());
}

/**
* This method will make a call for revoking the badges.
*
* @param request Request
*/
private void revokeAssertion(Request request) throws IOException {
Response result = BadgingFactory.getInstance().revokeAssertion(request);
sender().tell(result, self());
Map<String, Object> map = BadgingUtil.createRevokeBadgeNotifierMap(request.getRequest());
Request notificationReq = new Request();
map.put(JsonKey.OBJECT_TYPE, request.getRequest().get(BadgingJsonKey.RECIPIENT_TYPE));
map.put(JsonKey.ID, request.getRequest().get(BadgingJsonKey.RECIPIENT_ID));
notificationReq.getRequest().putAll(map);
notificationReq.setOperation(BadgeOperations.revokeBadgeMessage.name());
tellToAnother(notificationReq);
}
}
Loading

0 comments on commit c39a163

Please sign in to comment.