Package step.plugins.notification
Class NotificationServices
- java.lang.Object
-
- step.core.deployment.AbstractServices
-
- step.plugins.notification.NotificationServices
-
@Singleton @Path("notifications") public class NotificationServices extends step.core.deployment.AbstractServices
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Logger
logger
protected NotificationEngine
notificationEngine
protected NotificationGatewayConfigurationAccessor
notificationGatewayConfigurationAccessor
protected NotificationSubscriptionAccessor
notificationSubscriptionAccessor
-
Constructor Summary
Constructors Constructor Description NotificationServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteNotificationGatewayConfiguration(java.lang.String id)
void
deleteNotificationSubscription(java.lang.String id)
java.util.List<NotificationSubscription>
getAll(java.lang.Integer skip, java.lang.Integer limit)
NotificationGatewayConfiguration
getNotificationGatewayConfiguration(java.lang.String id)
java.util.List<NotificationGatewayConfiguration>
getNotificationGatewayConfigurations()
java.util.List<step.plugins.notification.NotificationServices.GatewayInfo>
getNotificationGatewayNames()
NotificationSubscription
getNotificationSubscription(java.lang.String id)
java.util.List<NotificationSubscription>
getNotificationSubscriptionsByPlanRef(step.core.repositories.RepositoryObjectReference planRef)
void
init()
void
saveNotificationGatewayConfiguration(NotificationGatewayConfiguration gatewayConfiguration)
void
saveNotificationSubscription(NotificationSubscription subscription)
-
-
-
Field Detail
-
notificationGatewayConfigurationAccessor
protected NotificationGatewayConfigurationAccessor notificationGatewayConfigurationAccessor
-
notificationSubscriptionAccessor
protected NotificationSubscriptionAccessor notificationSubscriptionAccessor
-
notificationEngine
protected NotificationEngine notificationEngine
-
logger
public static final org.slf4j.Logger logger
-
-
Method Detail
-
init
@PostConstruct public void init() throws java.lang.Exception
- Overrides:
init
in classstep.core.deployment.AbstractServices
- Throws:
java.lang.Exception
-
saveNotificationGatewayConfiguration
@POST @Consumes("application/json") @Path("/gateway") public void saveNotificationGatewayConfiguration(NotificationGatewayConfiguration gatewayConfiguration)
-
getNotificationGatewayConfiguration
@GET @Consumes("application/json") @Path("/gateway/{id}") public NotificationGatewayConfiguration getNotificationGatewayConfiguration(@PathParam("id") java.lang.String id)
-
deleteNotificationGatewayConfiguration
@DELETE @Consumes("application/json") @Path("/gateway/{id}") public void deleteNotificationGatewayConfiguration(@PathParam("id") java.lang.String id)
-
getNotificationGatewayConfigurations
@GET @Consumes("application/json") @Path("/gateway/list") public java.util.List<NotificationGatewayConfiguration> getNotificationGatewayConfigurations()
-
getNotificationGatewayNames
@GET @Consumes("application/json") @Path("/gateway/list/info") public java.util.List<step.plugins.notification.NotificationServices.GatewayInfo> getNotificationGatewayNames()
- Returns:
- the names of the available gateways. This service is needed for the definition of new subscriptions and is thus requiring the right notification-subscription-write
-
saveNotificationSubscription
@POST @Consumes("application/json") @Path("/subscription") public void saveNotificationSubscription(NotificationSubscription subscription)
-
getNotificationSubscription
@GET @Consumes("application/json") @Path("/subscription/{id}") public NotificationSubscription getNotificationSubscription(@PathParam("id") java.lang.String id)
-
deleteNotificationSubscription
@DELETE @Consumes("application/json") @Path("/subscription/{id}") public void deleteNotificationSubscription(@PathParam("id") java.lang.String id)
-
getNotificationSubscriptionsByPlanRef
@POST @Consumes("application/json") @Path("/subscription/byplan") public java.util.List<NotificationSubscription> getNotificationSubscriptionsByPlanRef(step.core.repositories.RepositoryObjectReference planRef)
-
getAll
@GET @Path("/subscription/all") @Produces("application/json") public java.util.List<NotificationSubscription> getAll(@QueryParam("skip") java.lang.Integer skip, @QueryParam("limit") java.lang.Integer limit)
-
-