Package org.apache.unomi.rest.endpoints
Class CampaignsServiceEndPoint
java.lang.Object
org.apache.unomi.rest.endpoints.CampaignsServiceEndPoint
@Produces("application/json")
@Consumes("application/json")
@Path("/campaigns")
public class CampaignsServiceEndPoint
extends Object
A JAX-RS endpoint to manage
Campaign
s and related information.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCampaignDefinition
(String campaignID) Retrieves the campaign identified by the specified identifiergetCampaignDetail
(String campaignID) Retrieves theCampaignDetail
associated with the campaign identified with the specified identifiergetCampaignDetails
(Query query) Retrieves campaign details for campaigns matching the specified query.getCampaignEvents
(Query query) RetrievesCampaignEvent
s matching the specified query.Retrieves the set of Metadata associated with existing campaigns.getCampaignMetadatas
(Query query) Retrieves the set of Metadata associated with existing campaign matching the specifiedQuery
void
removeCampaignDefinition
(String campaignID) Removes the campaign associated with the specified identifier, also removing associated rules if needed.void
removeCampaignEventDefinition
(String campaignEventID) Removes the campaign event associated with the specified identifier.void
setCampaignDefinition
(Campaign campaign) Saves the specified campaign in the context server and creates associatedRule
s if the campaign is enabled.void
setCampaignEventDefinition
(CampaignEvent campaignEvent) Saves the specified campaign event in the context server.void
setGoalsService
(GoalsService goalsService)
-
Constructor Details
-
CampaignsServiceEndPoint
public CampaignsServiceEndPoint()
-
-
Method Details
-
setGoalsService
-
getCampaignMetadatas
Retrieves the set of Metadata associated with existing campaigns.- Returns:
- the set of Metadata associated with existing campaigns
-
setCampaignDefinition
Saves the specified campaign in the context server and creates associatedRule
s if the campaign is enabled.- Parameters:
campaign
- the Campaign to be saved
-
getCampaignMetadatas
Retrieves the set of Metadata associated with existing campaign matching the specifiedQuery
- Parameters:
query
- the Query used to filter the campagins which metadata we want to retrieve- Returns:
- the set of Metadata associated with existing campaigns matching the specified
Query
-
getCampaignDetails
Retrieves campaign details for campaigns matching the specified query.- Parameters:
query
- the query specifying which campaigns to retrieve- Returns:
- a
PartialList
of campaign details for the campaigns matching the specified query
-
getCampaignDetail
@GET @Path("/{campaignID}/detailed") public CampaignDetail getCampaignDetail(@PathParam("campaignID") String campaignID) Retrieves theCampaignDetail
associated with the campaign identified with the specified identifier- Parameters:
campaignID
- the identifier of the campaign for which we want to retrieve the details- Returns:
- the CampaignDetail for the campaign identified by the specified identifier or
null
if no such campaign exists
-
getCampaignDefinition
@GET @Path("/{campaignID}") public Campaign getCampaignDefinition(@PathParam("campaignID") String campaignID) Retrieves the campaign identified by the specified identifier- Parameters:
campaignID
- the identifier of the campaign we want to retrieve- Returns:
- the campaign associated with the specified identifier or
null
if no such campaign exists
-
removeCampaignDefinition
@DELETE @Path("/{campaignID}") public void removeCampaignDefinition(@PathParam("campaignID") String campaignID) Removes the campaign associated with the specified identifier, also removing associated rules if needed.- Parameters:
campaignID
- the identifier of the campaign to be removed
-
setCampaignEventDefinition
Saves the specified campaign event in the context server.- Parameters:
campaignEvent
- the CampaignEvent to be saved
-
removeCampaignEventDefinition
@DELETE @Path("/event/{eventId}") public void removeCampaignEventDefinition(@PathParam("eventId") String campaignEventID) Removes the campaign event associated with the specified identifier.- Parameters:
campaignEventID
- the identifier of the campaign event to be removed
-
getCampaignEvents
RetrievesCampaignEvent
s matching the specified query.- Parameters:
query
- the Query specifying which CampaignEvents to retrieve- Returns:
- a
PartialList
of campaign events matching the specified query
-