View Javadoc
1   /* 
2   * Copyright (C) 2003-2015 eXo Platform SAS.
3   *
4   * This program is free software: you can redistribute it and/or modify
5   * it under the terms of the GNU Lesser General Public License as published by
6   * the Free Software Foundation, either version 3 of the License, or
7   * (at your option) any later version.
8   *
9   * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see http://www.gnu.org/licenses/ .
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   * Created by The eXo Platform SAS
26   * Author : Thibault Clement
27   * tclement@exoplatform.com
28   * 12/4/15
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