-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: sms gateway configuration stored in protected datastore ns …
…[DHIS2-18025] (#18560) * refactor: sms gateway configuration stored in protected datastore ns [DHIS2-18025] * chore: remove obsolete SMS config setting key * fix: tests and cleanup throws clauses * fix: sonar warnings --------- Co-authored-by: Morten Hansen <[email protected]>
- Loading branch information
Showing
10 changed files
with
157 additions
and
87 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
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 |
---|---|---|
|
@@ -28,16 +28,21 @@ | |
package org.hisp.dhis.sms.config; | ||
|
||
import javax.annotation.CheckForNull; | ||
import org.hisp.dhis.feedback.BadRequestException; | ||
import org.hisp.dhis.feedback.ConflictException; | ||
import org.hisp.dhis.feedback.ForbiddenException; | ||
import org.hisp.dhis.feedback.NotFoundException; | ||
|
||
/** | ||
* @author Zubair <[email protected]> | ||
*/ | ||
public interface GatewayAdministrationService { | ||
void setDefaultGateway(SmsGatewayConfig config); | ||
|
||
boolean removeGatewayByUid(String uid); | ||
void setDefaultGateway(SmsGatewayConfig config) | ||
throws ForbiddenException, ConflictException, BadRequestException; | ||
|
||
boolean removeGatewayByUid(String uid) | ||
throws ForbiddenException, ConflictException, BadRequestException; | ||
|
||
boolean hasGateways(); | ||
|
||
|
@@ -47,9 +52,10 @@ public interface GatewayAdministrationService { | |
|
||
SmsGatewayConfig getByUid(String uid); | ||
|
||
boolean addGateway(SmsGatewayConfig config); | ||
boolean addGateway(SmsGatewayConfig config) | ||
throws ForbiddenException, ConflictException, BadRequestException; | ||
|
||
void updateGateway( | ||
@CheckForNull SmsGatewayConfig persisted, @CheckForNull SmsGatewayConfig updatedConfig) | ||
throws NotFoundException, ConflictException; | ||
throws NotFoundException, ConflictException, ForbiddenException, BadRequestException; | ||
} |
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 |
---|---|---|
|
@@ -27,9 +27,17 @@ | |
*/ | ||
package org.hisp.dhis.sms.config; | ||
|
||
import javax.annotation.Nonnull; | ||
import org.hisp.dhis.feedback.BadRequestException; | ||
import org.hisp.dhis.feedback.ConflictException; | ||
import org.hisp.dhis.feedback.ForbiddenException; | ||
|
||
/** Zubair <[email protected]> */ | ||
public interface SmsConfigurationManager { | ||
|
||
@Nonnull | ||
SmsConfiguration getSmsConfiguration(); | ||
|
||
void updateSmsConfiguration(SmsConfiguration config); | ||
void updateSmsConfiguration(@Nonnull SmsConfiguration config) | ||
throws ConflictException, ForbiddenException, BadRequestException; | ||
} |
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
Oops, something went wrong.