1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.commons.search.rest.resource;
18
19 import io.swagger.annotations.ApiModel;
20 import io.swagger.annotations.ApiModelProperty;
21
22 import java.io.Serializable;
23
24
25
26
27
28
29
30 @ApiModel(value="An Indexing Operation Resource")
31 public class OperationResource implements Serializable {
32
33 private String entityType;
34 private String entityId;
35 private String operation;
36
37 public OperationResource() {
38 }
39
40 public OperationResource(String entityType, String entityId, String operation) {
41 this.entityType = entityType;
42 this.entityId = entityId;
43 this.operation = operation;
44 }
45
46 @ApiModelProperty(value = "The Entity Type")
47 public String getEntityType() {
48 return entityType;
49 }
50
51 public void setEntityType(String entityType) {
52 this.entityType = entityType;
53 }
54
55 @ApiModelProperty(value = "The Entity Id", notes = "Mandatory if the operation is index/reindex/unindex")
56 public String getEntityId() {
57 return entityId;
58 }
59
60 public void setEntityId(String entityId) {
61 this.entityId = entityId;
62 }
63
64 @ApiModelProperty(value = "The Indexing operation", allowableValues = "init,index,reindex,unindex,reindexAll,unindexAll")
65 public String getOperation() {
66 return operation;
67 }
68
69 public void setOperation(String operation) {
70 this.operation = operation;
71 }
72 }
73