Skip to content
Permalink
Browse files
Merge pull request #6 from ebenezergraham/develop
Increment 2
  • Loading branch information
awasum committed Sep 17, 2018
2 parents f3296bb + 6b1b5f7 commit 425c6ae0f5d81620419c32d29a5bed2fe880459d
Showing 88 changed files with 3,310 additions and 6,658 deletions.
@@ -2,7 +2,13 @@
.idea
build/
target/
detail
build/out
service/out
component-test/out
api/out
service/build
component-test/build
api/build

# Ignore Gradle GUI config
gradle-app.setting
@@ -15,3 +21,5 @@ gradle-app.setting
*.log

*.toDelete

*.class

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -20,6 +20,5 @@

@SuppressWarnings("unused")
public interface PermittableGroupIds {
String SAMPLE_MANAGEMENT = "notification__v1__samples";
String SELF_MANAGEMENT = "notification__v1__self";
String SELF_MANAGEMENT = "notification__v1__self";
}
@@ -18,6 +18,11 @@
*/
package org.apache.fineract.cn.notification.api.v1.client;

@SuppressWarnings("WeakerAccess")
public class IamATeapotException extends RuntimeException {
import org.apache.fineract.cn.api.util.NotFoundException;

public final class ConfigurationNotFoundException extends NotFoundException {

public ConfigurationNotFoundException(String reason) {
super(reason);
}
}
@@ -18,42 +18,62 @@
*/
package org.apache.fineract.cn.notification.api.v1.client;

import org.apache.fineract.cn.notification.api.v1.domain.Sample;
import java.util.List;
import org.apache.fineract.cn.api.annotation.ThrowsException;
import org.apache.fineract.cn.api.util.CustomFeignClientsConfiguration;
import org.apache.fineract.cn.notification.api.v1.domain.EmailConfiguration;
import org.apache.fineract.cn.notification.api.v1.domain.SMSConfiguration;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@SuppressWarnings("unused")
@FeignClient(value="notification-v1", path="/notification/v1", configuration = CustomFeignClientsConfiguration.class)
@FeignClient(value = "notification-v1", path = "/notification/v1", configuration = CustomFeignClientsConfiguration.class)
public interface NotificationManager {

@RequestMapping(
value = "/notification",
method = RequestMethod.GET,
produces = MediaType.ALL_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
List<Sample> findAllEntities();

@RequestMapping(
value = "/notification/{identifier}",
method = RequestMethod.GET,
produces = MediaType.ALL_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
Sample getEntity(@PathVariable("identifier") final String identifier);

@RequestMapping(
value = "/notification",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
@ThrowsException(status = HttpStatus.I_AM_A_TEAPOT, exception = IamATeapotException.class)
void createEntity(final Sample sample);
}

@RequestMapping(
value = "/notification/sms/active",
method = RequestMethod.GET,
produces = MediaType.ALL_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
SMSConfiguration findAllActiveSMSConfigurationEntities();

@RequestMapping(
value = "/notification/email/active",
method = RequestMethod.GET,
produces = MediaType.ALL_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE)
EmailConfiguration findAllActiveEmailConfigurationEntities();

@RequestMapping(
value = "/notification/sms/create",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
void createSMSConfiguration(final SMSConfiguration smsConfiguration);

@RequestMapping(
value = "/notification/email/create",
method = RequestMethod.POST,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
void createEmailConfiguration(final EmailConfiguration emailConfiguration);

@RequestMapping(
value = "/notification/sms/{identifier}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
SMSConfiguration findSMSConfigurationByIdentifier(@PathVariable("identifier") final String identifier);

@RequestMapping(
value = "/notification/email/{identifier}",
method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = MediaType.APPLICATION_JSON_VALUE
)
EmailConfiguration findEmailConfigurationByIdentifier(@PathVariable("identifier") final String identifier);
}

0 comments on commit 425c6ae

Please sign in to comment.