@@ -1827,35 +1827,35 @@ public ApiResponse diceStatus(@Valid PostPutRequest<DiceStatusRequest> postReque
18271827 }
18281828 checkParam (postRequest );
18291829 DiceStatusRequest status = postRequest .getParam ();
1830- if (status .getEvent () == null ) {
1831- logger .info (String .format ("Dice status missing event : %s %s" , postRequest , request ));
1832- throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "event " ));
1830+ if (status .getType () == null ) {
1831+ logger .info (String .format ("Dice status missing type : %s %s" , postRequest , request ));
1832+ throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "type " ));
18331833 }
1834- if (status .getConnectionId () == null || status .getConnectionId ().isEmpty ()) {
1835- logger .info (String .format ("Dice status missing connection ID : %s %s" , postRequest , request ));
1836- throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "connectionId " ));
1834+ if (status .getAction () == null || status .getAction ().isEmpty ()) {
1835+ logger .info (String .format ("Dice status missing action : %s %s" , postRequest , request ));
1836+ throw new APIRuntimeException (SC_BAD_REQUEST , String .format (MSG_TEMPLATE_MANDATORY , "action " ));
18371837 }
18381838 logger .info (status );
1839- switch (status .getEvent ()) {
1840- case "connection-invitation" :
1841- handleConnectionCreatedEvent (status .getConnectionId (), status .getEmailId (), status .getShortUrl ());
1842- break ;
1843- case "connection-response" :
1844- handleConnectionAcceptedEvent (status .getConnectionId ());
1845- break ;
1846- case "credential-issuance" :
1847- handleCredentialIssuanceEvent (status .getConnectionId ());
1848- break ;
1849- case "connection-declined" :
1850- handleConnectionDeclinedEvent (status .getConnectionId ());
1851- break ;
1852- case "credential-declined" :
1853- handleCredentialDeclinedEvent (status .getConnectionId ());
1854- break ;
1855- default :
1856- throw new APIRuntimeException (SC_BAD_REQUEST ,
1857- String .format ("%s is not valid event" , status .getEvent ()));
1858- }
1839+ // switch (status.getEvent()) {
1840+ // case "connection-invitation":
1841+ // handleConnectionCreatedEvent(status.getConnectionId(), status.getEmailId(), status.getShortUrl());
1842+ // break;
1843+ // case "connection-response":
1844+ // handleConnectionAcceptedEvent(status.getConnectionId());
1845+ // break;
1846+ // case "credential-issuance":
1847+ // handleCredentialIssuanceEvent(status.getConnectionId());
1848+ // break;
1849+ // case "connection-declined":
1850+ // handleConnectionDeclinedEvent(status.getConnectionId());
1851+ // break;
1852+ // case "credential-declined":
1853+ // handleCredentialDeclinedEvent(status.getConnectionId());
1854+ // break;
1855+ // default:
1856+ // throw new APIRuntimeException(SC_BAD_REQUEST,
1857+ // String.format("%s is not valid event", status.getEvent()));
1858+ // }
18591859
18601860 return ApiResponseFactory .createResponse ("SUCCESS" );
18611861 }
0 commit comments