@Override public void setCampaignEvent(CampaignEvent event) { persistenceService.save(event); }
@Override public void save(UserList list) { persistenceService.save(list); }
@Override public void setCampaignEvent(CampaignEvent event) { persistenceService.save(event); }
public Persona savePersona(Persona profile) { if (persistenceService.load(profile.getItemId(), Persona.class) == null) { Session session = new PersonaSession(UUID.randomUUID().toString(), profile, new Date()); persistenceService.save(profile); persistenceService.save(session); } else { persistenceService.save(profile); } return persistenceService.load(profile.getItemId(), Persona.class); }
public Persona savePersona(Persona profile) { if (persistenceService.load(profile.getItemId(), Persona.class) == null) { Session session = new PersonaSession(UUID.randomUUID().toString(), profile, new Date()); persistenceService.save(profile); persistenceService.save(session); } else { persistenceService.save(profile); } return persistenceService.load(profile.getItemId(), Persona.class); }
public void setActionType(ActionType actionType) { actionTypeById.put(actionType.getMetadata().getId(), actionType); persistenceService.save(actionType); }
public void setConditionType(ConditionType conditionType) { conditionTypeById.put(conditionType.getMetadata().getId(), conditionType); persistenceService.save(conditionType); }
public void setActionType(ActionType actionType) { actionTypeById.put(actionType.getMetadata().getId(), actionType); persistenceService.save(actionType); }
@Override public boolean setPropertyType(PropertyType property) { PropertyType previousProperty = persistenceService.load(property.getItemId(), PropertyType.class); boolean result = false; if (previousProperty == null) { result = persistenceService.save(property); propertyTypes = propertyTypes.with(property); } else if (merge(previousProperty, property)) { result = persistenceService.save(previousProperty); propertyTypes = propertyTypes.with(previousProperty); } return result; }
private Profile save(Profile profile, boolean forceRefresh) { if (profile.getItemId() == null) { return null; } if (persistenceService.save(profile)) { if (forceRefresh) { // triggering a load will force an in-place refresh, that may be expensive in performance but will make data immediately available. return persistenceService.load(profile.getItemId(), Profile.class); } else { return profile; } } return null; }
public Session saveSession(Session session) { if (session.getItemId() == null) { return null; } if (session.getProfile() != null && session.getProfile().getProperties() != null) { session.getProfile().setProperties(removePersonalIdentifiersFromSessionProfile(session.getProfile().getProperties())); } return persistenceService.save(session) ? session : null; }
public Session saveSession(Session session) { if (session.getItemId() == null) { return null; } if (session.getProfile() != null && session.getProfile().getProperties() != null) { session.getProfile().setProperties(removePersonalIdentifiersFromSessionProfile(session.getProfile().getProperties())); } return persistenceService.save(session) ? session : null; }
public void setSegmentDefinition(Segment segment) { ParserHelper.resolveConditionType(definitionsService, segment.getCondition()); if (segment.getMetadata().isEnabled() && !segment.getMetadata().isMissingPlugins()) { updateAutoGeneratedRules(segment.getMetadata(), segment.getCondition()); } // make sure we update the name and description metadata that might not match, so first we remove the entry from the map persistenceService.save(segment); updateExistingProfilesForSegment(segment); }
public void setSegmentDefinition(Segment segment) { ParserHelper.resolveConditionType(definitionsService, segment.getCondition()); if (segment.getMetadata().isEnabled() && !segment.getMetadata().isMissingPlugins()) { updateAutoGeneratedRules(segment.getMetadata(), segment.getCondition()); } // make sure we update the name and description metadata that might not match, so first we remove the entry from the map persistenceService.save(segment); updateExistingProfilesForSegment(segment); }
public void setRule(Rule rule) { if (rule.getMetadata().getScope() == null) { rule.getMetadata().setScope("systemscope"); } Condition condition = rule.getCondition(); if (condition != null) { if (rule.getMetadata().isEnabled() && !rule.getMetadata().isMissingPlugins()) { ParserHelper.resolveConditionType(definitionsService, condition); definitionsService.extractConditionBySystemTag(condition, "eventCondition"); } } persistenceService.save(rule); }
public void setRule(Rule rule) { if (rule.getMetadata().getScope() == null) { rule.getMetadata().setScope("systemscope"); } Condition condition = rule.getCondition(); if (condition != null) { if (rule.getMetadata().isEnabled() && !rule.getMetadata().isMissingPlugins()) { ParserHelper.resolveConditionType(definitionsService, condition); definitionsService.extractConditionBySystemTag(condition, "eventCondition"); } } persistenceService.save(rule); }
public void setCampaign(Campaign campaign) { ParserHelper.resolveConditionType(definitionsService, campaign.getEntryCondition()); if(rulesService.getRule(campaign.getMetadata().getId() + "EntryEvent") != null) { rulesService.removeRule(campaign.getMetadata().getId() + "EntryEvent"); } if (campaign.getMetadata().isEnabled()) { if (campaign.getEntryCondition() != null) { createRule(campaign, campaign.getEntryCondition()); } } persistenceService.save(campaign); }
public void setCampaign(Campaign campaign) { ParserHelper.resolveConditionType(definitionsService, campaign.getEntryCondition()); if(rulesService.getRule(campaign.getMetadata().getId() + "EntryEvent") != null) { rulesService.removeRule(campaign.getMetadata().getId() + "EntryEvent"); } if (campaign.getMetadata().isEnabled()) { if (campaign.getEntryCondition() != null) { createRule(campaign, campaign.getEntryCondition()); } } persistenceService.save(campaign); }