@Test public void setParamsTest() { gesture.setName("gesture").setAction(Gesture.Action.Exit).setChapter2("chapter2").setParams(); assertEquals(3, buffer.getVolatileParams().size()); assertEquals(0, buffer.getPersistentParams().size()); assertEquals(1, buffer.getVolatileParams().get("click").getValues().size()); assertEquals("S", buffer.getVolatileParams().get("click").getValues().get(0).execute()); assertEquals(1, buffer.getVolatileParams().get("type").getValues().size()); assertEquals("click", buffer.getVolatileParams().get("type").getValues().get(0).execute()); assertEquals(1, buffer.getVolatileParams().get("p").getValues().size()); assertEquals("chapter2::gesture", buffer.getVolatileParams().get("p").getValues().get(0).execute()); }
@Override void setParams() { String sn = TechnicalContext.getScreenName(); if (sn != null) { tracker.setParam(Hit.HitParam.TouchScreen.stringValue(), sn, new ParamOption().setEncode(true)); } String lvl2 = TechnicalContext.getLevel2(); if (lvl2 != null) { tracker.setParam(Hit.HitParam.TouchLevel2.stringValue(), lvl2); } if (level2 != null) { tracker.setParam(Hit.HitParam.Level2.stringValue(), level2); } if (internalSearch != null) { action = Action.InternalSearch; internalSearch.setParams(); } String value = chapter1; if (value == null) { value = chapter2; } else { value += (chapter2 == null) ? "" : ("::" + chapter2); } if (value == null) { value = chapter3; } else { value += (chapter3 == null) ? "" : ("::" + chapter3); } if (value == null) { value = name; } else { value += (name == null) ? "" : ("::" + name); } if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.Touch.stringValue(), action.stringValue()) .setParam(Hit.HitParam.HitType.stringValue(), "click") .setParam(Hit.HitParam.Screen.stringValue(), value, new ParamOption().setRelativePosition(ParamOption.RelativePosition.after) .setRelativeParameterKey(Hit.HitParam.UserId.stringValue()) .setEncode(true)); }
Gesture extends BusinessObject { @Override void setParams() { String sn = TechnicalContext.getScreenName(); if (sn != null) { tracker.setParam(Hit.HitParam.TouchScreen.stringValue(), sn, new ParamOption().setEncode(true)); } String lvl2 = TechnicalContext.getLevel2(); if (lvl2 != null) { tracker.setParam(Hit.HitParam.TouchLevel2.stringValue(), lvl2); } if (level2 != null) { tracker.setParam(Hit.HitParam.Level2.stringValue(), level2); } if (internalSearch != null) { action = Action.InternalSearch; internalSearch.setParams(); } String value = chapter1; if (value == null) { value = chapter2; } else { value += (chapter2 == null) ? "" : ("::" + chapter2); } if (value == null) { value = chapter3; } else { value += (chapter3 == null) ? "" : ("::" + chapter3); } if (value == null) { value = name; } else { value += (name == null) ? "" : ("::" + name); } if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.Touch.stringValue(), action.stringValue()) .setParam(Hit.HitParam.HitType.stringValue(), "click") .setParam(Hit.HitParam.Screen.stringValue(), value, new ParamOption().setRelativePosition(ParamOption.RelativePosition.after) .setRelativeParameterKey(Hit.HitParam.UserId.stringValue()) .setEncode(true)); } }
Gesture extends BusinessObject { @Override void setParams() { String sn = TechnicalContext.getScreenName(); if (sn != null) { tracker.setParam(Hit.HitParam.TouchScreen.stringValue(), sn, new ParamOption().setEncode(true)); } String lvl2 = TechnicalContext.getLevel2(); if (lvl2 != null) { tracker.setParam(Hit.HitParam.TouchLevel2.stringValue(), lvl2); } if (level2 != null) { tracker.setParam(Hit.HitParam.Level2.stringValue(), level2); } if (internalSearch != null) { action = Action.InternalSearch; internalSearch.setParams(); } String value = chapter1; if (value == null) { value = chapter2; } else { value += (chapter2 == null) ? "" : ("::" + chapter2); } if (value == null) { value = chapter3; } else { value += (chapter3 == null) ? "" : ("::" + chapter3); } if (value == null) { value = name; } else { value += (name == null) ? "" : ("::" + name); } if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.Touch.stringValue(), action.stringValue()) .setParam(Hit.HitParam.HitType.stringValue(), "click") .setParam(Hit.HitParam.Screen.stringValue(), value, new ParamOption().setRelativePosition(ParamOption.RelativePosition.after) .setRelativeParameterKey(Hit.HitParam.UserId.stringValue()) .setEncode(true)); } Gesture(Tracker tracker); }
Gesture extends BusinessObject { @Override void setParams() { String sn = TechnicalContext.getScreenName(); if (sn != null) { tracker.setParam(Hit.HitParam.TouchScreen.stringValue(), sn, new ParamOption().setEncode(true)); } String lvl2 = TechnicalContext.getLevel2(); if (lvl2 != null) { tracker.setParam(Hit.HitParam.TouchLevel2.stringValue(), lvl2); } if (level2 != null) { tracker.setParam(Hit.HitParam.Level2.stringValue(), level2); } if (internalSearch != null) { action = Action.InternalSearch; internalSearch.setParams(); } String value = chapter1; if (value == null) { value = chapter2; } else { value += (chapter2 == null) ? "" : ("::" + chapter2); } if (value == null) { value = chapter3; } else { value += (chapter3 == null) ? "" : ("::" + chapter3); } if (value == null) { value = name; } else { value += (name == null) ? "" : ("::" + name); } if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.Touch.stringValue(), action.stringValue()) .setParam(Hit.HitParam.HitType.stringValue(), "click") .setParam(Hit.HitParam.Screen.stringValue(), value, new ParamOption().setRelativePosition(ParamOption.RelativePosition.after) .setRelativeParameterKey(Hit.HitParam.UserId.stringValue()) .setEncode(true)); } Gesture(Tracker tracker); @Deprecated InternalSearch InternalSearch(String keywordLabel, int resultScreenNumber); InternalSearch InternalSearch(String keywordLabel, int resultScreenNumber, int resultPosition); CustomObjects CustomObjects(); String getName(); String getChapter1(); String getChapter2(); String getChapter3(); Action getAction(); int getLevel2(); String getLevel2String(); Gesture setName(String name); Gesture setChapter1(String chapter1); Gesture setChapter2(String chapter2); Gesture setChapter3(String chapter3); Gesture setAction(Action action); Gesture setLevel2(int level2); Gesture setLevel2(String level2); void sendNavigation(); void sendExit(); void sendDownload(); void sendTouch(); void sendSearch(); }
Gesture extends BusinessObject { @Override void setParams() { String sn = TechnicalContext.getScreenName(); if (sn != null) { tracker.setParam(Hit.HitParam.TouchScreen.stringValue(), sn, new ParamOption().setEncode(true)); } String lvl2 = TechnicalContext.getLevel2(); if (lvl2 != null) { tracker.setParam(Hit.HitParam.TouchLevel2.stringValue(), lvl2); } if (level2 != null) { tracker.setParam(Hit.HitParam.Level2.stringValue(), level2); } if (internalSearch != null) { action = Action.InternalSearch; internalSearch.setParams(); } String value = chapter1; if (value == null) { value = chapter2; } else { value += (chapter2 == null) ? "" : ("::" + chapter2); } if (value == null) { value = chapter3; } else { value += (chapter3 == null) ? "" : ("::" + chapter3); } if (value == null) { value = name; } else { value += (name == null) ? "" : ("::" + name); } if (customObjectsMap != null) { for (CustomObject co : customObjectsMap.values()) { co.setParams(); } } tracker.setParam(Hit.HitParam.Touch.stringValue(), action.stringValue()) .setParam(Hit.HitParam.HitType.stringValue(), "click") .setParam(Hit.HitParam.Screen.stringValue(), value, new ParamOption().setRelativePosition(ParamOption.RelativePosition.after) .setRelativeParameterKey(Hit.HitParam.UserId.stringValue()) .setEncode(true)); } Gesture(Tracker tracker); @Deprecated InternalSearch InternalSearch(String keywordLabel, int resultScreenNumber); InternalSearch InternalSearch(String keywordLabel, int resultScreenNumber, int resultPosition); CustomObjects CustomObjects(); String getName(); String getChapter1(); String getChapter2(); String getChapter3(); Action getAction(); int getLevel2(); String getLevel2String(); Gesture setName(String name); Gesture setChapter1(String chapter1); Gesture setChapter2(String chapter2); Gesture setChapter3(String chapter3); Gesture setAction(Action action); Gesture setLevel2(int level2); Gesture setLevel2(String level2); void sendNavigation(); void sendExit(); void sendDownload(); void sendTouch(); void sendSearch();  }