Package org.apache.unomi.api.services
Interface GoalsService
-
- All Known Implementing Classes:
GoalsServiceImpl
public interface GoalsService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Campaign
getCampaign(String campaignId)
Retrieves the campaign identified by the specified identifierCampaignDetail
getCampaignDetail(String id)
Retrieves theCampaignDetail
associated with the campaign identified with the specified identifierPartialList<CampaignDetail>
getCampaignDetails(Query query)
Retrieves campaign details for campaigns matching the specified query.Set<Metadata>
getCampaignMetadatas()
Retrieves the set of Metadata associated with existing campaigns.Set<Metadata>
getCampaignMetadatas(Query query)
Retrieves the set of Metadata associated with existing campaign matching the specifiedQuery
PartialList<CampaignEvent>
getEvents(Query query)
RetrievesCampaignEvent
s matching the specified query.Goal
getGoal(String goalId)
Retrieves the goal associated with the specified identifier.Set<Metadata>
getGoalMetadatas()
Retrieves the set of Metadata associated with existing goals.Set<Metadata>
getGoalMetadatas(Query query)
Retrieves the set of Metadata associated with existing goals matching the specifiedQuery
GoalReport
getGoalReport(String goalId)
Retrieves the report for the goal identified with the specified identifier.GoalReport
getGoalReport(String goalId, AggregateQuery query)
Retrieves the report for the goal identified with the specified identifier, considering only elements determined by the specifiedAggregateQuery
.void
removeCampaign(String campaignId)
Removes the campaign associated with the specified identifier, also removing associated rules if needed.void
removeCampaignEvent(String campaignEventId)
Removes the campaign event associated with the specified identifier.void
removeGoal(String goalId)
Removes the goal associated with the specified identifier, also removing associated rules if needed.void
setCampaign(Campaign campaign)
Saves the specified campaign in the context server and creates associatedRule
s if the campaign is enabled.void
setCampaignEvent(CampaignEvent event)
Saves the specified campaign event in the context server.void
setGoal(Goal goal)
Saves the specified goal in the context server and creates associatedRule
s if the goal is enabled.
-
-
-
Method Detail
-
getGoalMetadatas
Set<Metadata> getGoalMetadatas()
Retrieves the set of Metadata associated with existing goals.- Returns:
- the set of Metadata associated with existing goals
-
getGoalMetadatas
Set<Metadata> getGoalMetadatas(Query query)
Retrieves the set of Metadata associated with existing goals matching the specifiedQuery
- Parameters:
query
- the Query used to filter the Goals which metadata we want to retrieve- Returns:
- the set of Metadata associated with existing goals matching the specified
Query
-
getGoal
Goal getGoal(String goalId)
Retrieves the goal associated with the specified identifier.- Parameters:
goalId
- the identifier of the goal to retrieve- Returns:
- the goal associated with the specified identifier or
null
if no such goal exists
-
setGoal
void setGoal(Goal goal)
Saves the specified goal in the context server and creates associatedRule
s if the goal is enabled. TODO: rename to saveGoal- Parameters:
goal
- the Goal to be saved
-
removeGoal
void removeGoal(String goalId)
Removes the goal associated with the specified identifier, also removing associated rules if needed.- Parameters:
goalId
- the identifier of the goal to be removed
-
getGoalReport
GoalReport getGoalReport(String goalId)
Retrieves the report for the goal identified with the specified identifier.- Parameters:
goalId
- the identifier of the goal which report we want to retrieve- Returns:
- the report for the specified goal
-
getGoalReport
GoalReport getGoalReport(String goalId, AggregateQuery query)
Retrieves the report for the goal identified with the specified identifier, considering only elements determined by the specifiedAggregateQuery
.- Parameters:
goalId
- the identifier of the goal which report we want to retrievequery
- an AggregateQuery to further specify which elements of the report we want- Returns:
- the report for the specified goal and query
-
getCampaignMetadatas
Set<Metadata> getCampaignMetadatas()
Retrieves the set of Metadata associated with existing campaigns.- Returns:
- the set of Metadata associated with existing campaigns
-
getCampaignMetadatas
Set<Metadata> getCampaignMetadatas(Query query)
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
PartialList<CampaignDetail> getCampaignDetails(Query query)
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
CampaignDetail getCampaignDetail(String id)
Retrieves theCampaignDetail
associated with the campaign identified with the specified identifier- Parameters:
id
- 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
-
getCampaign
Campaign getCampaign(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
-
setCampaign
void setCampaign(Campaign campaign)
Saves the specified campaign in the context server and creates associatedRule
s if the campaign is enabled. TODO: rename to saveCampaign- Parameters:
campaign
- the Campaign to be saved
-
removeCampaign
void removeCampaign(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
-
getEvents
PartialList<CampaignEvent> getEvents(Query query)
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
-
setCampaignEvent
void setCampaignEvent(CampaignEvent event)
Saves the specified campaign event in the context server. TODO: rename to saveCampaignEvent- Parameters:
event
- the CampaignEvent to be saved
-
removeCampaignEvent
void removeCampaignEvent(String campaignEventId)
Removes the campaign event associated with the specified identifier.- Parameters:
campaignEventId
- the identifier of the campaign event to be removed
-
-