@Path(value="product/{dsName}")
public final class IndexResource
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private com.google.common.eventbus.EventBus |
eventBus |
private IndexTaskService |
indexService |
Constructor and Description |
---|
IndexResource(IndexTaskService indexService) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createIndex(java.lang.String dsName,
GUID shopGuid,
UpdateSearch entity) |
javax.ws.rs.core.Response |
createIndex(java.lang.String dsName,
UpdateSearch entity) |
javax.ws.rs.core.Response |
deleteIndexContents(java.lang.String dsName,
GUID shopGuid,
UpdateSearch entity)
Deletes contents of a search index
|
javax.ws.rs.core.Response |
dropIndex(java.lang.String dsName,
GUID shopGuid)
Drops a search index
|
void |
setEventBus(com.google.common.eventbus.EventBus eventBus) |
javax.ws.rs.core.Response |
updateIndexContents(java.lang.String dsName,
GUID shopGuid,
UpdateSearch entity)
Updates contents of a search index
|
private final IndexTaskService indexService
private com.google.common.eventbus.EventBus eventBus
@Inject public IndexResource(IndexTaskService indexService)
@Inject public void setEventBus(com.google.common.eventbus.EventBus eventBus)
@POST @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response createIndex(@PathParam(value="dsName") java.lang.String dsName, UpdateSearch entity)
@POST @Path(value="{shopGuid}") @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response createIndex(@PathParam(value="dsName") java.lang.String dsName, @PathParam(value="shopGuid") GUID shopGuid, UpdateSearch entity)
@DELETE @Path(value="{shopGuid}") @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response dropIndex(@PathParam(value="dsName") java.lang.String dsName, @PathParam(value="shopGuid") GUID shopGuid)
dsName
- is the datasource name. (i.e. epages6 Storename)shopGuid
- GUID identifier of shop@POST @Path(value="{shopGuid}/update") @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response updateIndexContents(@PathParam(value="dsName") java.lang.String dsName, @PathParam(value="shopGuid") GUID shopGuid, UpdateSearch entity)
dsName
- is the datasource name. (i.e. epages6 Storename)shopGuid
- is the GUID identifier of a shop.entity
- contains additional index information, e.g. replication token,
list of resources to update.@POST @Path(value="{shopGuid}/delete") @Consumes(value={"application/json","application/xml"}) @Produces(value={"application/json","application/xml"}) public javax.ws.rs.core.Response deleteIndexContents(@PathParam(value="dsName") java.lang.String dsName, @PathParam(value="shopGuid") GUID shopGuid, UpdateSearch entity)
dsName
- is the datasource name. (i.e. epages6 Storename)shopGuid
- is the GUID identifier of a shop.entity
- contains additional index information, e.g. replication token,
list of resources to delete