|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.dao.support.DaoSupport
org.springframework.jdbc.core.support.JdbcDaoSupport
com.jivesoftware.community.search.BaseIndexInfoProvider
public abstract class BaseIndexInfoProvider
Base class that captures the most common implementation of IndexInfoProvider and offers subclasses a very easy way to implement IndexInfoProvider. Basically you just need to return 4 SQL statements and a description on how to index your content object.
If you need a complex implementation of IndexInfoProvider and this absrtaction is not enough for you then you can still go ahead and create your class that implements IndexInfoProvider.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
protected TagManager |
tagManager
|
protected static SearchTypeProviderUtil |
util
|
| Fields inherited from class org.springframework.dao.support.DaoSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
BaseIndexInfoProvider()
|
|
| Method Summary | |
|---|---|
boolean |
getCanViewObject(JiveObject jiveObject)
Returns true if the current user can view this JiveObject in Jive SBS or not. |
boolean |
getCanViewType()
Returns true if the current user can view this type in Jive SBS or not. |
IndexInfo |
getContent(long id)
Returns the indexable content for a given ID |
List<IndexInfo> |
getContent(long minID,
long maxID,
Date minDate,
Date maxDate)
Returns a list of IDs where minID <= ID <= maxID and create/publish date was after min date |
long |
getCount(Date max)
Returns the count of objects that were created before the given max date. |
protected abstract String |
getCountSQL()
Returns the SQL that calculates how many objects were modified after a given date. |
List<EntityDescriptor> |
getIDs(long minID,
long maxID,
Date minDate,
Date maxDate)
Returns a list of IDs where minID <= ID <= maxID and create/publish date was after min date |
protected abstract String |
getIDsSQL()
Returns the SQL that returns the ID of the objects that were modified within a date rante and whose IDs are also within a given range. |
protected abstract Map<IndexField,String> |
getIndexFields(long id)
Returns a map that describes how to index a given object so that it can be searchable. |
protected abstract String |
getLanguage(long id)
Returns the language that determines the org.apache.lucene.analysis.Analyzer to
use by Lucene. |
long |
getMaxID(Date max)
Returns the highest id for a give object type that was created before the given max date. |
protected abstract String |
getMaxIDSQL()
Returns the SQL that calculates the biggest ID of the objects modified after a given date. |
long |
getMinID(Date min)
Returns the smallest id for a give object type that was created after the given min date. |
protected abstract String |
getMinIDSQL()
Returns the SQL that calculates the smallest ID of the objects modified after a given date. |
protected abstract int |
getObjectTypeID()
Returns the ID that identifies the object type. |
void |
setTagManager(TagManager tagManager)
|
| Methods inherited from class org.springframework.jdbc.core.support.JdbcDaoSupport |
|---|
checkDaoConfig, createJdbcTemplate, getConnection, getDataSource, getExceptionTranslator, getJdbcTemplate, initTemplateConfig, releaseConnection, setDataSource, setJdbcTemplate |
| Methods inherited from class org.springframework.dao.support.DaoSupport |
|---|
afterPropertiesSet, initDao |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jivesoftware.community.search.IndexInfoProvider |
|---|
isIndexable |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
protected static final SearchTypeProviderUtil util
protected TagManager tagManager
| Constructor Detail |
|---|
public BaseIndexInfoProvider()
| Method Detail |
|---|
protected abstract int getObjectTypeID()
com.jivesoftware.community.objecttype.JiveObjectType#getID().
protected abstract String getCountSQL()
protected abstract String getMaxIDSQL()
protected abstract String getMinIDSQL()
protected abstract String getIDsSQL()
protected abstract Map<IndexField,String> getIndexFields(long id)
IndexField and the associated value based
on the specified object.
id - the ID of the object that is being indexed.
protected abstract String getLanguage(long id)
org.apache.lucene.analysis.Analyzer to
use by Lucene. Valid languages are the ones defined by
com.jivesoftware.community.LanguageConfiguration#getAllowedLanguages().
id - the ID of the object that is being indexed.
public void setTagManager(TagManager tagManager)
public long getCount(Date max)
IndexInfoProvider
getCount in interface IndexInfoProvidermax - date before which the content was created
public long getMaxID(Date max)
IndexInfoProvider
getMaxID in interface IndexInfoProvidermax - date before which the content was created
public long getMinID(Date min)
IndexInfoProvider
getMinID in interface IndexInfoProvidermin - date after which the content was created
public List<IndexInfo> getContent(long minID,
long maxID,
Date minDate,
Date maxDate)
IndexInfoProvider
getContent in interface IndexInfoProviderminID - lower bound on the IDmaxID - upper bound on the IDminDate - date before which the document was publishedmaxDate - latest date for which the document was published
public List<EntityDescriptor> getIDs(long minID,
long maxID,
Date minDate,
Date maxDate)
IndexInfoProvider
getIDs in interface IndexInfoProviderminID - lower bound on the IDmaxID - upper bound on the IDminDate - date before which the document was publishedmaxDate - latest date for which the document was published
public IndexInfo getContent(long id)
IndexInfoProvider
getContent in interface IndexInfoProviderid - content id
public boolean getCanViewType()
IndexInfoProvider
getCanViewType in interface IndexInfoProviderpublic boolean getCanViewObject(JiveObject jiveObject)
IndexInfoProvider
getCanViewObject in interface IndexInfoProviderjiveObject - to determine visibility of
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||