ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [26/59] [abbrv] ambari git commit: AMBARI-18310. Refactor logsearch portal side code - Part 2 (oleewere)
Date Sat, 05 Nov 2016 16:35:21 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonServiceLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonServiceLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonServiceLogRequestConverter.java
index a02d585..2282c11 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonServiceLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonServiceLogRequestConverter.java
@@ -18,37 +18,38 @@
  */
 package org.apache.ambari.logsearch.query.converter;
 
-import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.model.request.impl.BaseServiceLogRequest;
-import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonServiceLogSearchCriteria;
 import org.apache.commons.lang.StringEscapeUtils;
 
-public abstract class AbstractCommonServiceLogRequestConverter<SOURCE extends BaseServiceLogRequest, RESULT extends CommonSearchCriteria>
+public abstract class AbstractCommonServiceLogRequestConverter<SOURCE extends BaseServiceLogRequest, RESULT extends CommonServiceLogSearchCriteria>
   extends AbstractCommonSearchRequestConverter<SOURCE, RESULT> {
 
   @Override
   public RESULT convertToSearchCriteria(SOURCE request) {
     RESULT criteria = createCriteria(request);
+    // TODO: check are these used from the UI or not?
     criteria.addParam("advanceSearch", StringEscapeUtils.unescapeXml(request.getAdvancedSearch()));
     criteria.addParam("q", request.getQuery());
-    criteria.addParam("treeParams", StringEscapeUtils.unescapeHtml(request.getTreeParams()));
-    criteria.addParam("level", request.getLevel());
     criteria.addParam("gMustNot", request.getgMustNot());
-    criteria.addParam("from", request.getFrom());
-    criteria.addParam("to", request.getTo());
-    criteria.addParam("selectComp", request.getMustBe());
-    criteria.addParam("unselectComp", request.getMustNot());
-    criteria.addParam("iMessage", StringEscapeUtils.unescapeXml(request.getiMessage()));
     criteria.addParam("gEMessage", StringEscapeUtils.unescapeXml(request.getgEMessage()));
-    criteria.addParam("eMessage", StringEscapeUtils.unescapeXml(request.getgEMessage()));
-    criteria.addParam(LogSearchConstants.BUNDLE_ID, request.getBundleId());
-    criteria.addParam("host_name", request.getHostName());
-    criteria.addParam("component_name", request.getComponentName());
-    criteria.addParam("file_name", request.getFileName());
-    criteria.addParam("startDate", request.getStartTime());
-    criteria.addParam("endDate", request.getEndTime());
-    criteria.addParam("excludeQuery", StringEscapeUtils.unescapeXml(request.getExcludeQuery()));
-    criteria.addParam("includeQuery", StringEscapeUtils.unescapeXml(request.getIncludeQuery()));
+    criteria.addParam("unselectComp", request.getMustNot());
+
+    criteria.setTreeParams(StringEscapeUtils.unescapeHtml(request.getTreeParams()));
+    criteria.setLevel(request.getLevel());
+    criteria.setFrom(request.getFrom());
+    criteria.setTo(request.getTo());
+    criteria.setSelectComp(request.getMustBe());
+    criteria.setBundleId(request.getBundleId());
+    criteria.setHostName(request.getHostName());
+    criteria.setComponentName(request.getComponentName());
+    criteria.setFileName(request.getFileName());
+    criteria.setIncludeMessage(StringEscapeUtils.unescapeXml(request.getiMessage()));
+    criteria.setExcludeMessage(StringEscapeUtils.unescapeXml(request.getgEMessage()));
+    criteria.setStartTime(request.getStartTime());
+    criteria.setEndTime(request.getEndTime());
+    criteria.setExcludeQuery(StringEscapeUtils.unescapeXml(request.getExcludeQuery()));
+    criteria.setIncludeQuery(StringEscapeUtils.unescapeXml(request.getIncludeQuery()));
     return criteria;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractConverterAware.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractConverterAware.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractConverterAware.java
new file mode 100644
index 0000000..18a71c1
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractConverterAware.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.query.converter;
+
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.core.convert.ConversionService;
+import org.springframework.core.convert.converter.Converter;
+import org.springframework.core.convert.converter.ConverterRegistry;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+
+public abstract class AbstractConverterAware<SOURCE, RESULT> implements Converter<SOURCE, RESULT> {
+
+  @Inject
+  @Qualifier("conversionService")
+  private ConversionService conversionService;
+
+  public ConversionService getConversionService() {
+    return conversionService;
+  }
+
+  @PostConstruct
+  private void register() {
+    if (conversionService instanceof ConverterRegistry) {
+      ((ConverterRegistry) conversionService).addConverter(this);
+    } else {
+      throw new IllegalStateException("Can't register Converter to ConverterRegistry");
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AnyGraphRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AnyGraphRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AnyGraphRequestConverter.java
index 0372168..1639563 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AnyGraphRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AnyGraphRequestConverter.java
@@ -28,12 +28,12 @@ public class AnyGraphRequestConverter extends AbstractCommonSearchRequestConvert
   @Override
   public AnyGraphSearchCriteria convertToSearchCriteria(AnyGraphRequest anyGraphRequest) {
     AnyGraphSearchCriteria criteria = new AnyGraphSearchCriteria();
-    criteria.addParam("xAxis", anyGraphRequest.getxAxis());
-    criteria.addParam("yAxis", anyGraphRequest.getyAxis());
-    criteria.addParam("stackBy", anyGraphRequest.getStackBy());
-    criteria.addParam("unit", anyGraphRequest.getUnit());
-    criteria.addParam("from", anyGraphRequest.getFrom());
-    criteria.addParam("to", anyGraphRequest.getTo());
+    criteria.setxAxis(anyGraphRequest.getxAxis());
+    criteria.setyAxis(anyGraphRequest.getyAxis());
+    criteria.setStackBy(anyGraphRequest.getStackBy());
+    criteria.setUnit(anyGraphRequest.getUnit());
+    criteria.setFrom(anyGraphRequest.getFrom());
+    criteria.setTo(anyGraphRequest.getTo());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditBarGraphRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditBarGraphRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditBarGraphRequestConverter.java
index f72a673..ac74287 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditBarGraphRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditBarGraphRequestConverter.java
@@ -28,7 +28,7 @@ public class AuditBarGraphRequestConverter extends AbstractCommonAuditLogRequest
   @Override
   public AuditBarGraphSearchCriteria createCriteria(AuditBarGraphRequest request) {
     AuditBarGraphSearchCriteria criteria = new AuditBarGraphSearchCriteria();
-    criteria.addParam("unit", request.getUnit());
+    criteria.setUnit(request.getUnit());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditLogRequestConverter.java
index 27d314d..5ec7632 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AuditLogRequestConverter.java
@@ -28,7 +28,7 @@ public class AuditLogRequestConverter extends AbstractCommonAuditLogRequestConve
   @Override
   public AuditLogSearchCriteria createCriteria(AuditLogRequest request) {
     AuditLogSearchCriteria criteria = new AuditLogSearchCriteria();
-    criteria.addParam("isLastPage", request.isLastPage());
+    criteria.setLastPage(request.isLastPage());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/BaseServiceLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/BaseServiceLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/BaseServiceLogRequestConverter.java
index cfd544c..efc9bc9 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/BaseServiceLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/BaseServiceLogRequestConverter.java
@@ -20,13 +20,14 @@ package org.apache.ambari.logsearch.query.converter;
 
 import org.apache.ambari.logsearch.model.request.impl.BaseServiceLogRequest;
 import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonServiceLogSearchCriteria;
 import org.springframework.stereotype.Component;
 
 @Component
-public class BaseServiceLogRequestConverter extends AbstractCommonServiceLogRequestConverter<BaseServiceLogRequest, CommonSearchCriteria> {
+public class BaseServiceLogRequestConverter extends AbstractCommonServiceLogRequestConverter<BaseServiceLogRequest, CommonServiceLogSearchCriteria> {
 
   @Override
-  public CommonSearchCriteria createCriteria(BaseServiceLogRequest request) {
-    return new CommonSearchCriteria();
+  public CommonServiceLogSearchCriteria createCriteria(BaseServiceLogRequest request) {
+    return new CommonServiceLogSearchCriteria();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldAuditLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldAuditLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldAuditLogRequestConverter.java
index 089b593..6197d48 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldAuditLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldAuditLogRequestConverter.java
@@ -28,7 +28,7 @@ public class FieldAuditLogRequestConverter extends AbstractCommonAuditLogRequest
   @Override
   public FieldAuditLogSearchCriteria createCriteria(FieldAuditLogRequest request) {
     FieldAuditLogSearchCriteria criteria = new FieldAuditLogSearchCriteria();
-    criteria.addParam("field", request.getField());
+    criteria.setField(request.getField());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldBarGraphRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldBarGraphRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldBarGraphRequestConverter.java
index dd518f8..74b0dac 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldBarGraphRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/FieldBarGraphRequestConverter.java
@@ -28,8 +28,8 @@ public class FieldBarGraphRequestConverter extends AbstractCommonAuditLogRequest
   @Override
   public FieldAuditBarGraphSearchCriteria createCriteria(FieldAuditBarGraphRequest request) {
     FieldAuditBarGraphSearchCriteria criteria = new FieldAuditBarGraphSearchCriteria();
-    criteria.addParam("unit", request.getUnit());
-    criteria.addParam("field", request.getField());
+    criteria.setUnit(request.getUnit());
+    criteria.setField(request.getField());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileRequestConverter.java
index 7c3038e..62c2fbe 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileRequestConverter.java
@@ -29,9 +29,9 @@ public class LogFileRequestConverter implements Converter<LogFileRequest, LogFil
   @Override
   public LogFileSearchCriteria convert(LogFileRequest request) {
     LogFileSearchCriteria criteria = new LogFileSearchCriteria();
-    criteria.addParam("component", request.getComponent());
-    criteria.addParam("host", request.getHost());
-    criteria.addParam("logType", request.getLogType());
+    criteria.setLogFileComponent(request.getComponent());
+    criteria.setLogFileHost(request.getHost());
+    criteria.setLogType(request.getLogType());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileTailRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileTailRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileTailRequestConverter.java
index 88b1a34..08c6ecc 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileTailRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/LogFileTailRequestConverter.java
@@ -29,10 +29,10 @@ public class LogFileTailRequestConverter implements Converter<LogFileTailRequest
   @Override
   public LogFileTailSearchCriteria convert(LogFileTailRequest request) {
     LogFileTailSearchCriteria criteria = new LogFileTailSearchCriteria();
-    criteria.addParam("component", request.getComponent());
-    criteria.addParam("host", request.getHost());
-    criteria.addParam("logType", request.getLogType());
-    criteria.addParam("tailSize", request.getTailSize());
+    criteria.setLogFileComponent(request.getComponent());
+    criteria.setLogFileHost(request.getHost());
+    criteria.setLogType(request.getLogType());
+    criteria.setLogTailSize(request.getTailSize());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceAnyGraphRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceAnyGraphRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceAnyGraphRequestConverter.java
index 7a559de..8f1aaf0 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceAnyGraphRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceAnyGraphRequestConverter.java
@@ -28,12 +28,12 @@ public class ServiceAnyGraphRequestConverter extends AbstractCommonServiceLogReq
   @Override
   public ServiceAnyGraphSearchCriteria createCriteria(ServiceAnyGraphRequest anyGraphRequest) {
     ServiceAnyGraphSearchCriteria criteria = new ServiceAnyGraphSearchCriteria();
-    criteria.addParam("xAxis", anyGraphRequest.getxAxis());
-    criteria.addParam("yAxis", anyGraphRequest.getyAxis());
-    criteria.addParam("stackBy", anyGraphRequest.getStackBy());
-    criteria.addParam("unit", anyGraphRequest.getUnit());
-    criteria.addParam("from", anyGraphRequest.getFrom());
-    criteria.addParam("to", anyGraphRequest.getTo());
+    criteria.setxAxis(anyGraphRequest.getxAxis());
+    criteria.setyAxis(anyGraphRequest.getyAxis());
+    criteria.setStackBy(anyGraphRequest.getStackBy());
+    criteria.setUnit(anyGraphRequest.getUnit());
+    criteria.setFrom(anyGraphRequest.getFrom());
+    criteria.setTo(anyGraphRequest.getTo());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceExtremeDatesRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceExtremeDatesRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceExtremeDatesRequestConverter.java
index fe81468..489e879 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceExtremeDatesRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceExtremeDatesRequestConverter.java
@@ -18,7 +18,6 @@
  */
 package org.apache.ambari.logsearch.query.converter;
 
-import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.model.request.impl.ServiceExtremeDatesRequest;
 import org.apache.ambari.logsearch.query.model.ServiceExtremeDatesCriteria;
 import org.springframework.stereotype.Component;
@@ -29,7 +28,7 @@ public class ServiceExtremeDatesRequestConverter extends AbstractCommonSearchReq
   @Override
   public ServiceExtremeDatesCriteria convertToSearchCriteria(ServiceExtremeDatesRequest request) {
     ServiceExtremeDatesCriteria criteria = new ServiceExtremeDatesCriteria();
-    criteria.addParam(LogSearchConstants.BUNDLE_ID, request.getBundleId());
+    criteria.setBundleId(request.getBundleId());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceGraphRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceGraphRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceGraphRequestConverter.java
index 19165c0..6c501ae 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceGraphRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceGraphRequestConverter.java
@@ -28,9 +28,9 @@ public class ServiceGraphRequestConverter extends AbstractCommonServiceLogReques
   @Override
   public ServiceGraphSearchCriteria createCriteria(ServiceGraphRequest request) {
     ServiceGraphSearchCriteria criteria = new ServiceGraphSearchCriteria();
-    criteria.addParam("hostLogFile", request.getHostLogFile());
-    criteria.addParam("compLogFile", request.getComponentLogFile());
-    criteria.addParam("unit", request.getUnit());
+    criteria.setLogFileHostName(request.getHostLogFile());
+    criteria.setLogFileComponentName(request.getComponentLogFile());
+    criteria.setUnit(request.getUnit());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogExportRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogExportRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogExportRequestConverter.java
index 7d83e49..bd06546 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogExportRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogExportRequestConverter.java
@@ -28,11 +28,10 @@ public class ServiceLogExportRequestConverter extends AbstractCommonServiceLogRe
   @Override
   public ServiceLogExportSearchCriteria createCriteria(ServiceLogExportRequest request) {
     ServiceLogExportSearchCriteria criteria = new ServiceLogExportSearchCriteria();
-    criteria.addParam("hostLogFile", request.getHostLogFile());
-    criteria.addParam("compLogFile",
-      request.getComponentLogFile());
-    criteria.addParam("format", request.getFormat());
-    criteria.addParam("utcOffset", request.getUtcOffset());
+    criteria.setLogFileHostName(request.getHostLogFile());
+    criteria.setLogFileComponentName(request.getComponentLogFile());
+    criteria.setFormat(request.getFormat());
+    criteria.setUtcOffset(request.getUtcOffset());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogFileRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogFileRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogFileRequestConverter.java
index f5148f3..392c9d3 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogFileRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogFileRequestConverter.java
@@ -29,8 +29,8 @@ public class ServiceLogFileRequestConverter
   @Override
   public ServiceLogFileSearchCriteria createCriteria(ServiceLogFileRequest request) {
     ServiceLogFileSearchCriteria criteria = new ServiceLogFileSearchCriteria();
-    criteria.addParam("hostLogFile", request.getHostLogFile());
-    criteria.addParam("compLogFile", request.getComponentLogFile());
+    criteria.setLogFileHostName(request.getHostLogFile());
+    criteria.setLogFileComponentName(request.getComponentLogFile());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogRequestConverter.java
index 6a70d55..aa93c6a 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogRequestConverter.java
@@ -29,13 +29,13 @@ public class ServiceLogRequestConverter extends AbstractCommonServiceLogRequestC
   @Override
   public ServiceLogSearchCriteria createCriteria(ServiceLogRequest request) {
     ServiceLogSearchCriteria criteria = new ServiceLogSearchCriteria();
-    criteria.addParam("hostLogFile", request.getHostLogFile());
-    criteria.addParam("compLogFile", request.getComponentLogFile());
-    criteria.addParam("keyword", StringEscapeUtils.unescapeXml(request.getKeyWord()));
-    criteria.addParam("sourceLogId", request.getSourceLogId());
-    criteria.addParam("keywordType", request.getKeywordType());
-    criteria.addParam("token", request.getToken());
-    criteria.addParam("isLastPage", request.isLastPage());
+    criteria.setLogFileComponentName(request.getHostLogFile());
+    criteria.setLogFileComponentName(request.getComponentLogFile());
+    criteria.setKeyword(StringEscapeUtils.unescapeXml(request.getKeyWord()));
+    criteria.setKeywordType(request.getKeywordType());
+    criteria.setSourceLogId(request.getSourceLogId());
+    criteria.setToken(request.getToken());
+    criteria.setLastPage(request.isLastPage());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogTruncatedRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogTruncatedRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogTruncatedRequestConverter.java
index 676f049..1e58b79 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogTruncatedRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/ServiceLogTruncatedRequestConverter.java
@@ -28,11 +28,11 @@ public class ServiceLogTruncatedRequestConverter extends AbstractCommonServiceLo
   @Override
   public ServiceLogTruncatedSearchCriteria createCriteria(ServiceLogTruncatedRequest request) {
     ServiceLogTruncatedSearchCriteria criteria = new ServiceLogTruncatedSearchCriteria();
-    criteria.addParam("hostLogFile", request.getHostLogFile());
-    criteria.addParam("compLogFile", request.getComponentLogFile());
-    criteria.addParam("id", request.getId());
-    criteria.addParam("scrollType", request.getScrollType());
-    criteria.addParam("numberRows", request.getNumberRows());
+    criteria.setLogFileHostName(request.getHostLogFile());
+    criteria.setLogFileComponentName(request.getComponentLogFile());
+    criteria.setId(request.getId());
+    criteria.setScrollType(request.getScrollType());
+    criteria.setNumberRows(request.getNumberRows());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/SimpleQueryRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/SimpleQueryRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/SimpleQueryRequestConverter.java
index 8c50f66..1f084fd 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/SimpleQueryRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/SimpleQueryRequestConverter.java
@@ -19,16 +19,17 @@
 package org.apache.ambari.logsearch.query.converter;
 
 import org.apache.ambari.logsearch.model.request.impl.SimpleQueryRequest;
-import org.apache.ambari.logsearch.query.model.SearchCriteria;
-import org.springframework.core.convert.converter.Converter;
+import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
 import org.springframework.stereotype.Component;
 
 @Component
-public class SimpleQueryRequestConverter implements Converter<SimpleQueryRequest, SearchCriteria> {
+public class SimpleQueryRequestConverter extends AbstractConverterAware<SimpleQueryRequest, CommonSearchCriteria> {
+
   @Override
-  public SearchCriteria convert(SimpleQueryRequest simpleQueryRequest) {
-    SearchCriteria searchCriteria = new SearchCriteria();
+  public CommonSearchCriteria convert(SimpleQueryRequest simpleQueryRequest) {
+    CommonSearchCriteria searchCriteria = new CommonSearchCriteria();
     searchCriteria.addParam("q", simpleQueryRequest.getQuery());
     return searchCriteria;
   }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserConfigRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserConfigRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserConfigRequestConverter.java
index 50847c7..8f2aaa0 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserConfigRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserConfigRequestConverter.java
@@ -18,21 +18,19 @@
  */
 package org.apache.ambari.logsearch.query.converter;
 
-import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.model.request.impl.UserConfigRequest;
 import org.apache.ambari.logsearch.query.model.UserConfigSearchCriteria;
-import org.springframework.core.convert.converter.Converter;
 import org.springframework.stereotype.Component;
 
 @Component
-public class UserConfigRequestConverter implements Converter<UserConfigRequest, UserConfigSearchCriteria> {
+public class UserConfigRequestConverter extends AbstractConverterAware<UserConfigRequest, UserConfigSearchCriteria> {
 
   @Override
   public UserConfigSearchCriteria convert(UserConfigRequest request) {
     UserConfigSearchCriteria criteria = new UserConfigSearchCriteria();
-    criteria.addParam(LogSearchConstants.USER_NAME, request.getUserId());
-    criteria.addParam(LogSearchConstants.FILTER_NAME, request.getFilterName());
-    criteria.addParam(LogSearchConstants.ROW_TYPE, request.getRowType());
+    criteria.setUserName(request.getUserId());
+    criteria.setFilterName(request.getFilterName());
+    criteria.setRowType(request.getRowType());
     return criteria;
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserExportRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserExportRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserExportRequestConverter.java
index a0b5f0f..c7f738e 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserExportRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/UserExportRequestConverter.java
@@ -28,7 +28,8 @@ public class UserExportRequestConverter extends AbstractCommonAuditLogRequestCon
   @Override
   public UserExportSearchCriteria createCriteria(UserExportRequest request) {
     UserExportSearchCriteria criteria = new UserExportSearchCriteria();
-    criteria.addParam("field", request.getField());
+    criteria.setField(request.getField());
+    criteria.setFormat(request.getFormat());
     return criteria;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AnyGraphSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AnyGraphSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AnyGraphSearchCriteria.java
index a11c056..aa61851 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AnyGraphSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AnyGraphSearchCriteria.java
@@ -18,8 +18,60 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_FROM;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_STACK_BY;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_TO;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_UNIT;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_X_AXIS;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_Y_AXIS;
 
-@Marker
 public class AnyGraphSearchCriteria extends CommonSearchCriteria {
+
+  public String getxAxis() {
+    return getParam(PARAM_X_AXIS, String.class);
+  }
+
+  public void setxAxis(String xAxis) {
+    addParam(PARAM_X_AXIS, xAxis);
+  }
+
+  public String getyAxis() {
+    return getParam(PARAM_Y_AXIS, String.class);
+  }
+
+  public void setyAxis(String yAxis) {
+    addParam(PARAM_Y_AXIS, yAxis);
+  }
+
+  public String getStackBy() {
+    return getParam(PARAM_STACK_BY, String.class);
+  }
+
+  public void setStackBy(String stackBy) {
+    addParam(PARAM_STACK_BY, stackBy);
+  }
+
+  public String getUnit() {
+    return getParam(PARAM_UNIT, String.class);
+  }
+
+  public void setUnit(String unit) {
+    addParam(PARAM_UNIT, unit);
+  }
+
+  public String getFrom() {
+    return getParam(PARAM_FROM, String.class);
+  }
+
+  public void setFrom(String from) {
+    addParam(PARAM_FROM, from);
+  }
+
+  public String getTo() {
+    return getParam(PARAM_TO, String.class);
+  }
+
+  public void setTo(String to) {
+    addParam(PARAM_TO, to);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditBarGraphSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditBarGraphSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditBarGraphSearchCriteria.java
index c41ec15..49304c4 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditBarGraphSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditBarGraphSearchCriteria.java
@@ -18,8 +18,16 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_UNIT;
 
-@Marker
 public class AuditBarGraphSearchCriteria extends CommonSearchCriteria {
+
+  public void setUnit(String unit) {
+    addParam(PARAM_UNIT, unit);
+  }
+
+  public String getUnit() {
+    return getParam(PARAM_UNIT, String.class);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditLogSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditLogSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditLogSearchCriteria.java
index f4fe207..03df3ad 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditLogSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/AuditLogSearchCriteria.java
@@ -18,8 +18,16 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_IS_LAST_PAGE;
 
-@Marker
 public class AuditLogSearchCriteria extends CommonSearchCriteria {
+
+  public void setLastPage(boolean lastPage) {
+    addParam(PARAM_IS_LAST_PAGE, lastPage);
+  }
+
+  public boolean isLastPage() {
+    return getParam(PARAM_IS_LAST_PAGE, Boolean.class);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonSearchCriteria.java
index 47d12e5..ffdb2c7 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonSearchCriteria.java
@@ -18,83 +18,78 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_END_TIME;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_EXCLUDE_MESSAGE;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_EXCLUDE_QUERY;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_INCLUDE_MESSAGE;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_INCLUDE_QUERY;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_MUST_BE_STRING;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_MUST_NOT_STRING;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_START_TIME;
+
 public class CommonSearchCriteria extends SearchCriteria {
-  private int startIndex = 0;
-  private int maxRows = Integer.MAX_VALUE;
-  private String sortBy = null;
-  private String sortType = null;
-  private int page = 0;
 
-  private String globalStartTime = null;
-  private String globalEndTime = null;
+  public String getIncludeMessage() {
+    return getParam(PARAM_INCLUDE_MESSAGE, String.class);
+  }
+
+  public void setIncludeMessage(String includeMessage) {
+    addParam(PARAM_INCLUDE_MESSAGE, includeMessage);
+  }
 
-  @Override
-  public int getStartIndex() {
-    return startIndex;
+  public String getExcludeMessage() {
+    return getParam(PARAM_EXCLUDE_MESSAGE, String.class);
   }
 
-  @Override
-  public void setStartIndex(int startIndex) {
-    this.startIndex = startIndex;
+  public void setExcludeMessage(String excludeMessage) {
+    addParam(PARAM_EXCLUDE_MESSAGE, excludeMessage);
   }
 
-  @Override
-  public int getMaxRows() {
-    return maxRows;
+  public String getMustBe() {
+    return getParam(PARAM_MUST_BE_STRING, String.class);
   }
 
-  @Override
-  public void setMaxRows(int maxRows) {
-    this.maxRows = maxRows;
+  public void setMustBe(String mustHave) {
+    addParam(PARAM_MUST_BE_STRING, mustHave);
   }
 
-  @Override
-  public String getSortType() {
-    return sortType;
+  public String getMustNot() {
+    return getParam(PARAM_MUST_NOT_STRING, String.class);
   }
 
-  @Override
-  public void setSortType(String sortType) {
-    this.sortType = sortType;
+  public void setMustNot(String mustNot) {
+    addParam(PARAM_MUST_NOT_STRING, mustNot);
   }
 
-  @Override
-  public String getSortBy() {
-    return sortBy;
+  public String getIncludeQuery() {
+    return getParam(PARAM_INCLUDE_QUERY, String.class);
   }
 
-  @Override
-  public void setSortBy(String sortBy) {
-    this.sortBy = sortBy;
+  public void setIncludeQuery(String includeQuery) {
+    addParam(PARAM_INCLUDE_QUERY, includeQuery);
   }
 
-  @Override
-  public int getPage() {
-    return page;
+  public String getExcludeQuery() {
+    return getParam(PARAM_EXCLUDE_QUERY, String.class);
   }
 
-  @Override
-  public void setPage(int page) {
-    this.page = page;
+  public void setExcludeQuery(String excludeQuery) {
+    addParam(PARAM_EXCLUDE_QUERY, excludeQuery);
   }
 
-  @Override
-  public String getGlobalStartTime() {
-    return globalStartTime;
+  public String getStartTime() {
+    return getParam(PARAM_START_TIME, String.class);
   }
 
-  @Override
-  public void setGlobalStartTime(String globalStartTime) {
-    this.globalStartTime = globalStartTime;
+  public void setStartTime(String startTime) {
+    addParam(PARAM_START_TIME, startTime);
   }
 
-  @Override
-  public String getGlobalEndTime() {
-    return globalEndTime;
+  public String getEndTime() {
+    return getParam(PARAM_END_TIME, String.class);
   }
 
-  @Override
-  public void setGlobalEndTime(String globalEndTime) {
-    this.globalEndTime = globalEndTime;
+  public void setEndTime(String endTime) {
+    addParam(PARAM_END_TIME, endTime);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonServiceLogSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonServiceLogSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonServiceLogSearchCriteria.java
new file mode 100644
index 0000000..4c79c69
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/CommonServiceLogSearchCriteria.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.query.model;
+
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
+
+public class CommonServiceLogSearchCriteria extends CommonSearchCriteria {
+
+  public String getTreeParams() {
+    return getParam(SearchCriteriaConstants.PARAM_TREE_PARAMS, String.class);
+  }
+
+  public void setTreeParams(String treeParams) {
+    addParam(SearchCriteriaConstants.PARAM_TREE_PARAMS, treeParams);
+  }
+
+  public String getLevel() {
+    return getParam(SearchCriteriaConstants.PARAM_LEVEL, String.class);
+  }
+
+  public void setLevel(String level) {
+    addParam(SearchCriteriaConstants.PARAM_LEVEL, level);
+  }
+
+  public String getSelectComp() {
+    return getParam(SearchCriteriaConstants.PARAM_SELECT_COMP, String.class);
+  }
+
+  public void setSelectComp(String selectComp) {
+    addParam(SearchCriteriaConstants.PARAM_SELECT_COMP, selectComp);
+  }
+
+  public String getBundleId() {
+    return getParam(SearchCriteriaConstants.PARAM_BUNDLE_ID, String.class);
+  }
+
+  public void setBundleId(String bunldeId) {
+    addParam(SearchCriteriaConstants.PARAM_BUNDLE_ID, bunldeId);
+  }
+
+  public String getFrom() {
+    return getParam(SearchCriteriaConstants.PARAM_FROM ,String.class);
+  }
+
+  public void setFrom(String from) {
+    addParam(SearchCriteriaConstants.PARAM_FROM, from);
+  }
+
+  public String getTo() {
+    return getParam(SearchCriteriaConstants.PARAM_TO ,String.class);
+  }
+
+  public void setTo(String to) {
+    addParam(SearchCriteriaConstants.PARAM_TO, to);
+  }
+
+  public String getHostName() {
+    return getParam(SearchCriteriaConstants.PARAM_HOST_NAME ,String.class);
+  }
+
+  public void setHostName(String hostName) {
+    addParam(SearchCriteriaConstants.PARAM_HOST_NAME, hostName);
+  }
+
+  public String getComponentName() {
+    return getParam(SearchCriteriaConstants.PARAM_COMPONENT_NAME ,String.class);
+  }
+
+  public void setComponentName(String componentName) {
+    addParam(SearchCriteriaConstants.PARAM_COMPONENT_NAME, componentName);
+  }
+
+  public String getFileName() {
+    return getParam(SearchCriteriaConstants.PARAM_FILE_NAME ,String.class);
+  }
+
+  public void setFileName(String fileName) {
+    addParam(SearchCriteriaConstants.PARAM_FILE_NAME, fileName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditBarGraphSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditBarGraphSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditBarGraphSearchCriteria.java
index f931f5d..381b3c2 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditBarGraphSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditBarGraphSearchCriteria.java
@@ -18,8 +18,15 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_FIELD;
 
-@Marker
 public class FieldAuditBarGraphSearchCriteria extends AuditBarGraphSearchCriteria {
+
+  public String getField() {
+    return getParam(PARAM_FIELD, String.class);
+  }
+
+  public void setField(String field) {
+    addParam(PARAM_FIELD, field);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditLogSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditLogSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditLogSearchCriteria.java
index 8dd5854..9d5d225 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditLogSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/FieldAuditLogSearchCriteria.java
@@ -18,8 +18,15 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_FIELD;
 
-@Marker
 public class FieldAuditLogSearchCriteria extends CommonSearchCriteria {
+
+  public String getField() {
+    return getParam(PARAM_FIELD, String.class);
+  }
+
+  public void setField(String field) {
+    addParam(PARAM_FIELD, field);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileSearchCriteria.java
index e4e2a14..e33e5eb 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileSearchCriteria.java
@@ -20,6 +20,33 @@ package org.apache.ambari.logsearch.query.model;
 
 import org.apache.ambari.logsearch.common.Marker;
 
-@Marker
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_LOG_FILE_COMPONENT;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_LOG_FILE_HOST;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_LOG_FILE_TYPE;
+
 public class LogFileSearchCriteria extends SearchCriteria {
+
+  public String getLogFileComponent() {
+    return getParam(PARAM_LOG_FILE_COMPONENT, String.class);
+  }
+
+  public void setLogFileComponent(String logFileComponent) {
+    addParam(PARAM_LOG_FILE_COMPONENT, logFileComponent);
+  }
+
+  public String getLogFileHost() {
+    return getParam(PARAM_LOG_FILE_HOST, String.class);
+  }
+
+  public void setLogFileHost(String logFileHost) {
+    addParam(PARAM_LOG_FILE_HOST, logFileHost);
+  }
+
+  public String getLogType() {
+    return getParam(PARAM_LOG_FILE_TYPE, String.class);
+  }
+
+  public void setLogType(String logType) {
+    addParam(PARAM_LOG_FILE_TYPE, logType);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileTailSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileTailSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileTailSearchCriteria.java
index fecb396..ccea4ab 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileTailSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/LogFileTailSearchCriteria.java
@@ -18,8 +18,15 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_LOG_TAIL_SIZE;
 
-@Marker
-public class LogFileTailSearchCriteria extends SearchCriteria {
+public class LogFileTailSearchCriteria extends LogFileSearchCriteria {
+
+  public String getLogTailSize() {
+    return getParam(PARAM_LOG_TAIL_SIZE, String.class);
+  }
+
+  public void setLogTailSize(String logTailSize) {
+    addParam(PARAM_LOG_TAIL_SIZE, logTailSize);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/SearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/SearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/SearchCriteria.java
index 091194e..661337f 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/SearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/SearchCriteria.java
@@ -25,6 +25,7 @@ import java.util.Map;
 import org.apache.ambari.logsearch.common.PropertiesHelper;
 
 public class SearchCriteria {
+
   private int startIndex = 0;
   private int maxRows = Integer.MAX_VALUE;
   private String sortBy = null;
@@ -42,6 +43,30 @@ public class SearchCriteria {
     // Auto-generated constructor stub
   }
 
+
+  public void addParam(String name, Object value) {
+    paramList.put(name, value);
+  }
+
+  public Object getParamValue(String name) {
+    return paramList.get(name);
+  }
+
+  public <T> T getParam(String key, Class<T> type) {
+    if (getParamValue(key) != null) {
+      return (T) getParamValue(key);
+    }
+    return null;
+  }
+
+  public Map<String, Object> getUrlParamMap() {
+    return urlParamMap;
+  }
+
+  public void setUrlParamMap(Map<String, Object> urlParamMap) {
+    this.urlParamMap = urlParamMap;
+  }
+
   public int getStartIndex() {
     return startIndex;
   }
@@ -62,33 +87,6 @@ public class SearchCriteria {
     return sortType;
   }
 
-
-  public void addParam(String name, Object value) {
-    String solrValue = PropertiesHelper.getProperty(name);
-    if (solrValue == null || solrValue.isEmpty()) {
-      paramList.put(name, value);
-    } else {
-      try {
-        String propertyFieldMappings[] = solrValue.split(",");
-        HashMap<String, String> propertyFieldValue = new HashMap<String, String>();
-        for (String temp : propertyFieldMappings) {
-          String arrayValue[] = temp.split(":");
-          propertyFieldValue.put(arrayValue[0].toLowerCase(Locale.ENGLISH), arrayValue[1].toLowerCase(Locale.ENGLISH));
-        }
-        String originalValue = propertyFieldValue.get(value.toString().toLowerCase(Locale.ENGLISH));
-        if (originalValue != null && !originalValue.isEmpty())
-          paramList.put(name, originalValue);
-
-      } catch (Exception e) {
-        //do nothing
-      }
-    }
-  }
-
-  public Object getParamValue(String name) {
-    return paramList.get(name);
-  }
-
   public String getSortBy() {
     return sortBy;
   }
@@ -125,12 +123,4 @@ public class SearchCriteria {
     this.globalEndTime = globalEndTime;
   }
 
-  public Map<String, Object> getUrlParamMap() {
-    return urlParamMap;
-  }
-
-  public void setUrlParamMap(Map<String, Object> urlParamMap) {
-    this.urlParamMap = urlParamMap;
-  }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceAnyGraphSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceAnyGraphSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceAnyGraphSearchCriteria.java
index 0ef5bdf..cd852b5 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceAnyGraphSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceAnyGraphSearchCriteria.java
@@ -20,6 +20,41 @@ package org.apache.ambari.logsearch.query.model;
 
 import org.apache.ambari.logsearch.common.Marker;
 
-@Marker
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_STACK_BY;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_UNIT;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_X_AXIS;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_Y_AXIS;
+
 public class ServiceAnyGraphSearchCriteria extends ServiceLogFileSearchCriteria {
+  public String getxAxis() {
+    return getParam(PARAM_X_AXIS, String.class);
+  }
+
+  public void setxAxis(String xAxis) {
+    addParam(PARAM_X_AXIS, xAxis);
+  }
+
+  public String getyAxis() {
+    return getParam(PARAM_Y_AXIS, String.class);
+  }
+
+  public void setyAxis(String yAxis) {
+    addParam(PARAM_Y_AXIS, yAxis);
+  }
+
+  public String getStackBy() {
+    return getParam(PARAM_STACK_BY, String.class);
+  }
+
+  public void setStackBy(String stackBy) {
+    addParam(PARAM_STACK_BY, stackBy);
+  }
+
+  public String getUnit() {
+    return getParam(PARAM_UNIT, String.class);
+  }
+
+  public void setUnit(String unit) {
+    addParam(PARAM_UNIT, unit);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceExtremeDatesCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceExtremeDatesCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceExtremeDatesCriteria.java
index 3fc6ff8..d89ab3b 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceExtremeDatesCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceExtremeDatesCriteria.java
@@ -18,8 +18,15 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class ServiceExtremeDatesCriteria extends CommonSearchCriteria {
+
+  public String getBundleId() {
+    return getParam(SearchCriteriaConstants.PARAM_BUNDLE_ID, String.class);
+  }
+
+  public void setBundleId(String bunldeId) {
+    addParam(SearchCriteriaConstants.PARAM_BUNDLE_ID, bunldeId);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceGraphSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceGraphSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceGraphSearchCriteria.java
index 31a57a4..8988af1 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceGraphSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceGraphSearchCriteria.java
@@ -18,8 +18,15 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class ServiceGraphSearchCriteria extends ServiceLogFileSearchCriteria {
+
+  public String getUnit() {
+    return getParam(SearchCriteriaConstants.PARAM_UNIT, String.class);
+  }
+
+  public void setUnit(String unit) {
+    addParam(SearchCriteriaConstants.PARAM_UNIT, unit);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogExportSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogExportSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogExportSearchCriteria.java
index 8bab7f0..c7b7a39 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogExportSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogExportSearchCriteria.java
@@ -18,8 +18,23 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class ServiceLogExportSearchCriteria extends ServiceLogFileSearchCriteria {
+
+  public void setFormat(String format) {
+    addParam(SearchCriteriaConstants.PARAM_FORMAT, format);
+  }
+
+  public String getFormat() {
+    return getParam(SearchCriteriaConstants.PARAM_FORMAT, String.class);
+  }
+
+  public void setUtcOffset(String utcOffset) {
+    addParam(SearchCriteriaConstants.PARAM_UTC_OFFSET, utcOffset);
+  }
+
+  public String getUtcOffset() {
+    return getParam(SearchCriteriaConstants.PARAM_UTC_OFFSET, String.class);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogFileSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogFileSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogFileSearchCriteria.java
index a9f5926..a80a3ce 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogFileSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogFileSearchCriteria.java
@@ -18,8 +18,23 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
-public class ServiceLogFileSearchCriteria extends CommonSearchCriteria {
+public class ServiceLogFileSearchCriteria extends CommonServiceLogSearchCriteria {
+
+  public void setLogFileHostName(String logFileHostName) {
+    addParam(SearchCriteriaConstants.PARAM_HOST_LOG_FILE, logFileHostName);
+  }
+
+  public String getLogFileHostName() {
+    return getParam(SearchCriteriaConstants.PARAM_HOST_LOG_FILE, String.class);
+  }
+
+  public void setLogFileComponentName(String logFileComponentName) {
+    addParam(SearchCriteriaConstants.PARAM_COMPONENT_LOG_FILE, logFileComponentName);
+  }
+
+  public String getLogFileComponentName() {
+    return getParam(SearchCriteriaConstants.PARAM_COMPONENT_LOG_FILE, String.class);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogSearchCriteria.java
index d41c589..b3a6bf7 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogSearchCriteria.java
@@ -18,8 +18,48 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class ServiceLogSearchCriteria extends ServiceLogFileSearchCriteria {
+
+  public void setKeyword(String keyword) {
+    addParam(SearchCriteriaConstants.PARAM_KEYWORD, keyword);
+  }
+
+  public String getKeyword() {
+    return getParam(SearchCriteriaConstants.PARAM_KEYWORD, String.class);
+  }
+
+  public void setKeywordType(String keywordType) {
+    addParam(SearchCriteriaConstants.PARAM_KEYWORD_TYPE, keywordType);
+  }
+
+  public String getKeywordType() {
+    return getParam(SearchCriteriaConstants.PARAM_KEYWORD_TYPE, String.class);
+  }
+
+  public void setSourceLogId(String sourceLogId) {
+    addParam(SearchCriteriaConstants.PARAM_SOURCE_LOG_ID, sourceLogId);
+  }
+
+  public String getSourceLogId() {
+    return getParam(SearchCriteriaConstants.PARAM_SOURCE_LOG_ID, String.class);
+  }
+
+  public void setToken(String token) {
+    addParam(SearchCriteriaConstants.PARAM_TOKEN, token);
+  }
+
+  public String getToken() {
+    return getParam(SearchCriteriaConstants.PARAM_TOKEN, String.class);
+  }
+
+  public void setLastPage(boolean lastPage) {
+    addParam(SearchCriteriaConstants.PARAM_IS_LAST_PAGE, lastPage);
+  }
+
+  public boolean isLastPage() {
+    return getParam(SearchCriteriaConstants.PARAM_IS_LAST_PAGE, Boolean.class);
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogTruncatedSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogTruncatedSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogTruncatedSearchCriteria.java
index 24dc9a8..bcdac5b 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogTruncatedSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/ServiceLogTruncatedSearchCriteria.java
@@ -18,8 +18,31 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class ServiceLogTruncatedSearchCriteria extends ServiceLogFileSearchCriteria {
+
+  public String getId() {
+    return getParam(SearchCriteriaConstants.PARAM_ID, String.class);
+  }
+
+  public void setId(String id) {
+    addParam(SearchCriteriaConstants.PARAM_ID, id);
+  }
+
+  public String getScrollType() {
+    return getParam(SearchCriteriaConstants.PARAM_SCROLL_TYPE, String.class);
+  }
+
+  public void setScrollType(String scrollType) {
+    addParam(SearchCriteriaConstants.PARAM_SCROLL_TYPE, scrollType);
+  }
+
+  public String getNumberRows() {
+    return getParam(SearchCriteriaConstants.PARAM_NUMBER_ROWS, String.class);
+  }
+
+  public void setNumberRows(String numberRows) {
+    addParam(SearchCriteriaConstants.PARAM_NUMBER_ROWS, numberRows);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserConfigSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserConfigSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserConfigSearchCriteria.java
index 8798cd6..eafff69 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserConfigSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserConfigSearchCriteria.java
@@ -18,8 +18,31 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class UserConfigSearchCriteria extends CommonSearchCriteria {
+
+  public String getUserName() {
+    return getParam(SearchCriteriaConstants.PARAM_USER_NAME, String.class);
+  }
+
+  public void setUserName(String userName) {
+    addParam(SearchCriteriaConstants.PARAM_USER_NAME, userName);
+  }
+
+  public String getFilterName() {
+    return getParam(SearchCriteriaConstants.PARAM_FILTER_NAME, String.class);
+  }
+
+  public void setFilterName(String filterName) {
+    addParam(SearchCriteriaConstants.PARAM_FILTER_NAME, filterName);
+  }
+
+  public String getRowType() {
+    return getParam(SearchCriteriaConstants.PARAM_ROW_TYPE, String.class);
+  }
+
+  public void setRowType(String rowType) {
+    addParam(SearchCriteriaConstants.PARAM_ROW_TYPE, rowType);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserExportSearchCriteria.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserExportSearchCriteria.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserExportSearchCriteria.java
index 755c673..46d13cc 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserExportSearchCriteria.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/model/UserExportSearchCriteria.java
@@ -18,8 +18,14 @@
  */
 package org.apache.ambari.logsearch.query.model;
 
-import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.query.SearchCriteriaConstants;
 
-@Marker
 public class UserExportSearchCriteria extends FieldAuditLogSearchCriteria {
+  public void setFormat(String format) {
+    addParam(SearchCriteriaConstants.PARAM_FORMAT, format);
+  }
+
+  public String getFormat() {
+    return getParam(SearchCriteriaConstants.PARAM_FORMAT, String.class);
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
index 82e21e8..ff185f8 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
@@ -87,7 +87,7 @@ public class AuditLogsResource {
   @Produces({"application/json"})
   @ApiOperation(GET_AUDIT_COMPONENTS_OD)
   public GroupListResponse getAuditComponents(@BeanParam SimpleQueryRequest request) {
-    return auditLogsManager.getAuditComponents(conversionService.convert(request, SearchCriteria.class));
+    return auditLogsManager.getAuditComponents(conversionService.convert(request, CommonSearchCriteria.class));
   }
 
   @GET

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
index 5400825..6cc69d4 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
@@ -45,6 +45,7 @@ import org.apache.ambari.logsearch.model.response.NameValueDataListResponse;
 import org.apache.ambari.logsearch.model.response.NodeListResponse;
 import org.apache.ambari.logsearch.model.response.ServiceLogResponse;
 import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonServiceLogSearchCriteria;
 import org.apache.ambari.logsearch.query.model.SearchCriteria;
 import org.apache.ambari.logsearch.manager.ServiceLogsManager;
 import org.apache.ambari.logsearch.query.model.ServiceAnyGraphSearchCriteria;
@@ -100,7 +101,7 @@ public class ServiceLogsResource {
   @Produces({"application/json"})
   @ApiOperation(GET_AGGREGATED_INFO_OD)
   public GraphDataListResponse getAggregatedInfo(@BeanParam BaseServiceLogRequest request) {
-    return serviceLogsManager.getAggregatedInfo(conversionService.convert(request, CommonSearchCriteria.class));
+    return serviceLogsManager.getAggregatedInfo(conversionService.convert(request, CommonServiceLogSearchCriteria.class));
   }
 
   @GET
@@ -132,7 +133,7 @@ public class ServiceLogsResource {
   @Produces({"application/json"})
   @ApiOperation(GET_TREE_EXTENSION_OD)
   public NodeListResponse getTreeExtension(@QueryParam("hostName") @ApiParam String hostName, @BeanParam ServiceLogFileRequest request) {
-    SearchCriteria searchCriteria = conversionService.convert(request, ServiceLogFileSearchCriteria.class);
+    ServiceLogFileSearchCriteria searchCriteria = conversionService.convert(request, ServiceLogFileSearchCriteria.class);
     searchCriteria.addParam("hostName", hostName); // TODO: use host_name instead - needs UI change
     return serviceLogsManager.getTreeExtension(searchCriteria);
   }
@@ -175,7 +176,7 @@ public class ServiceLogsResource {
   @Produces({"application/json"})
   @ApiOperation(GET_HOST_LIST_BY_COMPONENT_OD)
   public NodeListResponse getHostListByComponent(@BeanParam ServiceLogFileRequest request, @QueryParam("componentName") @ApiParam String componentName) {
-    SearchCriteria searchCriteria = conversionService.convert(request, ServiceLogFileSearchCriteria.class);
+    ServiceLogFileSearchCriteria searchCriteria = conversionService.convert(request, ServiceLogFileSearchCriteria.class);
     searchCriteria.addParam("componentName", componentName); // TODO: use component_name instead - needs UI change
     return serviceLogsManager.getHostListByComponent(searchCriteria);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrAmsClient.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrAmsClient.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrAmsClient.java
deleted file mode 100644
index 0d4deab..0000000
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrAmsClient.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.ambari.logsearch.solr.metrics;
-
-import org.apache.hadoop.metrics2.sink.timeline.AbstractTimelineMetricsSink;
-import org.apache.hadoop.metrics2.sink.timeline.TimelineMetrics;
-
-import java.util.Collection;
-
-// TODO: Refactor for failover
-public class SolrAmsClient extends AbstractTimelineMetricsSink {
-  private final String collectorHost;
-
-  public SolrAmsClient(String collectorHost) {
-    this.collectorHost = collectorHost;
-  }
-
-  @Override
-  public String getCollectorUri(String host) {
-    return collectorHost;
-  }
-
-  @Override
-  protected int getTimeoutSeconds() {
-    return 10;
-  }
-
-  @Override
-  protected String getZookeeperQuorum() {
-    return null;
-  }
-
-  @Override
-  protected Collection<String> getConfiguredCollectorHosts() {
-    return null;
-  }
-
-  @Override
-  protected String getHostname() {
-    return null;
-  }
-
-  @Override
-  protected boolean emitMetrics(TimelineMetrics metrics) {
-    return super.emitMetrics(metrics);
-  }
-
-  @Override
-  protected String getCollectorProtocol() {
-    return null;
-  }
-
-  @Override
-  protected String getCollectorPort() {
-    return null;
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbfa083d/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrJmxAdapter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrJmxAdapter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrJmxAdapter.java
deleted file mode 100644
index fc58661..0000000
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/solr/metrics/SolrJmxAdapter.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.ambari.logsearch.solr.metrics;
-
-import java.io.IOException;
-import java.lang.management.MemoryMXBean;
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.management.JMX;
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import com.sun.management.OperatingSystemMXBean;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-@SuppressWarnings("restriction")
-public class SolrJmxAdapter {
-  private static final Logger LOG = LoggerFactory.getLogger(SolrJmxAdapter.class);
-
-  private static final String JMX_SERVICE_URL = "service:jmx:rmi:///jndi/rmi://%s:%d/jmxrmi";
-
-  private final JMXServiceURL jmxServiceUrl;
-
-  private JMXConnector jmxConnector;
-  private MBeanServerConnection conn;
-
-  public SolrJmxAdapter(String host, int port) throws MalformedURLException {
-    String url = String.format(JMX_SERVICE_URL, host, port);
-    jmxServiceUrl = new JMXServiceURL(url);
-  }
-
-  public double getProcessCpuLoad() throws MalformedObjectNameException {
-    ObjectName objectName = new ObjectName("java.lang:type=OperatingSystem");
-    OperatingSystemMXBean mxBean = JMX.newMXBeanProxy(conn, objectName, OperatingSystemMXBean.class);
-    return mxBean.getProcessCpuLoad();
-  }
-
-  public Map<String, Long> getMemoryData() throws MalformedObjectNameException {
-    Map<String, Long> memoryData = new HashMap<>();
-    
-    ObjectName objectName = new ObjectName("java.lang:type=Memory");
-    MemoryMXBean mxBean = JMX.newMXBeanProxy(conn, objectName, MemoryMXBean.class);
-    
-    memoryData.put("heapMemoryUsed", mxBean.getHeapMemoryUsage().getUsed());
-    memoryData.put("heapMemoryCommitted", mxBean.getHeapMemoryUsage().getCommitted());
-    memoryData.put("heapMemoryMax", mxBean.getHeapMemoryUsage().getMax());
-    memoryData.put("nonHeapMemoryUsed", mxBean.getNonHeapMemoryUsage().getUsed());
-    memoryData.put("nonHeapMemoryCommitted", mxBean.getNonHeapMemoryUsage().getCommitted());
-    memoryData.put("nonHeapMemoryMax", mxBean.getNonHeapMemoryUsage().getMax());
-    
-    return memoryData;
-  }
-
-  public long getIndexSize() throws Exception {
-    long indexSize = 0;
-
-    ObjectName objectNamePattern = new ObjectName(
-        "solr/*shard*replica*:type=/replication,id=org.apache.solr.handler.ReplicationHandler");
-    Set<ObjectName> objectNames = conn.queryNames(objectNamePattern, null);
-    for (ObjectName objectName : objectNames) {
-      String indexSizeString = (String) conn.getAttribute(objectName, "indexSize");
-      indexSize += getIndexSizeInBytes(indexSizeString);
-    }
-
-    return indexSize;
-  }
-
-  private long getIndexSizeInBytes(String indexSizeString) {
-    String[] tokens = indexSizeString.split(" ");
-    double number = Double.parseDouble(tokens[0]);
-
-    long multiplier = 0;
-    switch (tokens[1]) {
-      case "bytes":
-        multiplier = 1;
-        break;
-      case "KB":
-        multiplier = 1024;
-        break;
-      case "MB":
-        multiplier = 1024 * 1024;
-        break;
-      case "GB":
-        multiplier = 1024 * 1024 * 1024;
-        break;
-      default:
-        throw new IllegalArgumentException("Unknown unit: " + tokens[1]);
-    }
-    
-    return (long)(number * multiplier);
-  }
-
-  public void reConnect() throws IOException {
-    if (jmxConnector != null) {
-      try {
-        jmxConnector.close();
-      } catch (IOException e) {
-        LOG.info("Could not close jmxConnector", e);
-      }
-    }
-
-    connect();
-  }
-
-  public void connect() throws IOException {
-    jmxConnector = JMXConnectorFactory.connect(jmxServiceUrl);
-    conn = jmxConnector.getMBeanServerConnection();
-  }
-}


Mime
View raw message