@Test public void testEventWrapper() { Map<String, String> info = new HashMap<String, String>(); info.put("key 1", "value 1"); MPEvent event = new MPEvent.Builder("some event name", MParticle.EventType.Other).customAttributes(info).build(); EventWrapper.MPEventWrapper wrapper = new EventWrapper.MPEventWrapper(event); Map<Integer, String> hashes = wrapper.getAttributeHashes(); String key = hashes.get(KitUtils.hashForFiltering(event.getEventType().ordinal() + event.getEventName() + "key 1")); assertEquals(info.get(key), "value 1"); assertEquals(KitUtils.hashForFiltering(event.getEventType().ordinal() + event.getEventName()),wrapper.getEventHash()); assertEquals(4, wrapper.getMessageType()); assertEquals(event.getEventType().ordinal(), wrapper.getEventTypeOrdinal()); }
public int getMessageType() { return matchList.get(0).mMessageType; }
CustomMapping { public int getMessageType() { return matchList.get(0).mMessageType; } }
CustomMapping { public int getMessageType() { return matchList.get(0).mMessageType; } CustomMapping(JSONObject projectionJson); }
CustomMapping { public int getMessageType() { return matchList.get(0).mMessageType; } CustomMapping(JSONObject projectionJson); List<CustomMappingMatch> getMatchList(); boolean isDefault(); List<ProjectionResult> project(EventWrapper.CommerceEventWrapper commerceEventWrapper); List<ProjectionResult> project(EventWrapper.MPEventWrapper event); int getMessageType(); static List<CustomMapping.ProjectionResult> projectEvents(MPEvent event, List<CustomMapping> customMappingList, CustomMapping defaultCustomMapping); static List<CustomMapping.ProjectionResult> projectEvents(CommerceEvent event, List<CustomMapping> customMappingList, CustomMapping defaultCommerceCustomMapping); static List<CustomMapping.ProjectionResult> projectEvents(MPEvent event, boolean isScreenEvent, List<CustomMapping> customMappingList, CustomMapping defaultCustomMapping, CustomMapping defaultScreenCustomMapping); }
CustomMapping { public int getMessageType() { return matchList.get(0).mMessageType; } CustomMapping(JSONObject projectionJson); List<CustomMappingMatch> getMatchList(); boolean isDefault(); List<ProjectionResult> project(EventWrapper.CommerceEventWrapper commerceEventWrapper); List<ProjectionResult> project(EventWrapper.MPEventWrapper event); int getMessageType(); static List<CustomMapping.ProjectionResult> projectEvents(MPEvent event, List<CustomMapping> customMappingList, CustomMapping defaultCustomMapping); static List<CustomMapping.ProjectionResult> projectEvents(CommerceEvent event, List<CustomMapping> customMappingList, CustomMapping defaultCommerceCustomMapping); static List<CustomMapping.ProjectionResult> projectEvents(MPEvent event, boolean isScreenEvent, List<CustomMapping> customMappingList, CustomMapping defaultCustomMapping, CustomMapping defaultScreenCustomMapping); final static String PROPERTY_LOCATION_EVENT_FIELD; final static String PROPERTY_LOCATION_EVENT_ATTRIBUTE; final static String PROPERTY_LOCATION_PRODUCT_FIELD; final static String PROPERTY_LOCATION_PRODUCT_ATTRIBUTE; final static String PROPERTY_LOCATION_PROMOTION_FIELD; }