public class ElasticsearchUtils extends Object
Modifier and Type | Field and Description |
---|---|
protected AnyObjectDAO |
anyObjectDAO |
protected GroupDAO |
groupDAO |
protected int |
indexMaxResultWindow |
protected int |
numberOfReplicas |
protected int |
numberOfShards |
protected int |
retryOnConflict |
protected UserDAO |
userDAO |
Constructor and Description |
---|
ElasticsearchUtils() |
Modifier and Type | Method and Description |
---|---|
org.elasticsearch.xcontent.XContentBuilder |
builder(Any<?> any,
String domain)
Returns the builder specialized with content from the provided any.
|
org.elasticsearch.xcontent.XContentBuilder |
builder(long instant,
AuditEntry message,
String domain) |
protected org.elasticsearch.xcontent.XContentBuilder |
customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder,
AnyObject anyObject,
String domain) |
protected org.elasticsearch.xcontent.XContentBuilder |
customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder,
Group group,
String domain) |
protected org.elasticsearch.xcontent.XContentBuilder |
customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder,
long instant,
AuditEntry message,
String domain) |
protected org.elasticsearch.xcontent.XContentBuilder |
customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder,
User user,
String domain) |
static String |
getAnyIndex(String domain,
AnyTypeKind kind) |
static String |
getAuditIndex(String domain) |
int |
getIndexMaxResultWindow() |
int |
getNumberOfReplicas() |
int |
getNumberOfShards() |
int |
getRetryOnConflict() |
void |
setIndexMaxResultWindow(int indexMaxResultWindow) |
void |
setNumberOfReplicas(int numberOfReplicas) |
void |
setNumberOfShards(int numberOfShards) |
void |
setRetryOnConflict(int retryOnConflict) |
@Autowired protected UserDAO userDAO
@Autowired protected GroupDAO groupDAO
@Autowired protected AnyObjectDAO anyObjectDAO
protected int indexMaxResultWindow
protected int retryOnConflict
protected int numberOfShards
protected int numberOfReplicas
public static String getAnyIndex(String domain, AnyTypeKind kind)
public void setIndexMaxResultWindow(int indexMaxResultWindow)
public int getIndexMaxResultWindow()
public void setRetryOnConflict(int retryOnConflict)
public int getRetryOnConflict()
public int getNumberOfShards()
public void setNumberOfShards(int numberOfShards)
public int getNumberOfReplicas()
public void setNumberOfReplicas(int numberOfReplicas)
@Transactional public org.elasticsearch.xcontent.XContentBuilder builder(Any<?> any, String domain) throws IOException
any
- user, group or any object to indexdomain
- tenant informationIOException
- in case of errorsprotected org.elasticsearch.xcontent.XContentBuilder customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder, AnyObject anyObject, String domain) throws IOException
IOException
protected org.elasticsearch.xcontent.XContentBuilder customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder, Group group, String domain) throws IOException
IOException
protected org.elasticsearch.xcontent.XContentBuilder customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder, User user, String domain) throws IOException
IOException
public org.elasticsearch.xcontent.XContentBuilder builder(long instant, AuditEntry message, String domain) throws IOException
IOException
protected org.elasticsearch.xcontent.XContentBuilder customizeBuilder(org.elasticsearch.xcontent.XContentBuilder builder, long instant, AuditEntry message, String domain) throws IOException
IOException
Copyright © 2010–2023 The Apache Software Foundation. All rights reserved.