String sen = event.getSen() != null ? event.getSen() : DEFAULT_SEN_VALUE; String sourceIP = event.getSourceIP() != null ? event.getSourceIP() : DEFAULT_SOURCE_IP_VALUE; String subProduct = event.getSubProduct() != null ? event.getSubProduct() : DEFAULT_SUB_PRODUCT_VALUE; String atlPath = event.getAtlPath() != null ? event.getAtlPath() : DEFAULT_ALT_PATH_VALUE; String appAccess = event.getAppAccess() != null ? event.getAppAccess() : DEFAULT_APP_ACCESS_VALUE;
public Builder(AnalyticsEvent template) { this.name = template.getName(); this.server = template.getServer(); this.product = template.getProduct(); this.subproduct = template.getSubProduct(); this.version = template.getVersion(); this.user = template.getUser(); this.session = template.getSession(); this.clientTime = template.getClientTime(); this.receivedTime = template.getReceivedTime(); this.sen = template.getSen(); this.sourceIP = template.getSourceIP(); this.atlPath = template.getAtlPath(); this.appAccess = template.getAppAccess(); this.requestCorrelationId = template.getRequestCorrelationId(); this.properties = ImmutableMap.copyOf(template.getProperties()); }
public Builder(AnalyticsEvent template) { this.name = template.getName(); this.server = template.getServer(); this.product = template.getProduct(); this.subproduct = template.getSubProduct(); this.version = template.getVersion(); this.user = template.getUser(); this.session = template.getSession(); this.clientTime = template.getClientTime(); this.receivedTime = template.getReceivedTime(); this.sen = template.getSen(); this.sourceIP = template.getSourceIP(); this.atlPath = template.getAtlPath(); this.appAccess = template.getAppAccess(); this.requestCorrelationId = template.getRequestCorrelationId(); this.properties = ImmutableMap.copyOf(template.getProperties()); }
public EventMessage toEventMessage() { EventMessage msg = new EventMessage(); msg.setName(getName()); msg.setServer(getServer()); msg.setProduct(getProduct()); msg.setSubProduct(getSubProduct()); msg.setVersion(getVersion()); msg.setUser(getUser()); msg.setSession(getSession()); msg.setClientTime(getClientTime()); msg.setReceivedTime(getReceivedTime()); msg.setSen(getSen()); msg.setSourceIP(getSourceIP()); msg.setAtlPath(getAtlPath()); msg.setAppAccess(getAppAccess()); msg.setRequestCorrelationId(getRequestCorrelationId()); msg.setProperties(ImmutableMap.<CharSequence, Object>copyOf(getProperties())); return msg; } }