You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2016/09/28 09:41:40 UTC
[13/52] [abbrv] ambari git commit: AMBARI-18310. Refactor logsearch
portal side code (oleewere)
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
new file mode 100644
index 0000000..ba4f4a8
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
@@ -0,0 +1,186 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.BundleIdParamDefinition;
+import org.apache.ambari.logsearch.model.request.DateRangeParamDefinition;
+import org.apache.ambari.logsearch.model.request.ServiceLogParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class BaseServiceLogRequest extends BaseLogRequest
+ implements ServiceLogParamDefinition, BundleIdParamDefinition, DateRangeParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_LEVEL)
+ private String level;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_ADVANCED_SEARCH)
+ private String advancedSearch;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_TREE_PARAMS)
+ private String treeParams;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
+ private String eMessage;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_G_MUST_NOT)
+ private String gMustNot;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
+ private String hostName;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
+ private String componentName;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FILE_NAME)
+ private String fileName;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_BUNDLE_ID)
+ private String bundleId;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FROM)
+ private String from;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_TO)
+ private String to;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_DATE_RANGE_LABEL)
+ private String dateRangeLabel;
+
+ @Override
+ public String getLevel() {
+ return level;
+ }
+
+ @Override
+ public void setLevel(String level) {
+ this.level = level;
+ }
+
+ @Override
+ public String getAdvancedSearch() {
+ return advancedSearch;
+ }
+
+ @Override
+ public void setAdvancedSearch(String advancedSearch) {
+ this.advancedSearch = advancedSearch;
+ }
+
+ @Override
+ public String getTreeParams() {
+ return treeParams;
+ }
+
+ @Override
+ public void setTreeParams(String treeParams) {
+ this.treeParams = treeParams;
+ }
+
+ @Override
+ public String geteMessage() {
+ return eMessage;
+ }
+
+ @Override
+ public void seteMessage(String eMessage) {
+ this.eMessage = eMessage;
+ }
+
+ @Override
+ public String getgMustNot() {
+ return gMustNot;
+ }
+
+ @Override
+ public void setgMustNot(String gMustNot) {
+ this.gMustNot = gMustNot;
+ }
+
+ @Override
+ public String getHostName() {
+ return hostName;
+ }
+
+ @Override
+ public void setHostName(String hostName) {
+ this.hostName = hostName;
+ }
+
+ @Override
+ public String getComponentName() {
+ return componentName;
+ }
+
+ @Override
+ public void setComponentName(String componentName) {
+ this.componentName = componentName;
+ }
+
+ @Override
+ public String getFileName() {
+ return fileName;
+ }
+
+ @Override
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
+ }
+
+ @Override
+ public String getBundleId() {
+ return bundleId;
+ }
+
+ @Override
+ public void setBundleId(String bundleId) {
+ this.bundleId = bundleId;
+ }
+
+ @Override
+ public String getFrom() {
+ return from;
+ }
+
+ @Override
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+ @Override
+ public String getTo() {
+ return to;
+ }
+
+ @Override
+ public void setTo(String to) {
+ this.to = to;
+ }
+
+ @Override
+ public String getDateRangeLabel() {
+ return dateRangeLabel;
+ }
+
+ @Override
+ public void setDateRangeLabel(String dateRangeLabel) {
+ this.dateRangeLabel = dateRangeLabel;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
new file mode 100644
index 0000000..7001cf3
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
@@ -0,0 +1,119 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.CommonSearchParamDefinition;
+import org.apache.ambari.logsearch.model.request.SearchRequest;
+
+import javax.ws.rs.QueryParam;
+
+public class CommonSearchRequest implements SearchRequest, CommonSearchParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_START_INDEX)
+ private String startIndex;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_PAGE)
+ private String page;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_PAGE_SIZE)
+ private String pageSize;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_SORT_BY)
+ private String sortBy;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_SORT_TYPE)
+ private String sortType;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_START_TIME)
+ private String startTime;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_END_TIME)
+ private String endTime;
+
+ @Override
+ public String getStartIndex() {
+ return startIndex;
+ }
+
+ @Override
+ public void setStartIndex(String startIndex) {
+ this.startIndex = startIndex;
+ }
+
+ @Override
+ public String getPage() {
+ return page;
+ }
+
+ @Override
+ public void setPage(String page) {
+ this.page = page;
+ }
+
+ @Override
+ public String getPageSize() {
+ return pageSize;
+ }
+
+ @Override
+ public void setPageSize(String pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ @Override
+ public String getSortBy() {
+ return sortBy;
+ }
+
+ @Override
+ public void setSortBy(String sortBy) {
+ this.sortBy = sortBy;
+ }
+
+ @Override
+ public String getSortType() {
+ return sortType;
+ }
+
+ @Override
+ public void setSortType(String sortType) {
+ this.sortType = sortType;
+ }
+
+ @Override
+ public String getStartTime() {
+ return startTime;
+ }
+
+ @Override
+ public void setStartTime(String startTime) {
+ this.startTime = startTime;
+ }
+
+ @Override
+ public String getEndTime() {
+ return endTime;
+ }
+
+ @Override
+ public void setEndTime(String endTime) {
+ this.endTime = endTime;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
new file mode 100644
index 0000000..aa08aaf
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class FieldAuditBarGraphRequest extends AuditBarGraphRequest implements FieldParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
+ private String field;
+
+ @Override
+ public String getField() {
+ return field;
+ }
+
+ @Override
+ public void setField(String field) {
+ this.field = field;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
new file mode 100644
index 0000000..67502fa
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.model.request.impl;
+
+import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class FieldAuditLogRequest extends BaseAuditLogRequest implements FieldParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
+ private String field;
+
+ @Override
+ public String getField() {
+ return field;
+ }
+
+ @Override
+ public void setField(String field) {
+ this.field = field;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileRequest.java
new file mode 100644
index 0000000..78c5b33
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileRequest.java
@@ -0,0 +1,67 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.LogFileParamDefinition;
+import org.apache.ambari.logsearch.model.request.SearchRequest;
+
+import javax.ws.rs.QueryParam;
+
+public class LogFileRequest implements SearchRequest, LogFileParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT)
+ private String component;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST)
+ private String host;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_LOG_TYPE)
+ private String logType;
+
+ @Override
+ public String getComponent() {
+ return component;
+ }
+
+ @Override
+ public void setComponent(String component) {
+ this.component = component;
+ }
+
+ @Override
+ public String getHost() {
+ return host;
+ }
+
+ @Override
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ @Override
+ public String getLogType() {
+ return logType;
+ }
+
+ @Override
+ public void setLogType(String logType) {
+ this.logType = logType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileTailRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileTailRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileTailRequest.java
new file mode 100644
index 0000000..d5b91ab
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/LogFileTailRequest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.LogFileTailParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class LogFileTailRequest extends LogFileRequest implements LogFileTailParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_TAIL_SIZE)
+ private String tailSize;
+
+ @Override
+ public String getTailSize() {
+ return tailSize;
+ }
+
+ @Override
+ public void setTailSize(String tailSize) {
+ this.tailSize = tailSize;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/QueryRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/QueryRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/QueryRequest.java
new file mode 100644
index 0000000..0ce788c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/QueryRequest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.QueryParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class QueryRequest extends CommonSearchRequest implements QueryParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_QUERY)
+ private String query;
+
+ @Override
+ public String getQuery() {
+ return query;
+ }
+
+ @Override
+ public void setQuery(String query) {
+ this.query = query;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
new file mode 100644
index 0000000..a6aadbb
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
@@ -0,0 +1,109 @@
+/*
+ * 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.model.request.impl;
+
+import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.AnyGraphParamDefinition;
+import org.apache.ambari.logsearch.model.request.DateRangeParamDefinition;
+import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceAnyGraphRequest extends ServiceLogRequest
+ implements AnyGraphParamDefinition, DateRangeParamDefinition, UnitParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_XAXIS)
+ private String xAxis;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_YAXIS)
+ private String yAxis;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_STACK_BY)
+ private String stackBy;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
+ private String unit;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FROM)
+ private String from;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_TO)
+ private String to;
+
+ @Override
+ public String getxAxis() {
+ return xAxis;
+ }
+
+ @Override
+ public void setxAxis(String xAxis) {
+ this.xAxis = xAxis;
+ }
+
+ @Override
+ public String getyAxis() {
+ return yAxis;
+ }
+
+ @Override
+ public void setyAxis(String yAxis) {
+ this.yAxis = yAxis;
+ }
+
+ @Override
+ public String getStackBy() {
+ return stackBy;
+ }
+
+ @Override
+ public void setStackBy(String stackBy) {
+ this.stackBy = stackBy;
+ }
+
+ @Override
+ public String getUnit() {
+ return unit;
+ }
+
+ @Override
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+
+ @Override
+ public String getFrom() {
+ return from;
+ }
+
+ @Override
+ public void setFrom(String from) {
+ this.from = from;
+ }
+
+ @Override
+ public String getTo() {
+ return to;
+ }
+
+ @Override
+ public void setTo(String to) {
+ this.to = to;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceExtremeDatesRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceExtremeDatesRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceExtremeDatesRequest.java
new file mode 100644
index 0000000..8207c5d
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceExtremeDatesRequest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.model.request.impl;
+
+import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.BundleIdParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceExtremeDatesRequest extends CommonSearchRequest implements BundleIdParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_BUNDLE_ID)
+ private String bundleId;
+
+ @Override
+ public String getBundleId() {
+ return bundleId;
+ }
+
+ @Override
+ public void setBundleId(String bundleId) {
+ this.bundleId = bundleId;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
new file mode 100644
index 0000000..1618aa1
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceGraphRequest extends ServiceLogFileRequest implements UnitParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
+ private String unit;
+
+ @Override
+ public String getUnit() {
+ return unit;
+ }
+
+ @Override
+ public void setUnit(String unit) {
+ this.unit = unit;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
new file mode 100644
index 0000000..6ae0dc9
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
+import org.apache.ambari.logsearch.model.request.UtcOffsetParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceLogExportRequest extends ServiceLogFileRequest implements FormatParamDefinition, UtcOffsetParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
+ private String format;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_UTC_OFFSET)
+ private String utcOffset;
+
+ @Override
+ public String getFormat() {
+ return format;
+ }
+
+ @Override
+ public void setFormat(String format) {
+ this.format = format;
+ }
+
+ @Override
+ public String getUtcOffset() {
+ return utcOffset;
+ }
+
+ @Override
+ public void setUtcOffset(String utcOffset) {
+ this.utcOffset = utcOffset;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogFileRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogFileRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogFileRequest.java
new file mode 100644
index 0000000..6c7078a
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogFileRequest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.model.request.impl;
+
+import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.ServiceLogFileParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceLogFileRequest extends BaseServiceLogRequest implements ServiceLogFileParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_LOG_FILE)
+ private String hostLogFile;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT_LOG_FILE)
+ private String componentLogFile;
+
+ @Override
+ public String getHostLogFile() {
+ return hostLogFile;
+ }
+
+ @Override
+ public void setHostLogFile(String hostLogFile) {
+ this.hostLogFile = hostLogFile;
+ }
+
+ @Override
+ public String getComponentLogFile() {
+ return componentLogFile;
+ }
+
+ @Override
+ public void setComponentLogFile(String componentLogFile) {
+ this.componentLogFile = componentLogFile;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
new file mode 100644
index 0000000..9a46de3
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
@@ -0,0 +1,93 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
+import org.apache.ambari.logsearch.model.request.ServiceLogSearchParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceLogRequest extends ServiceLogFileRequest implements ServiceLogSearchParamDefinition, LastPageParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_KEYWORD)
+ private String keyWord;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_SOURCE_LOG_ID)
+ private String sourceLogId;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_KEYWORD_TYPE)
+ private String keywordType;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_TOKEN)
+ private String token;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
+ private boolean isLastPage;
+
+ @Override
+ public String getKeyWord() {
+ return keyWord;
+ }
+
+ @Override
+ public void setKeyWord(String keyWord) {
+ this.keyWord = keyWord;
+ }
+
+ @Override
+ public String getSourceLogId() {
+ return sourceLogId;
+ }
+
+ @Override
+ public void setSourceLogId(String sourceLogId) {
+ this.sourceLogId = sourceLogId;
+ }
+
+ @Override
+ public String getKeywordType() {
+ return keywordType;
+ }
+
+ @Override
+ public void setKeywordType(String keywordType) {
+ this.keywordType = keywordType;
+ }
+
+ @Override
+ public String getToken() {
+ return token;
+ }
+
+ @Override
+ public void setToken(String token) {
+ this.token = token;
+ }
+
+ @Override
+ public boolean isLastPage() {
+ return isLastPage;
+ }
+
+ @Override
+ public void setLastPage(boolean lastPage) {
+ isLastPage = lastPage;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
new file mode 100644
index 0000000..516c328
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.LogTruncatedParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class ServiceLogTruncatedRequest extends ServiceLogFileRequest implements LogTruncatedParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_ID)
+ private String id;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_SCROLL_TYPE)
+ private String scrollType;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_NUMBER_ROWS)
+ private String numberRows;
+
+ @Override
+ public String getId() {
+ return id;
+ }
+
+ @Override
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ @Override
+ public String getScrollType() {
+ return scrollType;
+ }
+
+ @Override
+ public void setScrollType(String scrollType) {
+ this.scrollType = scrollType;
+ }
+
+ @Override
+ public String getNumberRows() {
+ return numberRows;
+ }
+
+ @Override
+ public void setNumberRows(String numberRows) {
+ this.numberRows = numberRows;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/SimpleQueryRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/SimpleQueryRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/SimpleQueryRequest.java
new file mode 100644
index 0000000..eec4379
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/SimpleQueryRequest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.QueryParamDefinition;
+import org.apache.ambari.logsearch.model.request.SearchRequest;
+
+import javax.ws.rs.QueryParam;
+
+
+public class SimpleQueryRequest implements SearchRequest, QueryParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_QUERY)
+ private String query;
+
+ @Override
+ public String getQuery() {
+ return query;
+ }
+
+ @Override
+ public void setQuery(String query) {
+ this.query = query;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserConfigRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserConfigRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserConfigRequest.java
new file mode 100644
index 0000000..c99ea75
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserConfigRequest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.UserConfigParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class UserConfigRequest extends CommonSearchRequest implements UserConfigParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_USER_ID)
+ private String userId;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FILE_NAME)
+ private String filterName;
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_ROW_TYPE)
+ private String rowType;
+
+ @Override
+ public String getUserId() {
+ return userId;
+ }
+
+ @Override
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ @Override
+ public String getFilterName() {
+ return filterName;
+ }
+
+ @Override
+ public void setFilterName(String filterName) {
+ this.filterName = filterName;
+ }
+
+ @Override
+ public String getRowType() {
+ return rowType;
+ }
+
+ @Override
+ public void setRowType(String rowType) {
+ this.rowType = rowType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
new file mode 100644
index 0000000..1583f94
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.model.request.impl;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
+
+import javax.ws.rs.QueryParam;
+
+public class UserExportRequest extends FieldAuditLogRequest implements FormatParamDefinition {
+
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
+ private String format;
+
+ @Override
+ public String getFormat() {
+ return format;
+ }
+
+ @Override
+ public void setFormat(String format) {
+ this.format = format;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
new file mode 100644
index 0000000..6df56a1
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
@@ -0,0 +1,149 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.Date;
+import java.util.List;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public interface AuditLogData extends CommonLogData {
+
+ @JsonProperty("logType")
+ String getLogType();
+
+ void setLogType(String logType);
+
+ @JsonProperty("policy")
+ String getPolicy();
+
+ void setPolicy(String policy);
+
+ @JsonProperty("access")
+ String getAccess();
+
+ void setAccess(String access);
+
+ @JsonProperty("action")
+ String getAction();
+
+ void setAction(String action);
+
+ @JsonProperty("agent")
+ String getAgent();
+
+ void setAgent(String agent);
+
+ @JsonProperty("agentHost")
+ String getAgentHost();
+
+ void setAgentHost(String agentHost);
+
+ @JsonProperty("cliIP")
+ String getClientIp();
+
+ void setClientIp(String clientIp);
+
+ @JsonProperty("cliType")
+ String getClientType();
+
+ public void setClientType(String clientType);
+
+ @JsonProperty("reqContext")
+ String getRequestContext();
+
+ void setRequestContext(String requestContext);
+
+ @JsonProperty("enforcer")
+ String getEnforcer();
+
+ void setEnforcer(String enforcer);
+
+ @JsonProperty("evtTime")
+ Date getEventTime();
+
+ void setEventTime(Date eventTime);
+
+ @JsonProperty("reason")
+ String getReason();
+
+ void setReason(String reason);
+
+ @JsonProperty("proxyUsers")
+ List<String> getProxyUsers();
+
+ void setProxyUsers(List<String> proxyUsers);
+
+ @JsonProperty("repo")
+ String getRepo();
+
+ void setRepo(String repo);
+
+ @JsonProperty("repoType")
+ String getRepoType();
+
+ void setRepoType(String repoType);
+
+ @JsonProperty("reqData")
+ String getRequestData();
+
+ void setRequestData(String requestData);
+
+ @JsonProperty("reqUser")
+ String getRequestUser();
+
+ void setRequestUser(String requestUser);
+
+ @JsonProperty("resType")
+ String getResponseType();
+
+ void setResponseType(String requestType);
+
+ @JsonProperty("resource")
+ String getResource();
+
+ void setResource(String resource);
+
+ @JsonProperty("result")
+ Integer getResult();
+
+ void setResult(Integer result);
+
+ @JsonProperty("sess")
+ String getSession();
+
+ void setSession(String session);
+
+ @JsonProperty("tags")
+ List<String> getTags();
+
+ void setTags(List<String> tags);
+
+ @JsonProperty("tags_str")
+ String getTagsStr();
+
+ void setTagsStr(String tagsStr);
+
+ @JsonProperty("text")
+ String getText();
+
+ void setText(String text);
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogResponse.java
new file mode 100644
index 0000000..a886a96
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogResponse.java
@@ -0,0 +1,48 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class AuditLogResponse extends LogSearchResponse<AuditLogData> {
+
+ @ApiModelProperty
+ private List<AuditLogData> logList;
+
+ @Override
+ public List<AuditLogData> getLogList() {
+ return logList;
+ }
+
+ @Override
+ public void setLogList(List<AuditLogData> logList) {
+ this.logList = logList;
+ }
+
+ @Override
+ public int getListSize() {
+ return logList == null ? 0 : logList.size();
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphData.java
new file mode 100644
index 0000000..3f2bd6f
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphData.java
@@ -0,0 +1,53 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BarGraphData implements Serializable {
+
+ @ApiModelProperty
+ private Collection<NameValueData> dataCount = new ArrayList<>();
+ @ApiModelProperty
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Collection<NameValueData> getDataCount() {
+ return dataCount;
+ }
+
+ public void setDataCount(Collection<NameValueData> dateValueCounts) {
+ this.dataCount = dateValueCounts;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphDataListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphDataListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphDataListResponse.java
new file mode 100644
index 0000000..4d5d166
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/BarGraphDataListResponse.java
@@ -0,0 +1,42 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class BarGraphDataListResponse {
+
+ @ApiModelProperty
+ protected Collection<BarGraphData> graphData = new ArrayList<>();
+
+ public Collection<BarGraphData> getGraphData() {
+ return graphData;
+ }
+
+ public void setGraphData(Collection<BarGraphData> graphData) {
+ this.graphData = graphData;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CommonLogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CommonLogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CommonLogData.java
new file mode 100644
index 0000000..e2bba3f
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CommonLogData.java
@@ -0,0 +1,113 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import java.util.Date;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public interface CommonLogData extends LogData {
+
+ @JsonProperty("id")
+ String getId();
+
+ void setId(String id);
+
+ @JsonProperty("case_id")
+ String getCaseId();
+
+ void setCaseId(String caseId);
+
+ @JsonProperty("log_message")
+ String getLogMessage();
+
+ void setLogMessage(String logMessage);
+
+ @JsonProperty("bundle_id")
+ String getBundleId();
+
+ void setBundleId(String bundleId);
+
+ @JsonProperty("logfile_line_number")
+ Integer getLogFileLineNumber();
+
+ void setLogFileLineNumber(Integer logFileLineNumber);
+
+ @JsonProperty("file")
+ String getFile();
+
+ void setFile(String file);
+
+ @JsonProperty("type")
+ String getType();
+
+ void setType(String type);
+
+ @JsonProperty("seq_num")
+ Long getSeqNum();
+
+ void setSeqNum(Long seqNum);
+
+ @JsonProperty("message_md5")
+ String getMessageMd5();
+
+ void setMessageMd5(String messageMd5);
+
+ @JsonProperty("cluster")
+ String getCluster();
+
+ void setCluster(String cluster);
+
+ @JsonProperty("event_count")
+ Long getEventCount();
+
+ void setEventCount(Long eventCount);
+
+ @JsonProperty("event_md5")
+ public String getEventMd5();
+
+ public void setEventMd5(String eventMd5);
+
+ @JsonProperty("event_dur_ms")
+ public Long getEventDurationMs();
+
+ public void setEventDurationMs(Long eventDurationMs);
+
+ @JsonProperty("_ttl_")
+ String getTtl();
+
+ void setTtl(String ttl);
+
+ @JsonProperty("_expire_at_")
+ Date getExpire();
+
+ void setExpire(Date expire);
+
+ @JsonProperty("_version_")
+ Long getVersion();
+
+ void setVersion(Long version);
+
+ @JsonProperty("_router_field_")
+ Integer getRouterField();
+
+ void setRouterField(Integer routerField);
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/ComponentTypeLogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/ComponentTypeLogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/ComponentTypeLogData.java
new file mode 100644
index 0000000..6c15f9c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/ComponentTypeLogData.java
@@ -0,0 +1,32 @@
+/*
+ * 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.model.response;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public interface ComponentTypeLogData extends LogData {
+
+ @JsonProperty("type")
+ String getType();
+
+ void setType(String type);
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountData.java
new file mode 100644
index 0000000..fabaad2
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountData.java
@@ -0,0 +1,50 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CountData {
+
+ @ApiModelProperty
+ private String name;
+
+ @ApiModelProperty
+ private Long count;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Long getCount() {
+ return count;
+ }
+
+ public void setCount(Long count) {
+ this.count = count;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountDataListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountDataListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountDataListResponse.java
new file mode 100644
index 0000000..2543dcc
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/CountDataListResponse.java
@@ -0,0 +1,48 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class CountDataListResponse extends SearchResponse {
+
+ @ApiModelProperty
+ private List<CountData> vCounts;
+
+ public List<CountData> getvCounts() {
+ return vCounts;
+ }
+
+ public void setvCounts(List<CountData> vCounts) {
+ this.vCounts = vCounts;
+ }
+
+ @Override
+ public int getListSize() {
+ if (vCounts != null)
+ return vCounts.size();
+ return 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphData.java
new file mode 100644
index 0000000..e39ec95
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphData.java
@@ -0,0 +1,64 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.List;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class GraphData implements Serializable {
+
+ @ApiModelProperty
+ private String name;
+
+ @ApiModelProperty
+ private Long count;
+
+ @ApiModelProperty
+ private List<GraphData> dataList;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Long getCount() {
+ return count;
+ }
+
+ public void setCount(Long count) {
+ this.count = count;
+ }
+
+ public List<GraphData> getDataList() {
+ return dataList;
+ }
+
+ public void setDataList(List<GraphData> dataList) {
+ this.dataList = dataList;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphDataListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphDataListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphDataListResponse.java
new file mode 100644
index 0000000..4357c28
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GraphDataListResponse.java
@@ -0,0 +1,39 @@
+/*
+ * 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.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.List;
+
+@ApiModel
+public class GraphDataListResponse {
+
+ @ApiModelProperty
+ protected List<GraphData> graphData;
+
+ public List<GraphData> getGraphData() {
+ return graphData;
+ }
+
+ public void setGraphData(List<GraphData> graphData) {
+ this.graphData = graphData;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GroupListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GroupListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GroupListResponse.java
new file mode 100644
index 0000000..92c51f2
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/GroupListResponse.java
@@ -0,0 +1,48 @@
+/*
+ * 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.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel
+public class GroupListResponse extends SearchResponse {
+
+ @ApiModelProperty
+ private List<LogData> groupList = new ArrayList<>();
+
+ public List<LogData> getGroupList() {
+ return groupList;
+ }
+
+ public void setGroupList(List<LogData> groupList) {
+ this.groupList = groupList;
+ }
+
+ @Override
+ public int getListSize() {
+ if (groupList != null){
+ return groupList.size();
+ }
+ return 0;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/HostLogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/HostLogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/HostLogData.java
new file mode 100644
index 0000000..8cab1ab
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/HostLogData.java
@@ -0,0 +1,30 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+public interface HostLogData extends LogData {
+ @JsonProperty("host")
+ String getHost();
+
+ void setHost(String host);
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogData.java
new file mode 100644
index 0000000..ec6c34c
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogData.java
@@ -0,0 +1,25 @@
+/*
+ * 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.model.response;
+
+import org.apache.ambari.logsearch.common.Marker;
+
+@Marker
+public interface LogData {
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileData.java
new file mode 100644
index 0000000..5a67606
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileData.java
@@ -0,0 +1,48 @@
+/*
+ * 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.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel
+public class LogFileData {
+
+ @ApiModelProperty
+ private String name;
+
+ @ApiModelProperty
+ private String path;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileDataListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileDataListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileDataListResponse.java
new file mode 100644
index 0000000..57614c3
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogFileDataListResponse.java
@@ -0,0 +1,48 @@
+/*
+ * 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.model.response;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel
+public class LogFileDataListResponse extends SearchResponse {
+
+ @ApiModelProperty
+ private List<LogFileData> logFiles = new ArrayList<LogFileData>();
+
+ @Override
+ public int getListSize() {
+ if (logFiles == null) {
+ return 0;
+ }
+ return logFiles.size();
+ }
+
+ public List<LogFileData> getLogFiles() {
+ return logFiles;
+ }
+
+ public void setLogFiles(List<LogFileData> logFiles) {
+ this.logFiles = logFiles;
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogListResponse.java
new file mode 100644
index 0000000..c075fe2
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogListResponse.java
@@ -0,0 +1,27 @@
+/*
+ * 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.model.response;
+
+import java.util.List;
+
+public interface LogListResponse<T extends LogData> {
+ List<T> getLogList();
+
+ void setLogList(List<T> logList);
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchResponse.java
new file mode 100644
index 0000000..a63415b
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchResponse.java
@@ -0,0 +1,22 @@
+/*
+ * 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.model.response;
+
+abstract public class LogSearchResponse<T extends LogData> extends SearchResponse implements LogListResponse<T> {
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueData.java
new file mode 100644
index 0000000..3f320e7
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueData.java
@@ -0,0 +1,62 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class NameValueData {
+
+ @ApiModelProperty
+ private String name;
+ @ApiModelProperty
+ private String value;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ if (value.contains(".") && (value.contains("e") || value.contains("E"))) {
+ this.value = getExponentialValueReplaced(value);
+ } else {
+ this.value = value;
+ }
+ }
+
+ private String getExponentialValueReplaced(String value) {
+ try{
+ Double number = Double.parseDouble(value);
+ return String.format("%.0f", number);
+ } catch(Exception e){
+ return value;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/cd08bde6/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueDataListResponse.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueDataListResponse.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueDataListResponse.java
new file mode 100644
index 0000000..4cb983f
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/NameValueDataListResponse.java
@@ -0,0 +1,49 @@
+/*
+ * 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.model.response;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@ApiModel
+@JsonIgnoreProperties(ignoreUnknown = true)
+public class NameValueDataListResponse extends SearchResponse {
+ @ApiModelProperty
+ protected List<NameValueData> vNameValues = new ArrayList<>();
+
+ public List<NameValueData> getvNameValues() {
+ return vNameValues;
+ }
+
+ public void setvNameValues(List<NameValueData> vNameValues) {
+ this.vNameValues = vNameValues;
+ }
+
+ @Override
+ public int getListSize() {
+ if (vNameValues != null) {
+ return vNameValues.size();
+ }
+ return 0;
+ }
+}