public MetadataItem(Metadata metadata) { super(metadata.getId()); this.metadata = metadata; }
public void setMetadata(Metadata metadata) { this.itemId = metadata.getId(); this.metadata = metadata; }
public void setMetadata(Metadata metadata) { this.itemId = metadata.getId(); this.metadata = metadata; }
public static PropertyType getPropertyTypeById(Collection<PropertyType> propertyTypes, String propertyTypeId) { for (PropertyType propertyType : propertyTypes) { if (propertyType.getMetadata().getId().equals(propertyTypeId)) { return propertyType; } } return null; }
private Map removePersonalIdentifiersFromSessionProfile(final Map<String, Object> profileProperties) { Set<PropertyType> personalIdsProps = getPropertyTypeBySystemTag(PERSONAL_IDENTIFIER_TAG_NAME); final List personalIdsPropsNames = new ArrayList<String>(); personalIdsProps.forEach(propType -> personalIdsPropsNames.add(propType.getMetadata().getId())); Set propsToRemove = new HashSet<String>(); profileProperties.keySet().forEach(propKey -> { if (personalIdsPropsNames.contains(propKey)) { propsToRemove.add(propKey); } }); propsToRemove.forEach(propId -> profileProperties.remove(propId)); return profileProperties; }
private Map removePersonalIdentifiersFromSessionProfile(final Map<String, Object> profileProperties) { Set<PropertyType> personalIdsProps = getPropertyTypeBySystemTag(PERSONAL_IDENTIFIER_TAG_NAME); final List personalIdsPropsNames = new ArrayList<String>(); personalIdsProps.forEach(propType -> personalIdsPropsNames.add(propType.getMetadata().getId())); Set propsToRemove = new HashSet<String>(); profileProperties.keySet().forEach(propKey -> { if (personalIdsPropsNames.contains(propKey)) { propsToRemove.add(propKey); } }); propsToRemove.forEach(propId -> profileProperties.remove(propId)); return profileProperties; }
@Override public List<String> getDeniedProperties(String profileId) { List deniedProperties = new ArrayList<String>(); Set<PropertyType> personalIdsProps = profileService.getPropertyTypeBySystemTag(ProfileService.PERSONAL_IDENTIFIER_TAG_NAME); personalIdsProps.forEach(propType -> deniedProperties.add(propType.getMetadata().getId())); return deniedProperties; }
public String getPropertyTypeMapping(String fromPropertyTypeId) { Collection<PropertyType> types = getPropertyTypeByMapping(fromPropertyTypeId); if (types.size() > 0) { return types.iterator().next().getMetadata().getId(); } return null; }
public String getPropertyTypeMapping(String fromPropertyTypeId) { Collection<PropertyType> types = getPropertyTypeByMapping(fromPropertyTypeId); if (types.size() > 0) { return types.iterator().next().getMetadata().getId(); } return null; }
public void updateAutoGeneratedRules(Metadata metadata, Condition condition) { List<Rule> previousRules = persistenceService.query("linkedItems", metadata.getId(), null, Rule.class); List<Rule> rules = new ArrayList<Rule>(); if (condition != null) { getAutoGeneratedRules(metadata, condition, null, rules); } for (Rule rule : rules) { rulesService.setRule(rule); } previousRules.removeAll(rules); clearAutoGeneratedRules(previousRules, metadata.getId()); }
public void setActionType(ActionType actionType) { actionTypeById.put(actionType.getMetadata().getId(), actionType); persistenceService.save(actionType); }
public void updateAutoGeneratedRules(Metadata metadata, Condition condition) { List<Rule> previousRules = persistenceService.query("linkedItems", metadata.getId(), null, Rule.class); List<Rule> rules = new ArrayList<Rule>(); if (condition != null) { getAutoGeneratedRules(metadata, condition, null, rules); } for (Rule rule : rules) { rulesService.setRule(rule); } previousRules.removeAll(rules); clearAutoGeneratedRules(previousRules, metadata.getId()); }
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 setConditionType(ConditionType conditionType) { conditionTypeById.put(conditionType.getMetadata().getId(), conditionType); persistenceService.save(conditionType); }
public void removeCampaign(String id) { for(Metadata m : getCampaignGoalMetadatas(id)) { removeGoal(m.getId()); } rulesService.removeRule(id + "EntryEvent"); persistenceService.remove(id, Campaign.class); }
public void removeCampaign(String id) { for(Metadata m : getCampaignGoalMetadatas(id)) { removeGoal(m.getId()); } rulesService.removeRule(id + "EntryEvent"); persistenceService.remove(id, Campaign.class); }
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); }