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 2018/04/28 06:21:19 UTC
[ambari] branch trunk updated: AMBARI-23661. Support POST for
querying logs for Log Search REST API. (#1128)
This is an automated email from the ASF dual-hosted git repository.
oleewere pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 4851864 AMBARI-23661. Support POST for querying logs for Log Search REST API. (#1128)
4851864 is described below
commit 4851864539833cf07e3bee4cdc554992296aa293
Author: Olivér Szabó <ol...@gmail.com>
AuthorDate: Sat Apr 28 08:21:17 2018 +0200
AMBARI-23661. Support POST for querying logs for Log Search REST API. (#1128)
---
.../logsearch/common/LogSearchConstants.java | 4 +-
.../BaseServiceLogRequestQueryConverter.java | 4 +-
.../model/request/LogParamDefinition.java | 8 +-
.../model/request/impl/AuditBarGraphRequest.java | 33 +---
.../model/request/impl/AuditComponentRequest.java | 16 +-
.../model/request/impl/AuditLogRequest.java | 33 +---
.../request/impl/AuditServiceLoadRequest.java | 18 +-
.../model/request/impl/BaseLogRequest.java | 111 +-----------
.../model/request/impl/BaseServiceLogRequest.java | 85 +--------
.../model/request/impl/CommonSearchRequest.java | 121 +------------
.../model/request/impl/EventHistoryRequest.java | 33 +---
.../request/impl/FieldAuditBarGraphRequest.java | 33 +---
.../model/request/impl/FieldAuditLogRequest.java | 33 +---
.../model/request/impl/HostLogFilesRequest.java | 50 +-----
.../model/request/impl/ServiceAnyGraphRequest.java | 60 +------
.../model/request/impl/ServiceGraphRequest.java | 20 +--
.../impl/ServiceLogAggregatedInfoRequest.java | 2 +-
.../impl/ServiceLogComponentHostRequest.java | 2 +-
.../impl/ServiceLogComponentLevelRequest.java | 2 +-
.../request/impl/ServiceLogExportRequest.java | 31 +---
.../impl/ServiceLogHostComponentRequest.java | 20 +--
.../request/impl/ServiceLogLevelCountRequest.java | 2 +-
.../model/request/impl/ServiceLogRequest.java | 72 +-------
.../request/impl/ServiceLogTruncatedRequest.java | 46 +----
.../request/impl/TopFieldAuditLogRequest.java | 34 +---
.../model/request/impl/UserExportRequest.java | 33 +---
.../AuditBarGraphBodyRequest.java} | 19 +-
.../AuditComponentBodyRequest.java} | 17 +-
.../AuditLogBodyRequest.java} | 18 +-
.../AuditServiceLoadBodyRequest.java} | 18 +-
.../BaseLogBodyRequest.java} | 51 +++---
.../BaseServiceLogBodyRequest.java} | 28 ++-
.../CommonSearchBodyRequest.java} | 33 ++--
.../FieldAuditBarGraphBodyRequest.java} | 21 +--
.../FieldAuditLogBodyRequest.java} | 19 +-
.../HostLogFilesBodyRequest.java} | 24 ++-
.../ServiceAnyGraphBodyRequest.java} | 24 ++-
.../ServiceGraphBodyRequest.java} | 16 +-
.../ServiceLogAggregatedInfoBodyRequest.java} | 9 +-
.../ServiceLogBodyRequest.java} | 25 ++-
.../ServiceLogComponentHostBodyRequest.java} | 9 +-
.../ServiceLogComponentLevelBodyRequest.java} | 9 +-
.../ServiceLogExportBodyRequest.java} | 19 +-
.../ServiceLogHostComponentBodyRequest.java} | 14 +-
.../ServiceLogLevelCountBodyRequest.java} | 9 +-
.../ServiceLogTruncatedBodyRequest.java} | 20 +--
.../TopFieldAuditLogBodyRequest.java} | 19 +-
.../UserExportBodyRequest.java} | 19 +-
.../AuditBarGraphQueryRequest.java} | 12 +-
.../AuditComponentQueryRequest.java} | 12 +-
.../AuditLogQueryRequest.java} | 11 +-
.../AuditServiceLoadQueryRequest.java} | 12 +-
.../BaseLogQueryRequest.java} | 32 ++--
.../BaseServiceLogQueryRequest.java} | 13 +-
.../CommonSearchQueryRequest.java} | 11 +-
.../EventHistoryQueryRequest.java} | 10 +-
.../FieldAuditBarGraphQueryRequest.java} | 16 +-
.../FieldAuditLogQueryRequest.java} | 12 +-
.../HostLogFilesQueryRequest.java} | 16 +-
.../ServiceAnyGraphQueryRequest.java} | 12 +-
.../ServiceGraphQueryRequest.java} | 11 +-
.../ServiceLogAggregatedInfoQueryRequest.java} | 9 +-
.../ServiceLogComponentHostQueryRequest.java} | 9 +-
.../ServiceLogComponentLevelQueryRequest.java} | 9 +-
.../ServiceLogExportQueryRequest.java} | 12 +-
.../ServiceLogHostComponentQueryRequest.java} | 9 +-
.../ServiceLogLevelCountQueryRequest.java} | 9 +-
.../ServiceLogQueryRequest.java} | 11 +-
.../ServiceLogTruncatedQueryRequest.java} | 11 +-
.../TopFieldAuditLogQueryRequest.java} | 12 +-
.../UserExportQueryRequest.java} | 12 +-
.../ambari/logsearch/rest/AuditLogsResource.java | 94 +++++++---
.../logsearch/rest/EventHistoryResource.java | 4 +-
.../ambari/logsearch/rest/ServiceLogsResource.java | 199 ++++++++++++++++-----
.../apache/ambari/logsearch/util/DownloadUtil.java | 8 +-
.../AuditBarGraphRequestQueryConverterTest.java | 5 +-
.../AuditComponentRequestQueryConverterTest.java | 5 +-
.../converter/AuditLogRequestConverterTest.java | 5 +-
.../AuditServiceLoadRequestQueryConverterTest.java | 5 +-
.../BaseServiceLogRequestQueryConverterTest.java | 5 +-
.../EventHistoryRequestQueryConverterTest.java | 3 +-
.../FieldAuditLogRequestQueryConverterTest.java | 5 +-
.../HostLogFilesRequestQueryConverterTest.java | 5 +-
.../ServiceLogAnyGraphRequestConverterTest.java | 5 +-
...LogComponentLevelRequestQueryConverterTest.java | 5 +-
...LogComponentRequestFacetQueryConverterTest.java | 5 +-
...viceLogLevelCountRequestQueryConverterTest.java | 5 +-
...LogLevelDateRangeRequestQueryConverterTest.java | 5 +-
...rviceLogTreeRequestFacetQueryConverterTest.java | 5 +-
...rviceLogTruncatedRequestQueryConverterTest.java | 5 +-
.../TopFieldAuditLogRequestQueryConverterTest.java | 5 +-
.../UserExportRequestQueryConverterTest.java | 5 +-
.../src/app/services/mock-api-data.service.ts | 4 +-
93 files changed, 680 insertions(+), 1341 deletions(-)
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
index 82dfcd5..8cc43d5 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/common/LogSearchConstants.java
@@ -113,8 +113,8 @@ public class LogSearchConstants {
public static final String REQUEST_PARAM_FIELD = "field";
public static final String REQUEST_PARAM_FORMAT = "format";
public static final String REQUEST_PARAM_LAST_PAGE = "lastPage";
- public static final String REQUEST_PARAM_I_MESSAGE = "iMessage";
- public static final String REQUEST_PARAM_E_MESSAGE = "eMessage";
+ public static final String REQUEST_PARAM_I_MESSAGE = "includeMessage";
+ public static final String REQUEST_PARAM_E_MESSAGE = "excludeMessage";
public static final String REQUEST_PARAM_MUST_BE = "mustBe";
public static final String REQUEST_PARAM_MUST_NOT = "mustNot";
public static final String REQUEST_PARAM_INCLUDE_QUERY = "includeQuery";
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverter.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverter.java
index a1f6e75..8accd71 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverter.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverter.java
@@ -44,8 +44,8 @@ public class BaseServiceLogRequestQueryConverter extends AbstractServiceLogReque
@Override
public SimpleQuery extendLogQuery(BaseServiceLogRequest request, SimpleQuery query) {
List<String> levels = splitValueAsList(request.getLevel(), ",");
- addContainsFilterQuery(query, KEY_LOG_MESSAGE, SolrUtil.escapeForStandardTokenizer(request.getiMessage()));
- addContainsFilterQuery(query, KEY_LOG_MESSAGE, SolrUtil.escapeForStandardTokenizer(request.geteMessage()), true);
+ addContainsFilterQuery(query, KEY_LOG_MESSAGE, SolrUtil.escapeForStandardTokenizer(request.getIncludeMessage()));
+ addContainsFilterQuery(query, KEY_LOG_MESSAGE, SolrUtil.escapeForStandardTokenizer(request.getExcludeMessage()), true);
addEqualsFilterQuery(query, HOST, SolrUtil.escapeQueryChars(request.getHostName()));
addEqualsFilterQuery(query, PATH, SolrUtil.escapeQueryChars(request.getFileName()));
addEqualsFilterQuery(query, COMPONENT, SolrUtil.escapeQueryChars(request.getComponentName()));
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/LogParamDefinition.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/LogParamDefinition.java
index 4840eaa..e2c61ee 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/LogParamDefinition.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/LogParamDefinition.java
@@ -30,15 +30,15 @@ import static org.apache.ambari.logsearch.doc.DocConstants.CommonDescriptions.EX
public interface LogParamDefinition {
- String getiMessage();
+ String getIncludeMessage();
@ApiParam(value = I_MESSAGE_D, name = LogSearchConstants.REQUEST_PARAM_I_MESSAGE)
- void setiMessage(String iMessage);
+ void setIncludeMessage(String includeMessage);
- String geteMessage();
+ String getExcludeMessage();
@ApiParam(value = E_MESSAGE_D, name = LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
- void seteMessage(String eMessage);
+ void setExcludeMessage(String excludeMessage);
String getMustBe();
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
index f135af5..de75f15 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
@@ -18,37 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class AuditBarGraphRequest extends BaseLogRequest implements UnitParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
- private String unit;
-
- @Override
- public String getUnit() {
- return unit;
- }
-
- @Override
- public void setUnit(String unit) {
- this.unit = unit;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface AuditBarGraphRequest extends BaseLogRequest, UnitParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
index bae8a13..76af20b 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
@@ -18,23 +18,9 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
@Marker
-public class AuditComponentRequest extends BaseLogRequest implements UserParamDefinition {
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- public void setUserList(String userList) {
- this.userList = userList;
- }
+public interface AuditComponentRequest extends BaseLogRequest, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
index 799add4..ce3eefc 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
@@ -18,37 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class AuditLogRequest extends BaseLogRequest implements LastPageParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
- private boolean isLastPage;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public boolean isLastPage() {
- return isLastPage;
- }
-
- @Override
- public void setLastPage(boolean lastPage) {
- isLastPage = lastPage;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface AuditLogRequest extends BaseLogRequest, LastPageParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
index 5f91320..b3cd285 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
@@ -18,25 +18,9 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
@Marker
-public class AuditServiceLoadRequest extends BaseLogRequest implements UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+public interface AuditServiceLoadRequest extends BaseLogRequest, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
index 5da2e83..aa3995d 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
@@ -18,115 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.DateRangeParamDefinition;
import org.apache.ambari.logsearch.model.request.LogParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class BaseLogRequest extends CommonSearchRequest implements LogParamDefinition, DateRangeParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_I_MESSAGE)
- private String iMessage;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
- private String eMessage;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_MUST_BE)
- private String mustBe;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_MUST_NOT)
- private String mustNot;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_INCLUDE_QUERY)
- private String includeQuery;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_EXCLUDE_QUERY)
- private String excludeQuery;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FROM)
- private String from;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_TO)
- private String to;
-
- @Override
- public String getiMessage() {
- return iMessage;
- }
-
- @Override
- public void setiMessage(String iMessage) {
- this.iMessage = iMessage;
- }
-
- @Override
- public String geteMessage() {
- return eMessage;
- }
-
- @Override
- public void seteMessage(String eMessage) {
- this.eMessage = eMessage;
- }
-
- @Override
- public String getMustBe() {
- return mustBe;
- }
-
- @Override
- public void setMustBe(String mustBe) {
- this.mustBe = mustBe;
- }
-
- @Override
- public String getMustNot() {
- return mustNot;
- }
-
- @Override
- public void setMustNot(String mustNot) {
- this.mustNot = mustNot;
- }
-
- @Override
- public String getIncludeQuery() {
- return includeQuery;
- }
-
- @Override
- public void setIncludeQuery(String includeQuery) {
- this.includeQuery = includeQuery;
- }
-
- @Override
- public String getExcludeQuery() {
- return excludeQuery;
- }
-
- @Override
- public void setExcludeQuery(String excludeQuery) {
- this.excludeQuery = excludeQuery;
- }
-
- @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;
- }
+@Marker
+public interface BaseLogRequest extends CommonSearchRequest, LogParamDefinition, DateRangeParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
index cbe3d68..2d90e61 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
@@ -18,90 +18,11 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.BundleIdParamDefinition;
import org.apache.ambari.logsearch.model.request.ServiceLogParamDefinition;
-import javax.ws.rs.QueryParam;
-public class BaseServiceLogRequest extends BaseLogRequest
- implements ServiceLogParamDefinition, BundleIdParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_LEVEL)
- private String level;
-
- @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_HOSTS)
- private String hostList;
-
- @Override
- public String getLevel() {
- return level;
- }
-
- @Override
- public void setLevel(String level) {
- this.level = level;
- }
-
- @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 getHostList() {
- return hostList;
- }
-
- @Override
- public void setHostList(String hostList) {
- this.hostList = hostList;
- }
+@Marker
+public interface BaseServiceLogRequest extends BaseLogRequest, ServiceLogParamDefinition, BundleIdParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
index 738c24e..bfa84a5 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
@@ -18,127 +18,8 @@
*/
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 org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import javax.annotation.Nullable;
-import javax.ws.rs.DefaultValue;
-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)
- @DefaultValue(LogSearchConstants.REQUEST_PARAM_PAGE_DEFAULT_VALUE)
- private String page;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_PAGE_SIZE)
- @DefaultValue(LogSearchConstants.REQUEST_PARAM_PAGE_SIZE_DEFAULT_VALUE)
- 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;
-
- @Nullable
- @QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
- private String clusters;
-
- @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;
- }
-
- @Override
- public String getClusters() {
- return clusters;
- }
-
- @Override
- public void setClusters(String clusters) {
- this.clusters = clusters;
- }
-
- @Override
- public String toString() {
- return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
- }
+public interface CommonSearchRequest extends SearchRequest, CommonSearchParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java
index 17be988..f3f8b61 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java
@@ -18,36 +18,9 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.EventHistoryParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class EventHistoryRequest extends CommonSearchRequest implements EventHistoryParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FILTER_NAME)
- private String filterName;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_ROW_TYPE)
- private String rowType;
-
- @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;
- }
+@Marker
+public interface EventHistoryRequest extends CommonSearchRequest, EventHistoryParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
index 6930698..460591a 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditBarGraphRequest.java
@@ -18,37 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class FieldAuditBarGraphRequest extends AuditBarGraphRequest implements FieldParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
- private String field;
-
- @Override
- public String getField() {
- return field;
- }
-
- @Override
- public void setField(String field) {
- this.field = field;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface FieldAuditBarGraphRequest extends AuditBarGraphRequest, FieldParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
index 7f3e6bf..e00c69f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
@@ -18,37 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class FieldAuditLogRequest extends BaseLogRequest implements FieldParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
- private String field;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public String getField() {
- return field;
- }
-
- @Override
- public void setField(String field) {
- this.field = field;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface FieldAuditLogRequest extends BaseLogRequest, FieldParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
index b2149aa..7b3cf3b 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
@@ -18,54 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import javax.annotation.Nullable;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.QueryParam;
-
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.HostComponentParamDefinition;
import org.apache.ambari.logsearch.model.request.SearchRequest;
-public class HostLogFilesRequest implements HostComponentParamDefinition, SearchRequest {
-
- @NotNull
- @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
- private String hostName;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
- private String componentName;
-
- @Nullable
- @QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
- private String clusters;
-
- @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 getClusters() {
- return clusters;
- }
-
- @Override
- public void setClusters(String clusters) {
- this.clusters = clusters;
- }
+@Marker
+public interface HostLogFilesRequest extends HostComponentParamDefinition, SearchRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
index 09603e3..74edc14 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
@@ -18,64 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.AnyGraphParamDefinition;
import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class ServiceAnyGraphRequest extends ServiceLogRequest
- implements AnyGraphParamDefinition, 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;
-
- @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;
- }
+@Marker
+public interface ServiceAnyGraphRequest extends ServiceLogRequest, AnyGraphParamDefinition, UnitParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
index 57884b7..1b7cb86 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
@@ -18,23 +18,9 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class ServiceGraphRequest extends ServiceLogRequest 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;
- }
+@Marker
+public interface ServiceGraphRequest extends ServiceLogRequest, UnitParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogAggregatedInfoRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogAggregatedInfoRequest.java
index 84955d8..c2833da 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogAggregatedInfoRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogAggregatedInfoRequest.java
@@ -21,5 +21,5 @@ package org.apache.ambari.logsearch.model.request.impl;
import org.apache.ambari.logsearch.common.Marker;
@Marker
-public class ServiceLogAggregatedInfoRequest extends BaseServiceLogRequest {
+public interface ServiceLogAggregatedInfoRequest extends BaseServiceLogRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentHostRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentHostRequest.java
index 6d0b3b1..6e1dc43 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentHostRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentHostRequest.java
@@ -21,5 +21,5 @@ package org.apache.ambari.logsearch.model.request.impl;
import org.apache.ambari.logsearch.common.Marker;
@Marker
-public class ServiceLogComponentHostRequest extends ServiceLogRequest {
+public interface ServiceLogComponentHostRequest extends ServiceLogRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentLevelRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentLevelRequest.java
index dd2b8af..0ff1b4f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentLevelRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogComponentLevelRequest.java
@@ -21,5 +21,5 @@ package org.apache.ambari.logsearch.model.request.impl;
import org.apache.ambari.logsearch.common.Marker;
@Marker
-public class ServiceLogComponentLevelRequest extends ServiceLogRequest {
+public interface ServiceLogComponentLevelRequest extends ServiceLogRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
index 16300ce..3846ad5 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
@@ -18,37 +18,12 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
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 ServiceLogRequest 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;
- }
+@Marker
+public interface ServiceLogExportRequest extends ServiceLogRequest, FormatParamDefinition, UtcOffsetParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
index 6242362..4a04d4c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
@@ -18,22 +18,8 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.common.Marker;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogHostComponentRequest extends ServiceLogRequest {
- @QueryParam("hostName")
- @ApiParam
- String hostName;
-
- @Override
- public String getHostName() {
- return hostName;
- }
-
- @Override
- public void setHostName(String hostName) {
- this.hostName = hostName;
- }
+@Marker
+public interface ServiceLogHostComponentRequest extends ServiceLogRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
index 7f0805f..e32a9eb 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
@@ -21,5 +21,5 @@ package org.apache.ambari.logsearch.model.request.impl;
import org.apache.ambari.logsearch.common.Marker;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public interface ServiceLogLevelCountRequest extends BaseServiceLogRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
index fe36ad8..d6e485c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
@@ -18,76 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
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 BaseServiceLogRequest 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;
- }
+@Marker
+public interface ServiceLogRequest extends BaseServiceLogRequest, ServiceLogSearchParamDefinition, LastPageParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
index c4b0049..386a9bf 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
@@ -18,49 +18,9 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.LogTruncatedParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogTruncatedRequest extends ServiceLogRequest 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 Integer 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 Integer getNumberRows() {
- return numberRows;
- }
-
- @Override
- public void setNumberRows(Integer numberRows) {
- this.numberRows = numberRows;
- }
+@Marker
+public interface ServiceLogTruncatedRequest extends ServiceLogRequest, LogTruncatedParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
index 6494822..c923dbd 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
@@ -18,38 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.TopParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
-
-public class TopFieldAuditLogRequest extends FieldAuditLogRequest implements TopParamDefinition, UserParamDefinition {
-
- @PathParam(LogSearchConstants.REQUEST_PARAM_TOP)
- private Integer top;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public Integer getTop() {
- return top;
- }
-
- @Override
- public void setTop(Integer top) {
- this.top = top;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface TopFieldAuditLogRequest extends FieldAuditLogRequest, TopParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
index 3eabe79..c9c3a34 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
@@ -18,37 +18,10 @@
*/
package org.apache.ambari.logsearch.model.request.impl;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.common.Marker;
import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
import org.apache.ambari.logsearch.model.request.UserParamDefinition;
-import javax.ws.rs.QueryParam;
-
-public class UserExportRequest extends FieldAuditLogRequest implements FormatParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
- private String format;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
- @Override
- public String getFormat() {
- return format;
- }
-
- @Override
- public void setFormat(String format) {
- this.format = format;
- }
-
- @Override
- public String getUserList() {
- return userList;
- }
-
- @Override
- public void setUserList(String userList) {
- this.userList = userList;
- }
+@Marker
+public interface UserExportRequest extends FieldAuditLogRequest, FormatParamDefinition, UserParamDefinition {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditBarGraphBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditBarGraphBodyRequest.java
index f135af5..e63fdf9 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditBarGraphBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,20 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditBarGraphRequest;
-import javax.ws.rs.QueryParam;
-
-public class AuditBarGraphRequest extends BaseLogRequest implements UnitParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+public class AuditBarGraphBodyRequest extends BaseLogBodyRequest implements AuditBarGraphRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_UNIT)
private String unit;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditComponentBodyRequest.java
similarity index 73%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditComponentBodyRequest.java
index bae8a13..ee7e2aa 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditComponentBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,17 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.common.Marker;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditComponentRequest;
-import javax.ws.rs.QueryParam;
-
-@Marker
-public class AuditComponentRequest extends BaseLogRequest implements UserParamDefinition {
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+public class AuditComponentBodyRequest extends BaseLogBodyRequest implements AuditComponentRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditLogBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditLogBodyRequest.java
index 799add4..5d67b34 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,20 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditLogRequest;
-import javax.ws.rs.QueryParam;
+public class AuditLogBodyRequest extends BaseLogBodyRequest implements AuditLogRequest {
-public class AuditLogRequest extends BaseLogRequest implements LastPageParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
private boolean isLastPage;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditServiceLoadBodyRequest.java
similarity index 73%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditServiceLoadBodyRequest.java
index 5f91320..7a4cdaa 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/AuditServiceLoadBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,18 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.common.Marker;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditServiceLoadRequest;
-import javax.ws.rs.QueryParam;
-
-@Marker
-public class AuditServiceLoadRequest extends BaseLogRequest implements UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+public class AuditServiceLoadBodyRequest extends BaseLogBodyRequest implements AuditServiceLoadRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseLogBodyRequest.java
similarity index 63%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseLogBodyRequest.java
index 5da2e83..b65dcf8 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,58 +16,55 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.DateRangeParamDefinition;
-import org.apache.ambari.logsearch.model.request.LogParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.BaseLogRequest;
-import javax.ws.rs.QueryParam;
+public class BaseLogBodyRequest extends CommonSearchBodyRequest implements BaseLogRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_I_MESSAGE)
+ private String includeMessage;
-public class BaseLogRequest extends CommonSearchRequest implements LogParamDefinition, DateRangeParamDefinition {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
+ private String excludeMessage;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_I_MESSAGE)
- private String iMessage;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
- private String eMessage;
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_MUST_BE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_MUST_BE)
private String mustBe;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_MUST_NOT)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_MUST_NOT)
private String mustNot;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_INCLUDE_QUERY)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_INCLUDE_QUERY)
private String includeQuery;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_EXCLUDE_QUERY)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_EXCLUDE_QUERY)
private String excludeQuery;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FROM)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FROM)
private String from;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_TO)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_TO)
private String to;
@Override
- public String getiMessage() {
- return iMessage;
+ public String getIncludeMessage() {
+ return includeMessage;
}
@Override
- public void setiMessage(String iMessage) {
- this.iMessage = iMessage;
+ public void setIncludeMessage(String includeMessage) {
+ this.includeMessage = includeMessage;
}
@Override
- public String geteMessage() {
- return eMessage;
+ public String getExcludeMessage() {
+ return excludeMessage;
}
@Override
- public void seteMessage(String eMessage) {
- this.eMessage = eMessage;
+ public void setExcludeMessage(String excludeMessage) {
+ this.excludeMessage = excludeMessage;
}
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseServiceLogBodyRequest.java
similarity index 73%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseServiceLogBodyRequest.java
index cbe3d68..a75938c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/BaseServiceLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,33 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.BundleIdParamDefinition;
-import org.apache.ambari.logsearch.model.request.ServiceLogParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.BaseServiceLogRequest;
-import javax.ws.rs.QueryParam;
-
-public class BaseServiceLogRequest extends BaseLogRequest
- implements ServiceLogParamDefinition, BundleIdParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_LEVEL)
+public class BaseServiceLogBodyRequest extends BaseLogBodyRequest implements BaseServiceLogRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_LEVEL)
private String level;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
private String hostName;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
private String componentName;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FILE_NAME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FILE_NAME)
private String fileName;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_BUNDLE_ID)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_BUNDLE_ID)
private String bundleId;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_HOSTS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_HOSTS)
private String hostList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/CommonSearchBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/CommonSearchBodyRequest.java
index 738c24e..7c0befc 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/CommonSearchBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,45 +16,44 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.CommonSearchParamDefinition;
-import org.apache.ambari.logsearch.model.request.SearchRequest;
+import org.apache.ambari.logsearch.model.request.impl.CommonSearchRequest;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import javax.annotation.Nullable;
import javax.ws.rs.DefaultValue;
-import javax.ws.rs.QueryParam;
-public class CommonSearchRequest implements SearchRequest, CommonSearchParamDefinition {
+public class CommonSearchBodyRequest implements CommonSearchRequest {
- @QueryParam(LogSearchConstants.REQUEST_PARAM_START_INDEX)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_START_INDEX)
private String startIndex;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_PAGE)
+ @JsonProperty(value = LogSearchConstants.REQUEST_PARAM_PAGE, defaultValue = LogSearchConstants.REQUEST_PARAM_PAGE_DEFAULT_VALUE)
@DefaultValue(LogSearchConstants.REQUEST_PARAM_PAGE_DEFAULT_VALUE)
- private String page;
+ private String page = LogSearchConstants.REQUEST_PARAM_PAGE_DEFAULT_VALUE;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_PAGE_SIZE)
+ @JsonProperty(value = LogSearchConstants.REQUEST_PARAM_PAGE_SIZE, defaultValue = LogSearchConstants.REQUEST_PARAM_PAGE_SIZE_DEFAULT_VALUE)
@DefaultValue(LogSearchConstants.REQUEST_PARAM_PAGE_SIZE_DEFAULT_VALUE)
- private String pageSize;
+ private String pageSize = LogSearchConstants.REQUEST_PARAM_PAGE_SIZE_DEFAULT_VALUE;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_SORT_BY)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_SORT_BY)
private String sortBy;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_SORT_TYPE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_SORT_TYPE)
private String sortType;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_START_TIME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_START_TIME)
private String startTime;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_END_TIME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_END_TIME)
private String endTime;
@Nullable
- @QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
private String clusters;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditBarGraphBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditBarGraphBodyRequest.java
index 7f3e6bf..15f4459 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditBarGraphBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,22 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.FieldAuditBarGraphRequest;
-import javax.ws.rs.QueryParam;
-
-public class FieldAuditLogRequest extends BaseLogRequest implements FieldParamDefinition, UserParamDefinition {
+public class FieldAuditBarGraphBodyRequest extends AuditBarGraphBodyRequest implements FieldAuditBarGraphRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
+ private String userList;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FIELD)
private String field;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
@Override
public String getField() {
return field;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditLogBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditLogBodyRequest.java
index 7f3e6bf..b18f0ea 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/FieldAuditLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,20 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.FieldAuditLogRequest;
-import javax.ws.rs.QueryParam;
-
-public class FieldAuditLogRequest extends BaseLogRequest implements FieldParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
+public class FieldAuditLogBodyRequest extends BaseLogBodyRequest implements FieldAuditLogRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FIELD)
private String field;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/HostLogFilesBodyRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/HostLogFilesBodyRequest.java
index b2149aa..4a53728 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/HostLogFilesBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,27 +16,25 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
-
-import javax.annotation.Nullable;
-import javax.validation.constraints.NotNull;
-import javax.ws.rs.QueryParam;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.HostComponentParamDefinition;
-import org.apache.ambari.logsearch.model.request.SearchRequest;
+import org.apache.ambari.logsearch.model.request.impl.HostLogFilesRequest;
-public class HostLogFilesRequest implements HostComponentParamDefinition, SearchRequest {
+import javax.annotation.Nullable;
+import javax.validation.constraints.NotNull;
+public class HostLogFilesBodyRequest implements HostLogFilesRequest {
@NotNull
- @QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
private String hostName;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_COMPONENT_NAME)
private String componentName;
@Nullable
- @QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES)
private String clusters;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceAnyGraphBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceAnyGraphBodyRequest.java
index 09603e3..23b186a 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceAnyGraphBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,27 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.AnyGraphParamDefinition;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceAnyGraphRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceAnyGraphRequest extends ServiceLogRequest
- implements AnyGraphParamDefinition, UnitParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_XAXIS)
+public class ServiceAnyGraphBodyRequest extends ServiceLogBodyRequest implements ServiceAnyGraphRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_XAXIS)
private String xAxis;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_YAXIS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_YAXIS)
private String yAxis;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_STACK_BY)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_STACK_BY)
private String stackBy;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_UNIT)
private String unit;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceGraphBodyRequest.java
similarity index 74%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceGraphBodyRequest.java
index 57884b7..7d7d233 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceGraphBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceGraphRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceGraphRequest extends ServiceLogRequest implements UnitParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
+public class ServiceGraphBodyRequest extends ServiceLogBodyRequest implements ServiceGraphRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_UNIT)
private String unit;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogAggregatedInfoBodyRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogAggregatedInfoBodyRequest.java
index 7f0805f..0f2fc6b 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogAggregatedInfoBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogAggregatedInfoRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogAggregatedInfoBodyRequest extends BaseServiceLogBodyRequest implements ServiceLogAggregatedInfoRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogBodyRequest.java
similarity index 73%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogBodyRequest.java
index fe36ad8..a7d4d79 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,29 +16,26 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
-import org.apache.ambari.logsearch.model.request.ServiceLogSearchParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogRequest extends BaseServiceLogRequest implements ServiceLogSearchParamDefinition, LastPageParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_KEYWORD)
+public class ServiceLogBodyRequest extends BaseServiceLogBodyRequest implements ServiceLogRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_KEYWORD)
private String keyWord;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_SOURCE_LOG_ID)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_SOURCE_LOG_ID)
private String sourceLogId;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_KEYWORD_TYPE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_KEYWORD_TYPE)
private String keywordType;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_TOKEN)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_TOKEN)
private String token;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
private boolean isLastPage;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentHostBodyRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentHostBodyRequest.java
index 7f0805f..fd117e0 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentHostBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentHostRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogComponentHostBodyRequest extends ServiceLogBodyRequest implements ServiceLogComponentHostRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentLevelBodyRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentLevelBodyRequest.java
index 7f0805f..30bfa54 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogComponentLevelBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentLevelRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogComponentLevelBodyRequest extends ServiceLogBodyRequest implements ServiceLogComponentLevelRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogExportBodyRequest.java
similarity index 71%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogExportBodyRequest.java
index 16300ce..a75e18d 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogExportBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,20 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
-import org.apache.ambari.logsearch.model.request.UtcOffsetParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogExportRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogExportRequest extends ServiceLogRequest implements FormatParamDefinition, UtcOffsetParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
+public class ServiceLogExportBodyRequest extends ServiceLogBodyRequest implements ServiceLogExportRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FORMAT)
private String format;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_UTC_OFFSET)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_UTC_OFFSET)
private String utcOffset;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogHostComponentBodyRequest.java
similarity index 74%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogHostComponentBodyRequest.java
index 6242362..fe7663f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogHostComponentBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogHostComponentRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogHostComponentRequest extends ServiceLogRequest {
- @QueryParam("hostName")
+public class ServiceLogHostComponentBodyRequest extends ServiceLogBodyRequest implements ServiceLogHostComponentRequest {
+ @JsonProperty("hostName")
@ApiParam
String hostName;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogLevelCountBodyRequest.java
similarity index 76%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogLevelCountBodyRequest.java
index 7f0805f..1b8e7f2 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogLevelCountBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogLevelCountRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogLevelCountBodyRequest extends BaseServiceLogBodyRequest implements ServiceLogLevelCountRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogTruncatedBodyRequest.java
similarity index 74%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogTruncatedBodyRequest.java
index c4b0049..41a8d85 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/ServiceLogTruncatedBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,22 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LogTruncatedParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogTruncatedRequest;
-import javax.ws.rs.QueryParam;
-
-public class ServiceLogTruncatedRequest extends ServiceLogRequest implements LogTruncatedParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_ID)
+public class ServiceLogTruncatedBodyRequest extends ServiceLogBodyRequest implements ServiceLogTruncatedRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_ID)
private String id;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_SCROLL_TYPE)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_SCROLL_TYPE)
private String scrollType;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_NUMBER_ROWS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_NUMBER_ROWS)
private Integer numberRows;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/TopFieldAuditLogBodyRequest.java
similarity index 73%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/TopFieldAuditLogBodyRequest.java
index 6494822..4826f15 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/TopFieldAuditLogBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,21 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.TopParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.TopFieldAuditLogRequest;
import javax.ws.rs.PathParam;
-import javax.ws.rs.QueryParam;
-public class TopFieldAuditLogRequest extends FieldAuditLogRequest implements TopParamDefinition, UserParamDefinition {
-
- @PathParam(LogSearchConstants.REQUEST_PARAM_TOP)
+public class TopFieldAuditLogBodyRequest extends FieldAuditLogBodyRequest implements TopFieldAuditLogRequest {
+ @JsonIgnore
private Integer top;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/UserExportBodyRequest.java
similarity index 72%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/UserExportBodyRequest.java
index 3eabe79..2a0d82e 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/body/UserExportBodyRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,20 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.body;
+import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.UserExportRequest;
-import javax.ws.rs.QueryParam;
-
-public class UserExportRequest extends FieldAuditLogRequest implements FormatParamDefinition, UserParamDefinition {
-
- @QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
+public class UserExportBodyRequest extends FieldAuditLogBodyRequest implements UserExportRequest {
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_FORMAT)
private String format;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+ @JsonProperty(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditBarGraphQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditBarGraphQueryRequest.java
index f135af5..6cbc54b 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditBarGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditBarGraphQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditBarGraphRequest;
import javax.ws.rs.QueryParam;
-public class AuditBarGraphRequest extends BaseLogRequest implements UnitParamDefinition, UserParamDefinition {
-
+public class AuditBarGraphQueryRequest extends BaseLogQueryRequest implements AuditBarGraphRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditComponentQueryRequest.java
similarity index 79%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditComponentQueryRequest.java
index bae8a13..271ecc4 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditComponentQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.common.Marker;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditComponentRequest;
import javax.ws.rs.QueryParam;
-@Marker
-public class AuditComponentRequest extends BaseLogRequest implements UserParamDefinition {
+public class AuditComponentQueryRequest extends BaseLogQueryRequest implements AuditComponentRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditLogQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditLogQueryRequest.java
index 799add4..a483a27 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditLogRequest;
import javax.ws.rs.QueryParam;
-public class AuditLogRequest extends BaseLogRequest implements LastPageParamDefinition, UserParamDefinition {
+public class AuditLogQueryRequest extends BaseLogQueryRequest implements AuditLogRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_LAST_PAGE)
private boolean isLastPage;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditServiceLoadQueryRequest.java
similarity index 80%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditServiceLoadQueryRequest.java
index 5f91320..5b16905 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/AuditServiceLoadRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/AuditServiceLoadQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.common.Marker;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.AuditServiceLoadRequest;
import javax.ws.rs.QueryParam;
-@Marker
-public class AuditServiceLoadRequest extends BaseLogRequest implements UserParamDefinition {
+public class AuditServiceLoadQueryRequest extends BaseLogQueryRequest implements AuditServiceLoadRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
private String userList;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseLogQueryRequest.java
similarity index 79%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseLogQueryRequest.java
index 5da2e83..41a1071 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,21 +16,19 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.DateRangeParamDefinition;
-import org.apache.ambari.logsearch.model.request.LogParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.BaseLogRequest;
import javax.ws.rs.QueryParam;
-public class BaseLogRequest extends CommonSearchRequest implements LogParamDefinition, DateRangeParamDefinition {
-
+public class BaseLogQueryRequest extends CommonSearchQueryRequest implements BaseLogRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_I_MESSAGE)
- private String iMessage;
+ private String includeMessage;
@QueryParam(LogSearchConstants.REQUEST_PARAM_E_MESSAGE)
- private String eMessage;
+ private String excludeMessage;
@QueryParam(LogSearchConstants.REQUEST_PARAM_MUST_BE)
private String mustBe;
@@ -51,23 +49,23 @@ public class BaseLogRequest extends CommonSearchRequest implements LogParamDefin
private String to;
@Override
- public String getiMessage() {
- return iMessage;
+ public String getIncludeMessage() {
+ return includeMessage;
}
@Override
- public void setiMessage(String iMessage) {
- this.iMessage = iMessage;
+ public void setIncludeMessage(String includeMessage) {
+ this.includeMessage = includeMessage;
}
@Override
- public String geteMessage() {
- return eMessage;
+ public String getExcludeMessage() {
+ return excludeMessage;
}
@Override
- public void seteMessage(String eMessage) {
- this.eMessage = eMessage;
+ public void setExcludeMessage(String excludeMessage) {
+ this.excludeMessage = excludeMessage;
}
@Override
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseServiceLogQueryRequest.java
similarity index 87%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseServiceLogQueryRequest.java
index cbe3d68..976aa0e 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/BaseServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/BaseServiceLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,17 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.BundleIdParamDefinition;
-import org.apache.ambari.logsearch.model.request.ServiceLogParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.BaseServiceLogRequest;
import javax.ws.rs.QueryParam;
-public class BaseServiceLogRequest extends BaseLogRequest
- implements ServiceLogParamDefinition, BundleIdParamDefinition {
-
+public class BaseServiceLogQueryRequest extends BaseLogQueryRequest implements BaseServiceLogRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_LEVEL)
private String level;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/CommonSearchQueryRequest.java
similarity index 91%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/CommonSearchQueryRequest.java
index 738c24e..2c9caf9 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/CommonSearchRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/CommonSearchQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,11 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.CommonSearchParamDefinition;
-import org.apache.ambari.logsearch.model.request.SearchRequest;
+import org.apache.ambari.logsearch.model.request.impl.CommonSearchRequest;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@@ -28,7 +27,7 @@ import javax.annotation.Nullable;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.QueryParam;
-public class CommonSearchRequest implements SearchRequest, CommonSearchParamDefinition {
+public class CommonSearchQueryRequest implements CommonSearchRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_START_INDEX)
private String startIndex;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java
similarity index 85%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java
index 17be988..d943fad 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/EventHistoryRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,14 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.EventHistoryParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.EventHistoryRequest;
import javax.ws.rs.QueryParam;
-public class EventHistoryRequest extends CommonSearchRequest implements EventHistoryParamDefinition {
+public class EventHistoryQueryRequest extends CommonSearchQueryRequest implements EventHistoryRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_FILTER_NAME)
private String filterName;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditBarGraphQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditBarGraphQueryRequest.java
index 7f3e6bf..198e1c6 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditBarGraphQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,22 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.FieldAuditBarGraphRequest;
import javax.ws.rs.QueryParam;
-public class FieldAuditLogRequest extends BaseLogRequest implements FieldParamDefinition, UserParamDefinition {
+public class FieldAuditBarGraphQueryRequest extends AuditBarGraphQueryRequest implements FieldAuditBarGraphRequest {
+ @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
+ private String userList;
@QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
private String field;
- @QueryParam(LogSearchConstants.REQUEST_PARAM_USERS)
- private String userList;
-
@Override
public String getField() {
return field;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditLogQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditLogQueryRequest.java
index 7f3e6bf..be3497d 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/FieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/FieldAuditLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FieldParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.FieldAuditLogRequest;
import javax.ws.rs.QueryParam;
-public class FieldAuditLogRequest extends BaseLogRequest implements FieldParamDefinition, UserParamDefinition {
-
+public class FieldAuditLogQueryRequest extends BaseLogQueryRequest implements FieldAuditLogRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_FIELD)
private String field;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/HostLogFilesQueryRequest.java
similarity index 85%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/HostLogFilesQueryRequest.java
index b2149aa..75d874f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/HostLogFilesRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/HostLogFilesQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,18 +16,16 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
+
+import org.apache.ambari.logsearch.common.LogSearchConstants;
+import org.apache.ambari.logsearch.model.request.impl.HostLogFilesRequest;
import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;
import javax.ws.rs.QueryParam;
-import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.HostComponentParamDefinition;
-import org.apache.ambari.logsearch.model.request.SearchRequest;
-
-public class HostLogFilesRequest implements HostComponentParamDefinition, SearchRequest {
-
+public class HostLogFilesQueryRequest implements HostLogFilesRequest {
@NotNull
@QueryParam(LogSearchConstants.REQUEST_PARAM_HOST_NAME)
private String hostName;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceAnyGraphQueryRequest.java
similarity index 84%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceAnyGraphQueryRequest.java
index 09603e3..5c76c1c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceAnyGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceAnyGraphQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.AnyGraphParamDefinition;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceAnyGraphRequest;
import javax.ws.rs.QueryParam;
-public class ServiceAnyGraphRequest extends ServiceLogRequest
- implements AnyGraphParamDefinition, UnitParamDefinition {
+public class ServiceAnyGraphQueryRequest extends ServiceLogQueryRequest implements ServiceAnyGraphRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_XAXIS)
private String xAxis;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceGraphQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceGraphQueryRequest.java
index 57884b7..5768a77 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceGraphRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceGraphQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.UnitParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceGraphRequest;
import javax.ws.rs.QueryParam;
-public class ServiceGraphRequest extends ServiceLogRequest implements UnitParamDefinition {
-
+public class ServiceGraphQueryRequest extends ServiceLogQueryRequest implements ServiceGraphRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_UNIT)
private String unit;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogAggregatedInfoQueryRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogAggregatedInfoQueryRequest.java
index 7f0805f..9f29da1 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogAggregatedInfoQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogAggregatedInfoRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogAggregatedInfoQueryRequest extends BaseServiceLogQueryRequest implements ServiceLogAggregatedInfoRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentHostQueryRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentHostQueryRequest.java
index 7f0805f..41b2e5b 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentHostQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentHostRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogComponentHostQueryRequest extends ServiceLogQueryRequest implements ServiceLogComponentHostRequest{
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentLevelQueryRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentLevelQueryRequest.java
index 7f0805f..82804eb 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogComponentLevelQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentLevelRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogComponentLevelQueryRequest extends ServiceLogQueryRequest implements ServiceLogComponentLevelRequest{
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogExportQueryRequest.java
similarity index 80%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogExportQueryRequest.java
index 16300ce..6e45369 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogExportQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
-import org.apache.ambari.logsearch.model.request.UtcOffsetParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogExportRequest;
import javax.ws.rs.QueryParam;
-public class ServiceLogExportRequest extends ServiceLogRequest implements FormatParamDefinition, UtcOffsetParamDefinition {
-
+public class ServiceLogExportQueryRequest extends ServiceLogQueryRequest implements ServiceLogExportRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
private String format;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogHostComponentQueryRequest.java
similarity index 79%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogHostComponentQueryRequest.java
index 6242362..529fecd 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogHostComponentRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogHostComponentQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,13 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import io.swagger.annotations.ApiParam;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogHostComponentRequest;
import javax.ws.rs.QueryParam;
-public class ServiceLogHostComponentRequest extends ServiceLogRequest {
+public class ServiceLogHostComponentQueryRequest extends ServiceLogQueryRequest implements ServiceLogHostComponentRequest {
@QueryParam("hostName")
@ApiParam
String hostName;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogLevelCountQueryRequest.java
similarity index 75%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogLevelCountQueryRequest.java
index 7f0805f..a3465cd 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogLevelCountRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogLevelCountQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,10 +16,11 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.Marker;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogLevelCountRequest;
@Marker
-public class ServiceLogLevelCountRequest extends BaseServiceLogRequest {
+public class ServiceLogLevelCountQueryRequest extends BaseServiceLogQueryRequest implements ServiceLogLevelCountRequest {
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogQueryRequest.java
similarity index 85%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogQueryRequest.java
index fe36ad8..08244a7 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LastPageParamDefinition;
-import org.apache.ambari.logsearch.model.request.ServiceLogSearchParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogRequest;
import javax.ws.rs.QueryParam;
-public class ServiceLogRequest extends BaseServiceLogRequest implements ServiceLogSearchParamDefinition, LastPageParamDefinition {
+public class ServiceLogQueryRequest extends BaseServiceLogQueryRequest implements ServiceLogRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_KEYWORD)
private String keyWord;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogTruncatedQueryRequest.java
similarity index 85%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogTruncatedQueryRequest.java
index c4b0049..8b27f53 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/ServiceLogTruncatedRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/ServiceLogTruncatedQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,15 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.LogTruncatedParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.ServiceLogTruncatedRequest;
import javax.ws.rs.QueryParam;
-public class ServiceLogTruncatedRequest extends ServiceLogRequest implements LogTruncatedParamDefinition {
-
+public class ServiceLogTruncatedQueryRequest extends ServiceLogQueryRequest implements ServiceLogTruncatedRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_ID)
private String id;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/TopFieldAuditLogQueryRequest.java
similarity index 81%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/TopFieldAuditLogQueryRequest.java
index 6494822..d6a3c7a 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/TopFieldAuditLogRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/TopFieldAuditLogQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,17 +16,15 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.TopParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.TopFieldAuditLogRequest;
import javax.ws.rs.PathParam;
import javax.ws.rs.QueryParam;
-public class TopFieldAuditLogRequest extends FieldAuditLogRequest implements TopParamDefinition, UserParamDefinition {
-
+public class TopFieldAuditLogQueryRequest extends FieldAuditLogQueryRequest implements TopFieldAuditLogRequest {
@PathParam(LogSearchConstants.REQUEST_PARAM_TOP)
private Integer top;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/UserExportQueryRequest.java
similarity index 80%
copy from ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
copy to ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/UserExportQueryRequest.java
index 3eabe79..f3219f6 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/UserExportRequest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/UserExportQueryRequest.java
@@ -6,9 +6,9 @@
* 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
@@ -16,16 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.ambari.logsearch.model.request.impl;
+package org.apache.ambari.logsearch.model.request.impl.query;
import org.apache.ambari.logsearch.common.LogSearchConstants;
-import org.apache.ambari.logsearch.model.request.FormatParamDefinition;
-import org.apache.ambari.logsearch.model.request.UserParamDefinition;
+import org.apache.ambari.logsearch.model.request.impl.UserExportRequest;
import javax.ws.rs.QueryParam;
-public class UserExportRequest extends FieldAuditLogRequest implements FormatParamDefinition, UserParamDefinition {
-
+public class UserExportQueryRequest extends FieldAuditLogQueryRequest implements UserExportRequest {
@QueryParam(LogSearchConstants.REQUEST_PARAM_FORMAT)
private String format;
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
index 66863c9..7deb24f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/AuditLogsResource.java
@@ -23,11 +23,15 @@ import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import javax.ws.rs.BeanParam;
+import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
+import javax.ws.rs.POST;
import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import freemarker.template.TemplateException;
@@ -36,13 +40,18 @@ import io.swagger.annotations.ApiOperation;
import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.common.StatusMessage;
import org.apache.ambari.logsearch.model.metadata.AuditFieldMetadataResponse;
-import org.apache.ambari.logsearch.model.request.impl.AuditBarGraphRequest;
-import org.apache.ambari.logsearch.model.request.impl.AuditServiceLoadRequest;
-import org.apache.ambari.logsearch.model.request.impl.TopFieldAuditLogRequest;
-import org.apache.ambari.logsearch.model.request.impl.UserExportRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.AuditBarGraphBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.AuditLogBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.AuditServiceLoadBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.TopFieldAuditLogBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.UserExportBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditBarGraphQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditLogQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditServiceLoadQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.TopFieldAuditLogQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.UserExportQueryRequest;
import org.apache.ambari.logsearch.model.response.AuditLogResponse;
import org.apache.ambari.logsearch.model.response.BarGraphDataListResponse;
-import org.apache.ambari.logsearch.model.request.impl.AuditLogRequest;
import org.apache.ambari.logsearch.manager.AuditLogsManager;
import org.springframework.context.annotation.Scope;
@@ -62,29 +71,38 @@ public class AuditLogsResource {
@GET
@Path("/schema/fields")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AUDIT_SCHEMA_FIELD_LIST_OD)
public AuditFieldMetadataResponse getSolrFieldList() {
return auditLogsManager.getAuditLogSchemaMetadata();
}
@GET
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AUDIT_LOGS_OD)
- public AuditLogResponse getAuditLogs(@BeanParam AuditLogRequest auditLogRequest) {
+ public AuditLogResponse getAuditLogsGet(@BeanParam AuditLogQueryRequest auditLogRequest) {
+ return auditLogsManager.getLogs(auditLogRequest);
+ }
+
+ @POST
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_AUDIT_LOGS_OD)
+ public AuditLogResponse getAuditLogsPost(AuditLogBodyRequest auditLogRequest) {
return auditLogsManager.getLogs(auditLogRequest);
}
@DELETE
- @Produces({"application/json"})
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(PURGE_AUDIT_LOGS_OD)
- public StatusMessage deleteAuditLogs(@BeanParam AuditLogRequest auditLogRequest) {
+ public StatusMessage deleteAuditLogs(AuditLogBodyRequest auditLogRequest) {
return auditLogsManager.deleteLogs(auditLogRequest);
}
@GET
@Path("/components")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AUDIT_COMPONENTS_OD)
public Map<String, String> getAuditComponents(@QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES) @Nullable String clusters) {
return auditLogsManager.getAuditComponents(clusters);
@@ -92,39 +110,75 @@ public class AuditLogsResource {
@GET
@Path("/bargraph")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_AUDIT_LINE_GRAPH_DATA_OD)
+ public BarGraphDataListResponse getAuditBarGraphDataGet(@BeanParam AuditBarGraphQueryRequest request) {
+ return auditLogsManager.getAuditBarGraphData(request);
+ }
+
+ @POST
+ @Path("/bargraph")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AUDIT_LINE_GRAPH_DATA_OD)
- public BarGraphDataListResponse getAuditBarGraphData(@BeanParam AuditBarGraphRequest request) {
+ public BarGraphDataListResponse getAuditBarGraphDataPost(AuditBarGraphBodyRequest request) {
return auditLogsManager.getAuditBarGraphData(request);
}
@GET
@Path("/resources/{top}")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_TOP_AUDIT_RESOURCES_OD)
+ public BarGraphDataListResponse getResourcesGet(@BeanParam TopFieldAuditLogQueryRequest request) {
+ return auditLogsManager.topResources(request);
+ }
+
+ @POST
+ @Path("/resources/{top}")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_TOP_AUDIT_RESOURCES_OD)
- public BarGraphDataListResponse getResources(@BeanParam TopFieldAuditLogRequest request) {
+ public BarGraphDataListResponse getResourcesPost(TopFieldAuditLogBodyRequest request, @PathParam(LogSearchConstants.REQUEST_PARAM_TOP) Integer top) {
return auditLogsManager.topResources(request);
}
@GET
@Path("/export")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(EXPORT_USER_TALBE_TO_TEXT_FILE_OD)
+ public Response exportUserTableToTextFileGet(@BeanParam UserExportQueryRequest request) throws TemplateException {
+ return auditLogsManager.export(request);
+ }
+
+ @POST
+ @Path("/export")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(EXPORT_USER_TALBE_TO_TEXT_FILE_OD)
- public Response exportUserTableToTextFile(@BeanParam UserExportRequest request) throws TemplateException {
+ public Response exportUserTableToTextFilePost(UserExportBodyRequest request) throws TemplateException {
return auditLogsManager.export(request);
}
@GET
@Path("/serviceload")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_SERVICE_LOAD_OD)
+ public BarGraphDataListResponse getServiceLoadGet(@BeanParam AuditServiceLoadQueryRequest request) {
+ return auditLogsManager.getServiceLoad(request);
+ }
+
+ @POST
+ @Path("/serviceload")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_SERVICE_LOAD_OD)
- public BarGraphDataListResponse getServiceLoad(@BeanParam AuditServiceLoadRequest request) {
+ public BarGraphDataListResponse getServiceLoadPost(AuditServiceLoadBodyRequest request) {
return auditLogsManager.getServiceLoad(request);
}
@GET
@Path("/clusters")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AUDIT_CLUSTERS_OD)
public List<String> getClustersForAuditLog() {
return auditLogsManager.getClusters();
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java
index aced94c..917a55c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java
@@ -32,7 +32,7 @@ import javax.ws.rs.Produces;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ambari.logsearch.manager.EventHistoryManager;
-import org.apache.ambari.logsearch.model.request.impl.EventHistoryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.EventHistoryQueryRequest;
import org.apache.ambari.logsearch.model.response.EventHistoryData;
import org.apache.ambari.logsearch.model.response.EventHistoryDataListResponse;
import org.springframework.context.annotation.Scope;
@@ -67,7 +67,7 @@ public class EventHistoryResource {
@GET
@Produces({"application/json"})
@ApiOperation(GET_EVENT_HISTORY_DATA_OD)
- public EventHistoryDataListResponse getEventHistory(@BeanParam EventHistoryRequest request) {
+ public EventHistoryDataListResponse getEventHistory(@BeanParam EventHistoryQueryRequest request) {
return eventHistoryManager.getEventHistory(request);
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
index a891671..8196c93 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/ServiceLogsResource.java
@@ -24,11 +24,14 @@ import javax.inject.Named;
import javax.validation.Valid;
import javax.validation.executable.ValidateOnExecution;
import javax.ws.rs.BeanParam;
+import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
+import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import io.swagger.annotations.Api;
@@ -38,17 +41,28 @@ import org.apache.ambari.logsearch.common.LogSearchConstants;
import org.apache.ambari.logsearch.common.StatusMessage;
import org.apache.ambari.logsearch.model.metadata.FieldMetadata;
import org.apache.ambari.logsearch.model.metadata.ServiceComponentMetadataWrapper;
-import org.apache.ambari.logsearch.model.request.impl.HostLogFilesRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceAnyGraphRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceGraphRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogAggregatedInfoRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentHostRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentLevelRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogExportRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogHostComponentRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogLevelCountRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogRequest;
-import org.apache.ambari.logsearch.model.request.impl.ServiceLogTruncatedRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.HostLogFilesBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceAnyGraphBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceGraphBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogAggregatedInfoBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogComponentHostBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogComponentLevelBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogExportBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogHostComponentBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogLevelCountBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.body.ServiceLogTruncatedBodyRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.HostLogFilesQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceAnyGraphQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceGraphQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogAggregatedInfoQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogComponentHostQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogComponentLevelQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogExportQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogHostComponentQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogLevelCountQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogTruncatedQueryRequest;
import org.apache.ambari.logsearch.model.response.BarGraphDataListResponse;
import org.apache.ambari.logsearch.model.response.CountDataListResponse;
import org.apache.ambari.logsearch.model.response.GraphDataListResponse;
@@ -74,22 +88,31 @@ public class ServiceLogsResource {
private ServiceLogsManager serviceLogsManager;
@GET
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(SEARCH_LOGS_OD)
- public ServiceLogResponse searchServiceLogs(@BeanParam ServiceLogRequest request) {
+ public ServiceLogResponse searchServiceLogsGet(@BeanParam ServiceLogQueryRequest request) {
+ return serviceLogsManager.searchLogs(request);
+ }
+
+ @POST
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(SEARCH_LOGS_OD)
+ public ServiceLogResponse searchServiceLogsPost(ServiceLogBodyRequest request) {
return serviceLogsManager.searchLogs(request);
}
@DELETE
- @Produces({"application/json"})
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(PURGE_LOGS_OD)
- public StatusMessage deleteServiceLogs(@BeanParam ServiceLogRequest request) {
+ public StatusMessage deleteServiceLogs(ServiceLogBodyRequest request) {
return serviceLogsManager.deleteLogs(request);
}
@GET
@Path("/hosts")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_HOSTS_OD)
public GroupListResponse getHosts(@QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES) @Nullable String clusters) {
return serviceLogsManager.getHosts(clusters);
@@ -97,7 +120,7 @@ public class ServiceLogsResource {
@GET
@Path("/components")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_COMPONENTS_OD)
public ServiceComponentMetadataWrapper getComponents(@QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES) @Nullable String clusters) {
return serviceLogsManager.getComponentMetadata(clusters);
@@ -105,15 +128,24 @@ public class ServiceLogsResource {
@GET
@Path("/aggregated")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_AGGREGATED_INFO_OD)
+ public GraphDataListResponse getAggregatedInfoGet(@BeanParam ServiceLogAggregatedInfoQueryRequest request) {
+ return serviceLogsManager.getAggregatedInfo(request);
+ }
+
+ @POST
+ @Path("/aggregated")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AGGREGATED_INFO_OD)
- public GraphDataListResponse getAggregatedInfo(@BeanParam ServiceLogAggregatedInfoRequest request) {
+ public GraphDataListResponse getAggregatedInfoPost(ServiceLogAggregatedInfoBodyRequest request) {
return serviceLogsManager.getAggregatedInfo(request);
}
@GET
@Path("/components/count")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_COMPONENTS_COUNT_OD)
public CountDataListResponse getComponentsCount(@QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES) @Nullable String clusters) {
return serviceLogsManager.getComponentsCount(clusters);
@@ -121,7 +153,7 @@ public class ServiceLogsResource {
@GET
@Path("/hosts/count")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_HOSTS_COUNT_OD)
public CountDataListResponse getHostsCount(@QueryParam(LogSearchConstants.REQUEST_PARAM_CLUSTER_NAMES) @Nullable String clusters) {
return serviceLogsManager.getHostsCount(clusters);
@@ -129,55 +161,110 @@ public class ServiceLogsResource {
@GET
@Path("/tree")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_TREE_EXTENSION_OD)
+ public NodeListResponse getTreeExtensionGet(@BeanParam ServiceLogHostComponentQueryRequest request) {
+ return serviceLogsManager.getTreeExtension(request);
+ }
+
+ @POST
+ @Path("/tree")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_TREE_EXTENSION_OD)
- public NodeListResponse getTreeExtension(@BeanParam ServiceLogHostComponentRequest request) {
+ public NodeListResponse getTreeExtensionPost(ServiceLogHostComponentBodyRequest request) {
return serviceLogsManager.getTreeExtension(request);
}
@GET
@Path("/levels/counts")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_LOG_LEVELS_COUNT_OD)
- public NameValueDataListResponse getLogsLevelCount(@BeanParam ServiceLogLevelCountRequest request) {
+ public NameValueDataListResponse getLogsLevelCountGet(@BeanParam ServiceLogLevelCountQueryRequest request) {
+ return serviceLogsManager.getLogsLevelCount(request);
+ }
+
+ @POST
+ @Path("/levels/counts")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_LOG_LEVELS_COUNT_OD)
+ public NameValueDataListResponse getLogsLevelCountPost(ServiceLogLevelCountBodyRequest request) {
return serviceLogsManager.getLogsLevelCount(request);
}
@GET
@Path("/histogram")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_HISTOGRAM_DATA_OD)
+ public BarGraphDataListResponse getHistogramDataGet(@BeanParam ServiceGraphQueryRequest request) {
+ return serviceLogsManager.getHistogramData(request);
+ }
+
+ @POST
+ @Path("/histogram")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_HISTOGRAM_DATA_OD)
- public BarGraphDataListResponse getHistogramData(@BeanParam ServiceGraphRequest request) {
+ public BarGraphDataListResponse getHistogramDataPost(ServiceGraphBodyRequest request) {
return serviceLogsManager.getHistogramData(request);
}
+
@GET
@Path("/export")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(EXPORT_TO_TEXT_FILE_OD)
+ public Response exportToTextFileGet(@BeanParam ServiceLogExportQueryRequest request) {
+ return serviceLogsManager.export(request);
+ }
+
+ @POST
+ @Path("/export")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(EXPORT_TO_TEXT_FILE_OD)
- public Response exportToTextFile(@BeanParam ServiceLogExportRequest request) {
+ public Response exportToTextFilePost(ServiceLogExportBodyRequest request) {
return serviceLogsManager.export(request);
}
@GET
@Path("/hosts/components")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_HOST_LIST_BY_COMPONENT_OD)
+ public NodeListResponse getHostListByComponentGet(@BeanParam ServiceLogComponentHostQueryRequest request) {
+ return serviceLogsManager.getHostListByComponent(request);
+ }
+
+ @POST
+ @Path("/hosts/components")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_HOST_LIST_BY_COMPONENT_OD)
- public NodeListResponse getHostListByComponent(@BeanParam ServiceLogComponentHostRequest request) {
+ public NodeListResponse getHostListByComponentPost(ServiceLogComponentHostBodyRequest request) {
return serviceLogsManager.getHostListByComponent(request);
}
@GET
@Path("/components/levels/counts")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_COMPONENT_LIST_WITH_LEVEL_COUNT_OD)
- public NodeListResponse getComponentListWithLevelCounts(@BeanParam ServiceLogComponentLevelRequest request) {
+ public NodeListResponse getComponentListWithLevelCountsGet(@BeanParam ServiceLogComponentLevelQueryRequest request) {
+ return serviceLogsManager.getComponentListWithLevelCounts(request);
+ }
+
+ @POST
+ @Path("/components/levels/counts")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_COMPONENT_LIST_WITH_LEVEL_COUNT_OD)
+ public NodeListResponse getComponentListWithLevelCountsPost(ServiceLogComponentLevelBodyRequest request) {
return serviceLogsManager.getComponentListWithLevelCounts(request);
}
@GET
@Path("/schema/fields")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_SERVICE_LOGS_SCHEMA_FIELD_NAME_OD)
public List<FieldMetadata> getServiceLogsSchemaFieldsName() {
return serviceLogsManager.getServiceLogsSchemaFieldsName();
@@ -185,23 +272,41 @@ public class ServiceLogsResource {
@GET
@Path("/count/anygraph")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_ANY_GRAPH_COUNT_DATA_OD)
+ public BarGraphDataListResponse getAnyGraphCountDataGet(@BeanParam ServiceAnyGraphQueryRequest request) {
+ return serviceLogsManager.getAnyGraphCountData(request);
+ }
+
+ @POST
+ @Path("/count/anygraph")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_ANY_GRAPH_COUNT_DATA_OD)
- public BarGraphDataListResponse getAnyGraphCountData(@BeanParam ServiceAnyGraphRequest request) {
+ public BarGraphDataListResponse getAnyGraphCountDataPost(ServiceAnyGraphBodyRequest request) {
return serviceLogsManager.getAnyGraphCountData(request);
}
@GET
@Path("/truncated")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_AFTER_BEFORE_LOGS_OD)
+ public ServiceLogResponse getAfterBeforeLogs(@BeanParam ServiceLogTruncatedQueryRequest request) {
+ return serviceLogsManager.getAfterBeforeLogs(request);
+ }
+
+ @POST
+ @Path("/truncated")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_AFTER_BEFORE_LOGS_OD)
- public ServiceLogResponse getAfterBeforeLogs(@BeanParam ServiceLogTruncatedRequest request) {
+ public ServiceLogResponse getAfterBeforeLogs(ServiceLogTruncatedBodyRequest request) {
return serviceLogsManager.getAfterBeforeLogs(request);
}
@GET
@Path("/request/cancel")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(REQUEST_CANCEL)
public String cancelRequest() {
// TODO: create function that cancels an ongoing solr request
@@ -210,16 +315,26 @@ public class ServiceLogsResource {
@GET
@Path("/files")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
+ @ApiOperation(GET_HOST_LOGFILES_OD)
+ @ValidateOnExecution
+ public HostLogFilesResponse getHostLogFiles(@Valid @BeanParam HostLogFilesQueryRequest request) {
+ return serviceLogsManager.getHostLogFileData(request);
+ }
+
+ @POST
+ @Path("/files")
+ @Consumes({MediaType.APPLICATION_JSON})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_HOST_LOGFILES_OD)
@ValidateOnExecution
- public HostLogFilesResponse getHostLogFiles(@Valid @BeanParam HostLogFilesRequest request) {
+ public HostLogFilesResponse getHostLogFiles(@Valid @BeanParam HostLogFilesBodyRequest request) {
return serviceLogsManager.getHostLogFileData(request);
}
@GET
@Path("/clusters")
- @Produces({"application/json"})
+ @Produces({MediaType.APPLICATION_JSON})
@ApiOperation(GET_SERVICE_CLUSTERS_OD)
public List<String> getClustersForServiceLog() {
return serviceLogsManager.getClusters();
diff --git a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/util/DownloadUtil.java b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/util/DownloadUtil.java
index debe131..ef20e38 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/util/DownloadUtil.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/util/DownloadUtil.java
@@ -112,20 +112,20 @@ public class DownloadUtil {
models.put("from", from);
models.put("levels", StringUtils.join(levels, ", "));
models.put("to", to);
- String includeString = request.getiMessage();
+ String includeString = request.getIncludeMessage();
if (StringUtils.isBlank(includeString)) {
includeString = "\"\"";
} else {
- List<String> include = Splitter.on(request.getiMessage()).splitToList(LogSearchConstants.I_E_SEPRATOR);
+ List<String> include = Splitter.on(request.getIncludeMessage()).splitToList(LogSearchConstants.I_E_SEPRATOR);
includeString = "\"" + StringUtils.join(include, "\", \"") + "\"";
}
models.put("iString", includeString);
- String excludeString = request.geteMessage();
+ String excludeString = request.getExcludeMessage();
if (StringUtils.isBlank(excludeString)) {
excludeString = "\"\"";
} else {
- List<String> exclude = Splitter.on(request.getiMessage()).splitToList(LogSearchConstants.I_E_SEPRATOR);
+ List<String> exclude = Splitter.on(request.getIncludeMessage()).splitToList(LogSearchConstants.I_E_SEPRATOR);
excludeString = "\"" + StringUtils.join(exclude, "\", \"") + "\"";
}
models.put("eString", excludeString);
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditBarGraphRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditBarGraphRequestQueryConverterTest.java
index 1ac8b63..ba8ae42 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditBarGraphRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditBarGraphRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.AuditBarGraphRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditBarGraphQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +38,7 @@ public class AuditBarGraphRequestQueryConverterTest extends AbstractRequestConve
@Test
public void testConvert() {
// GIVEN
- AuditBarGraphRequest request = new AuditBarGraphRequest();
+ AuditBarGraphRequest request = new AuditBarGraphQueryRequest();
request.setUserList("joe,steven");
// WHEN
fillBaseLogRequestWithTestData(request);
@@ -53,7 +54,7 @@ public class AuditBarGraphRequestQueryConverterTest extends AbstractRequestConve
@Test
public void testConvertWithoutData() {
// GIVEN
- AuditBarGraphRequest request = new AuditBarGraphRequest();
+ AuditBarGraphRequest request = new AuditBarGraphQueryRequest();
// WHEN
SolrQuery query = underTest.convert(request);
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditComponentRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditComponentRequestQueryConverterTest.java
index 7a1b08d..601829a 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditComponentRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditComponentRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.AuditComponentRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditComponentQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -40,7 +41,7 @@ public class AuditComponentRequestQueryConverterTest extends AbstractRequestConv
@Test
public void testConvert() {
// GIVEN
- AuditComponentRequest request = new AuditComponentRequest();
+ AuditComponentRequest request = new AuditComponentQueryRequest();
fillCommonRequestWithTestData(request);
// WHEN
SimpleFacetQuery facetQuery = underTest.convert(request);
@@ -53,7 +54,7 @@ public class AuditComponentRequestQueryConverterTest extends AbstractRequestConv
@Test
public void testConvertWithoutData() {
// GIVEN
- AuditComponentRequest request = new AuditComponentRequest();
+ AuditComponentRequest request = new AuditComponentQueryRequest();
// WHEN
SimpleFacetQuery facetQuery = underTest.convert(request);
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(facetQuery);
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditLogRequestConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditLogRequestConverterTest.java
index 8e4ed07..b6e83f3 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditLogRequestConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditLogRequestConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.AuditLogRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditLogQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -39,7 +40,7 @@ public class AuditLogRequestConverterTest extends AbstractRequestConverterTest {
@Test
public void testConvert() {
// GIVEN
- AuditLogRequest request = new AuditLogRequest();
+ AuditLogRequest request = new AuditLogQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setUserList("joe,steven");
// WHEN
@@ -54,7 +55,7 @@ public class AuditLogRequestConverterTest extends AbstractRequestConverterTest {
@Test
public void testConvertWithoutData() {
// GIVEN
- AuditLogRequest request = new AuditLogRequest();
+ AuditLogRequest request = new AuditLogQueryRequest();
// WHEN
SimpleQuery simpleQuery = underTest.convert(request);
SolrQuery queryResult = new DefaultQueryParser().doConstructSolrQuery(simpleQuery);
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditServiceLoadRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditServiceLoadRequestQueryConverterTest.java
index cce9115..ae49d3f 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditServiceLoadRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/AuditServiceLoadRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.AuditServiceLoadRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.AuditServiceLoadQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class AuditServiceLoadRequestQueryConverterTest extends AbstractRequestCo
@Test
public void testConvert() {
// GIVEN
- AuditServiceLoadRequest request = new AuditServiceLoadRequest();
+ AuditServiceLoadRequest request = new AuditServiceLoadQueryRequest();
fillBaseLogRequestWithTestData(request);
// WHEN
SolrQuery solrQuery = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
@@ -51,7 +52,7 @@ public class AuditServiceLoadRequestQueryConverterTest extends AbstractRequestCo
@Test
public void testConvertWithoutData() {
// GIVEN
- AuditServiceLoadRequest request = new AuditServiceLoadRequest();
+ AuditServiceLoadRequest request = new AuditServiceLoadQueryRequest();
// WHEN
SolrQuery solrQuery = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverterTest.java
index da7d79c..2da99c6 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/BaseServiceLogRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogQueryRequest;
import org.apache.ambari.logsearch.util.SolrUtil;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
@@ -40,7 +41,7 @@ public class BaseServiceLogRequestQueryConverterTest extends AbstractRequestConv
@Test
public void testConvertRequest() {
// GIVEN
- ServiceLogRequest logRequest = new ServiceLogRequest();
+ ServiceLogRequest logRequest = new ServiceLogQueryRequest();
fillBaseLogRequestWithTestData(logRequest);
logRequest.setLevel("FATAL,ERROR,WARN,UNKNOWN");
logRequest.setFileName("/var/log/myfile-*-hdfs.log");
@@ -62,7 +63,7 @@ public class BaseServiceLogRequestQueryConverterTest extends AbstractRequestConv
@Test
public void testConvertRequestWithoutData() {
// GIVEN
- ServiceLogRequest logRequest = new ServiceLogRequest();
+ ServiceLogRequest logRequest = new ServiceLogQueryRequest();
// WHEN
SimpleQuery query = underTest.convert(logRequest);
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
index 2940a7f..b26ab48 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.EventHistoryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.EventHistoryQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +38,7 @@ public class EventHistoryRequestQueryConverterTest extends AbstractRequestConver
@Test
public void testConvert() {
// GIVEN
- EventHistoryRequest request = new EventHistoryRequest();
+ EventHistoryRequest request = new EventHistoryQueryRequest();
request.setRowType("myRowType"); // TODO: validate these 3 fields @Valid on EventHistoryRequest object -> not null
request.setFilterName("myFilterName");
request.setClusters("cl1,cl2");
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/FieldAuditLogRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/FieldAuditLogRequestQueryConverterTest.java
index 5b83615..6e4f4a5 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/FieldAuditLogRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/FieldAuditLogRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.FieldAuditLogRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.FieldAuditLogQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class FieldAuditLogRequestQueryConverterTest extends AbstractRequestConve
@Test
public void testConvert() {
// GIVEN
- FieldAuditLogRequest request = new FieldAuditLogRequest();
+ FieldAuditLogRequest request = new FieldAuditLogQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setField("myfield");
// WHEN
@@ -53,7 +54,7 @@ public class FieldAuditLogRequestQueryConverterTest extends AbstractRequestConve
@Test(expected = IllegalArgumentException.class) // TODO: later use @Valid on the fields to validate object
public void testConvertWithoutData() {
// GIVEN
- FieldAuditLogRequest request = new FieldAuditLogRequest();
+ FieldAuditLogRequest request = new FieldAuditLogQueryRequest();
// WHEN
new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/HostLogFilesRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/HostLogFilesRequestQueryConverterTest.java
index 60dba44..2818cfb 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/HostLogFilesRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/HostLogFilesRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.HostLogFilesRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.HostLogFilesQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class HostLogFilesRequestQueryConverterTest extends AbstractRequestConver
@Test
public void testConvertHostNameOnly() {
// GIVEN
- HostLogFilesRequest request = new HostLogFilesRequest();
+ HostLogFilesRequest request = new HostLogFilesQueryRequest();
request.setHostName("hostName");
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
@@ -50,7 +51,7 @@ public class HostLogFilesRequestQueryConverterTest extends AbstractRequestConver
@Test
public void testConvertHostNameAndComponentName() {
// GIVEN
- HostLogFilesRequest request = new HostLogFilesRequest();
+ HostLogFilesRequest request = new HostLogFilesQueryRequest();
request.setHostName("hostName");
request.setComponentName("componentName");
// WHEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogAnyGraphRequestConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogAnyGraphRequestConverterTest.java
index 8e96b16..f6f42fe 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogAnyGraphRequestConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogAnyGraphRequestConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceAnyGraphRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceAnyGraphQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class ServiceLogAnyGraphRequestConverterTest extends AbstractRequestConve
@Test
public void testConverter() {
// GIVEN
- ServiceAnyGraphRequest request = new ServiceAnyGraphRequest();
+ ServiceAnyGraphRequest request = new ServiceAnyGraphQueryRequest();
request.setUnit("+1HOUR");
fillBaseLogRequestWithTestData(request);
// WHEN
@@ -53,7 +54,7 @@ public class ServiceLogAnyGraphRequestConverterTest extends AbstractRequestConve
@Test
public void testConverterWithoutData() {
// GIVEN
- ServiceAnyGraphRequest request = new ServiceAnyGraphRequest();
+ ServiceAnyGraphRequest request = new ServiceAnyGraphQueryRequest();
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentLevelRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentLevelRequestQueryConverterTest.java
index 981e239..ed2d3f4 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentLevelRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentLevelRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentLevelRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogComponentLevelQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class ServiceLogComponentLevelRequestQueryConverterTest extends AbstractR
@Test
public void testConverter() {
// GIVEN
- ServiceLogComponentLevelRequest request = new ServiceLogComponentLevelRequest();
+ ServiceLogComponentLevelRequest request = new ServiceLogComponentLevelQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setComponentName("mycomponent");
request.setLevel("WARN,ERROR,FATAL");
@@ -55,7 +56,7 @@ public class ServiceLogComponentLevelRequestQueryConverterTest extends AbstractR
@Test
public void testConverterWithoutData() {
// GIVEN
- ServiceLogComponentLevelRequest request = new ServiceLogComponentLevelRequest();
+ ServiceLogComponentLevelRequest request = new ServiceLogComponentLevelQueryRequest();
request.setLevel("WARN,ERROR,FATAL");
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentRequestFacetQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentRequestFacetQueryConverterTest.java
index b72ffc5..f70a323 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentRequestFacetQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogComponentRequestFacetQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogComponentHostRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogComponentHostQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class ServiceLogComponentRequestFacetQueryConverterTest extends AbstractR
@Test
public void testConverter() {
// GIVEN
- ServiceLogComponentHostRequest request = new ServiceLogComponentHostRequest();
+ ServiceLogComponentHostRequest request = new ServiceLogComponentHostQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setComponentName("mycomponent");
request.setLevel("WARN,ERROR,FATAL");
@@ -55,7 +56,7 @@ public class ServiceLogComponentRequestFacetQueryConverterTest extends AbstractR
@Test
public void testConverterWithoutData() {
// GIVEN
- ServiceLogComponentHostRequest request = new ServiceLogComponentHostRequest();
+ ServiceLogComponentHostRequest request = new ServiceLogComponentHostQueryRequest();
request.setLevel("WARN,ERROR,FATAL");
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelCountRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelCountRequestQueryConverterTest.java
index 69986dc..3feff0c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelCountRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelCountRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogLevelCountRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogLevelCountQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class ServiceLogLevelCountRequestQueryConverterTest extends AbstractReque
@Test
public void testConvert() {
// GIVEN
- ServiceLogLevelCountRequest request = new ServiceLogLevelCountRequest();
+ ServiceLogLevelCountRequest request = new ServiceLogLevelCountQueryRequest();
fillBaseLogRequestWithTestData(request);
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
@@ -52,7 +53,7 @@ public class ServiceLogLevelCountRequestQueryConverterTest extends AbstractReque
@Test
public void testConvertWithoutData() {
// GIVEN
- ServiceLogLevelCountRequest request = new ServiceLogLevelCountRequest();
+ ServiceLogLevelCountRequest request = new ServiceLogLevelCountQueryRequest();
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelDateRangeRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelDateRangeRequestQueryConverterTest.java
index 1987e54..b83363c 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelDateRangeRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogLevelDateRangeRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceGraphRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceGraphQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +38,7 @@ public class ServiceLogLevelDateRangeRequestQueryConverterTest extends AbstractR
@Test
public void testConvert() {
// GIVEN
- ServiceGraphRequest request = new ServiceGraphRequest();
+ ServiceGraphRequest request = new ServiceGraphQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setUnit("+1HOUR");
request.setLevel("WARN,ERROR,FATAL");
@@ -53,7 +54,7 @@ public class ServiceLogLevelDateRangeRequestQueryConverterTest extends AbstractR
@Test
public void testConvertWithoutData() {
// GIVEN
- ServiceGraphRequest request = new ServiceGraphRequest();
+ ServiceGraphRequest request = new ServiceGraphQueryRequest();
request.setUnit("+1HOUR"); // minimal data for date range gap
request.setFrom("2016-09-13T22:00:01.000Z");
request.setTo("2016-09-14T22:00:01.000Z");
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTreeRequestFacetQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTreeRequestFacetQueryConverterTest.java
index 167d7d8..28608b4 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTreeRequestFacetQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTreeRequestFacetQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogHostComponentRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogHostComponentQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +38,7 @@ public class ServiceLogTreeRequestFacetQueryConverterTest extends AbstractReques
@Test
public void testConvert() {
// GIVEN
- ServiceLogHostComponentRequest request = new ServiceLogHostComponentRequest();
+ ServiceLogHostComponentRequest request = new ServiceLogHostComponentQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setLevel("WARN,ERROR,FATAL");
// WHEN
@@ -52,7 +53,7 @@ public class ServiceLogTreeRequestFacetQueryConverterTest extends AbstractReques
@Test
public void testConvertWithoutData() {
// GIVEN
- ServiceLogHostComponentRequest request = new ServiceLogHostComponentRequest();
+ ServiceLogHostComponentRequest request = new ServiceLogHostComponentQueryRequest();
request.setLevel("WARN,ERROR,FATAL");
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTruncatedRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTruncatedRequestQueryConverterTest.java
index 02d3f2e..3aa9d22 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTruncatedRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/ServiceLogTruncatedRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.ServiceLogTruncatedRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.ServiceLogTruncatedQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class ServiceLogTruncatedRequestQueryConverterTest extends AbstractReques
@Test
public void testConvert() {
// GIVEN
- ServiceLogTruncatedRequest request = new ServiceLogTruncatedRequest();
+ ServiceLogTruncatedRequest request = new ServiceLogTruncatedQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setScrollType("0");
request.setNumberRows(10);
@@ -54,7 +55,7 @@ public class ServiceLogTruncatedRequestQueryConverterTest extends AbstractReques
@Test
public void testConvertWithoutData() {
// GIVEN
- ServiceLogTruncatedRequest request = new ServiceLogTruncatedRequest();
+ ServiceLogTruncatedRequest request = new ServiceLogTruncatedQueryRequest();
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/TopFieldAuditLogRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/TopFieldAuditLogRequestQueryConverterTest.java
index 2be9080..f2876e3 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/TopFieldAuditLogRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/TopFieldAuditLogRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.TopFieldAuditLogRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.TopFieldAuditLogQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -38,7 +39,7 @@ public class TopFieldAuditLogRequestQueryConverterTest extends AbstractRequestCo
@Test
public void testConvert() {
// GIVEN
- TopFieldAuditLogRequest request = new TopFieldAuditLogRequest();
+ TopFieldAuditLogRequest request = new TopFieldAuditLogQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setTop(10);
request.setField("myfield");
@@ -54,7 +55,7 @@ public class TopFieldAuditLogRequestQueryConverterTest extends AbstractRequestCo
@Test(expected = IllegalArgumentException.class) // TODO: later use @Valid on the fields to validate object
public void testConvertWithoutData() {
// GIVEN
- TopFieldAuditLogRequest request = new TopFieldAuditLogRequest();
+ TopFieldAuditLogRequest request = new TopFieldAuditLogQueryRequest();
// WHEN
new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
}
diff --git a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/UserExportRequestQueryConverterTest.java b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/UserExportRequestQueryConverterTest.java
index 0ab57ab..f5b6066 100644
--- a/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/UserExportRequestQueryConverterTest.java
+++ b/ambari-logsearch/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/UserExportRequestQueryConverterTest.java
@@ -19,6 +19,7 @@
package org.apache.ambari.logsearch.converter;
import org.apache.ambari.logsearch.model.request.impl.UserExportRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.UserExportQueryRequest;
import org.apache.solr.client.solrj.SolrQuery;
import org.junit.Before;
import org.junit.Test;
@@ -37,7 +38,7 @@ public class UserExportRequestQueryConverterTest extends AbstractRequestConverte
@Test
public void testConverter() {
// GIVEN
- UserExportRequest request = new UserExportRequest();
+ UserExportRequest request = new UserExportQueryRequest();
fillBaseLogRequestWithTestData(request);
request.setFormat("myFormat");
request.setClusters(null);
@@ -53,7 +54,7 @@ public class UserExportRequestQueryConverterTest extends AbstractRequestConverte
@Test
public void testConverterWithoutData() {
// GIVEN
- UserExportRequest request = new UserExportRequest();
+ UserExportRequest request = new UserExportQueryRequest();
// WHEN
SolrQuery query = new DefaultQueryParser().doConstructSolrQuery(underTest.convert(request));
// THEN
diff --git a/ambari-logsearch/ambari-logsearch-web/src/app/services/mock-api-data.service.ts b/ambari-logsearch/ambari-logsearch-web/src/app/services/mock-api-data.service.ts
index c5c437d..b1dc6cf 100644
--- a/ambari-logsearch/ambari-logsearch-web/src/app/services/mock-api-data.service.ts
+++ b/ambari-logsearch/ambari-logsearch-web/src/app/services/mock-api-data.service.ts
@@ -62,7 +62,7 @@ export class MockApiDataService implements InMemoryDbService {
key: 'level',
isValuesList: true
},
- iMessage: {
+ includeMessage: {
key: 'log_message',
filterFunction: this.filterByMessage
},
@@ -88,7 +88,7 @@ export class MockApiDataService implements InMemoryDbService {
key: 'cluster',
isValuesList: true
},
- iMessage: {
+ includeMessage: {
key: 'log_message',
filterFunction: this.filterByMessage
},
--
To stop receiving notification emails like this one, please contact
oleewere@apache.org.