Package org.sakaiproject.search.model
Interface SearchBuilderItem
-
public interface SearchBuilderItemRepresents an operation or state of a document in the search engine. This Object is used as a communication and persistance mechanism between the changes made to entities and the thread processing the index updates- Author:
- ieb
-
-
Field Summary
Fields Modifier and Type Field Description static IntegerACTION_ADDAction ADD the record to the search engine, if the doc ID is set, then remove first, if not set, check its not there.static IntegerACTION_DELETEAction DELETE the record from the search engine, once complete delete the recordstatic IntegerACTION_REBUILDThe action REBUILD causes the indexer thread to rebuild the index from scratch, re-fetching all entities This should only ever appear on the master recordstatic IntegerACTION_REFRESHThe action REFRESH causes the indexer thread to refresh the search index from the current set of entities.static IntegerACTION_UNKNOWNAction Unknown, usually because the record has just been createdstatic String[]actionsstatic StringGLOBAL_CONTEXTstatic StringGLOBAL_MASTERstatic StringINDEX_MASTERA master record is used to override the indexer thread operation and avoid hide updates to the database in the request cycle.static IntegerITEMstatic IntegerITEM_GLOBAL_MASTERstatic IntegerITEM_SITE_MASTERstatic String[]scopestatic StringSITE_MASTER_FORMATstatic StringSITE_MASTER_PATTERNstatic IntegerSTATE_COMPLETEDOperation completedstatic IntegerSTATE_FAILEDstatic IntegerSTATE_LOCKEDLocked for processingstatic IntegerSTATE_PENDINGOperation pendingstatic IntegerSTATE_PENDING_2static IntegerSTATE_UNKNOWNUnknown statestatic String[]states
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetContext()The context of the index itemStringgetId()IntegergetItemscope()intgetLock()The lock id on this objectStringgetName()Name of the resource in the search indexIntegergetSearchaction()The action being performedIntegergetSearchstate()The state of the recordDategetVersion()The last update to the recordvoidinput(DataInputStream dataInputStream)booleanisLocked()voidoutput(DataOutputStream dataOutputStream)voidsetContext(String context)The context of the index itemvoidsetId(String id)voidsetItemscope(Integer itemscope)voidsetName(String name)The name of the resource in the search indexvoidsetSearchaction(Integer searchaction)The action being performedvoidsetSearchstate(Integer searchstate)The state of the recordvoidsetVersion(Date version)The last update to the record
-
-
-
Field Detail
-
INDEX_MASTER
static final String INDEX_MASTER
A master record is used to override the indexer thread operation and avoid hide updates to the database in the request cycle.- See Also:
- Constant Field Values
-
ACTION_UNKNOWN
static final Integer ACTION_UNKNOWN
Action Unknown, usually because the record has just been created
-
ACTION_ADD
static final Integer ACTION_ADD
Action ADD the record to the search engine, if the doc ID is set, then remove first, if not set, check its not there.
-
ACTION_DELETE
static final Integer ACTION_DELETE
Action DELETE the record from the search engine, once complete delete the record
-
ACTION_REBUILD
static final Integer ACTION_REBUILD
The action REBUILD causes the indexer thread to rebuild the index from scratch, re-fetching all entities This should only ever appear on the master record
-
ACTION_REFRESH
static final Integer ACTION_REFRESH
The action REFRESH causes the indexer thread to refresh the search index from the current set of entities. If a Rebuild is in progress, the refresh will not override the rebuild
-
STATE_UNKNOWN
static final Integer STATE_UNKNOWN
Unknown state
-
STATE_PENDING
static final Integer STATE_PENDING
Operation pending
-
STATE_COMPLETED
static final Integer STATE_COMPLETED
Operation completed
-
STATE_PENDING_2
static final Integer STATE_PENDING_2
-
STATE_LOCKED
static final Integer STATE_LOCKED
Locked for processing
-
STATE_FAILED
static final Integer STATE_FAILED
-
ITEM
static final Integer ITEM
-
ITEM_GLOBAL_MASTER
static final Integer ITEM_GLOBAL_MASTER
-
ITEM_SITE_MASTER
static final Integer ITEM_SITE_MASTER
-
GLOBAL_CONTEXT
static final String GLOBAL_CONTEXT
- See Also:
- Constant Field Values
-
GLOBAL_MASTER
static final String GLOBAL_MASTER
- See Also:
- Constant Field Values
-
SITE_MASTER_FORMAT
static final String SITE_MASTER_FORMAT
- See Also:
- Constant Field Values
-
SITE_MASTER_PATTERN
static final String SITE_MASTER_PATTERN
- See Also:
- Constant Field Values
-
states
static final String[] states
-
actions
static final String[] actions
-
scope
static final String[] scope
-
-
Method Detail
-
getId
String getId()
-
setId
void setId(String id)
-
getName
String getName()
Name of the resource in the search index- Returns:
-
setName
void setName(String name)
The name of the resource in the search index- Parameters:
name-
-
getSearchaction
Integer getSearchaction()
The action being performed- Returns:
-
setSearchaction
void setSearchaction(Integer searchaction)
The action being performed- Parameters:
searchaction-
-
getSearchstate
Integer getSearchstate()
The state of the record- Returns:
-
setSearchstate
void setSearchstate(Integer searchstate)
The state of the record- Parameters:
searchstate-
-
getVersion
Date getVersion()
The last update to the record- Returns:
-
setVersion
void setVersion(Date version)
The last update to the record- Parameters:
version-
-
getContext
String getContext()
The context of the index item- Returns:
-
setContext
void setContext(String context)
The context of the index item- Parameters:
context-
-
getItemscope
Integer getItemscope()
- Returns:
- the itemscope
-
setItemscope
void setItemscope(Integer itemscope)
- Parameters:
itemscope- the itemscope to set
-
output
void output(DataOutputStream dataOutputStream) throws IOException
- Parameters:
dataOutputStream-- Throws:
IOException
-
input
void input(DataInputStream dataInputStream) throws IOException
- Parameters:
dataInputStream-- Throws:
IOException
-
getLock
int getLock()
The lock id on this object- Returns:
-
isLocked
boolean isLocked()
- Returns:
-
-