com.liferay.portlet.journal.util
Class JournalArticleIndexer
java.lang.Object
com.liferay.portal.kernel.search.BaseIndexer
com.liferay.portlet.journal.util.JournalArticleIndexer
- All Implemented Interfaces:
- Indexer
public class JournalArticleIndexer
- extends BaseIndexer
Method Summary |
protected void |
addDDMStructureAttributes(Document document,
JournalArticle article)
|
protected void |
addSearchLocalizedTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
|
protected void |
addStatus(BooleanQuery contextQuery,
SearchContext searchContext)
|
protected void |
doDelete(Object obj)
|
protected Document |
doGetDocument(Object obj)
|
protected String |
doGetSortField(String orderByCol)
|
protected Summary |
doGetSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
|
void |
doReindex(JournalArticle article,
boolean allVersions)
|
protected void |
doReindex(Object obj)
|
protected void |
doReindex(String[] ids)
|
protected void |
doReindex(String className,
long classPK)
|
protected void |
doReindexDDMStructures(List<Long> ddmStructureIds)
|
protected String |
extractBasicContent(JournalArticle article,
String languageId)
|
protected String |
extractContent(JournalArticle article,
String languageId)
|
protected String |
extractDDMContent(JournalArticle article,
String languageId)
|
protected JournalArticle |
fetchLatestIndexableArticleVersion(long resourcePrimKey)
|
protected Collection<Document> |
getArticleVersions(JournalArticle article)
|
protected String |
getBasicContentSummary(Document document,
Locale snippetLocale)
|
String[] |
getClassNames()
|
protected String |
getDDMContentSummary(Document document,
Locale snippetLocale)
|
protected String[] |
getLanguageIds(String defaultLanguageId,
String content)
|
String |
getPortletId()
|
protected String |
getPortletId(SearchContext searchContext)
|
boolean |
hasPermission(PermissionChecker permissionChecker,
String entryClassName,
long entryClassPK,
String actionId)
|
protected boolean |
isHead(JournalArticle article)
|
protected boolean |
isHeadListable(JournalArticle article)
|
boolean |
isVisible(long classPK,
int status)
|
void |
postProcessContextQuery(BooleanQuery contextQuery,
SearchContext searchContext)
|
void |
postProcessSearchQuery(BooleanQuery searchQuery,
SearchContext searchContext)
|
protected void |
reindexArticles(long companyId)
|
protected void |
reindexArticleVersions(JournalArticle article)
|
Methods inherited from class com.liferay.portal.kernel.search.BaseIndexer |
addAssetFields, addLocalizedSearchTerm, addRelatedClassNames, addRelatedEntryFields, addSearchArrayQuery, addSearchAssetCategoryIds, addSearchAssetCategoryTitles, addSearchAssetTagNames, addSearchClassTypeIds, addSearchDDMStruture, addSearchEntryClassNames, addSearchExpando, addSearchFolderId, addSearchGroupId, addSearchKeywords, addSearchLayout, addSearchTerm, addSearchUserId, addStagingGroupKeyword, addTrashFields, createFullQuery, createLocalizedSummary, createLocalizedSummary, createSummary, createSummary, delete, delete, deleteDocument, deleteDocument, deleteDocument, deleteDocument, doSearch, filterSearch, getBaseModelDocument, getBaseModelDocument, getClassName, getDocument, getFacetQuery, getFullQuery, getIndexerPostProcessors, getLocalizedCountryNames, getParentGroupId, getSearchEngineId, getSiteGroupId, getSnippetLocale, getSortField, getSortField, getSummary, isCommitImmediately, isFilterSearch, isIndexerEnabled, isPermissionAware, isStagingAware, isUseSearchResultPermissionFilter, isVisible, isVisibleRelatedEntry, newDocument, populateAddresses, populateMap, postProcessFullQuery, processHits, registerIndexerPostProcessor, reindex, reindex, reindex, reindexDDMStructures, search, setCommitImmediately, setFilterSearch, setIndexerEnabled, setPermissionAware, setSortableTextFields, setStagingAware, unregisterIndexerPostProcessor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_NAMES
public static final String[] CLASS_NAMES
JOURNAL_ARTICLE_INDEX_ALL_VERSIONS
public static boolean JOURNAL_ARTICLE_INDEX_ALL_VERSIONS
PORTLET_ID
public static final String PORTLET_ID
- See Also:
- Constant Field Values
JournalArticleIndexer
public JournalArticleIndexer()
getClassNames
public String[] getClassNames()
getPortletId
public String getPortletId()
hasPermission
public boolean hasPermission(PermissionChecker permissionChecker,
String entryClassName,
long entryClassPK,
String actionId)
throws Exception
- Specified by:
hasPermission
in interface Indexer
- Overrides:
hasPermission
in class BaseIndexer
- Throws:
Exception
isVisible
public boolean isVisible(long classPK,
int status)
throws Exception
- Specified by:
isVisible
in interface Indexer
- Overrides:
isVisible
in class BaseIndexer
- Throws:
Exception
postProcessContextQuery
public void postProcessContextQuery(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Specified by:
postProcessContextQuery
in interface Indexer
- Overrides:
postProcessContextQuery
in class BaseIndexer
- Throws:
Exception
postProcessSearchQuery
public void postProcessSearchQuery(BooleanQuery searchQuery,
SearchContext searchContext)
throws Exception
- Specified by:
postProcessSearchQuery
in interface Indexer
- Overrides:
postProcessSearchQuery
in class BaseIndexer
- Throws:
Exception
addDDMStructureAttributes
protected void addDDMStructureAttributes(Document document,
JournalArticle article)
throws Exception
- Throws:
Exception
addSearchLocalizedTerm
protected void addSearchLocalizedTerm(BooleanQuery searchQuery,
SearchContext searchContext,
String field,
boolean like)
throws Exception
- Overrides:
addSearchLocalizedTerm
in class BaseIndexer
- Throws:
Exception
addStatus
protected void addStatus(BooleanQuery contextQuery,
SearchContext searchContext)
throws Exception
- Overrides:
addStatus
in class BaseIndexer
- Throws:
Exception
doDelete
protected void doDelete(Object obj)
throws Exception
- Specified by:
doDelete
in class BaseIndexer
- Throws:
Exception
doGetDocument
protected Document doGetDocument(Object obj)
throws Exception
- Specified by:
doGetDocument
in class BaseIndexer
- Throws:
Exception
doGetSortField
protected String doGetSortField(String orderByCol)
- Overrides:
doGetSortField
in class BaseIndexer
doGetSummary
protected Summary doGetSummary(Document document,
Locale locale,
String snippet,
PortletURL portletURL)
- Specified by:
doGetSummary
in class BaseIndexer
doReindex
public void doReindex(JournalArticle article,
boolean allVersions)
throws Exception
- Throws:
Exception
doReindex
protected void doReindex(Object obj)
throws Exception
- Specified by:
doReindex
in class BaseIndexer
- Throws:
Exception
doReindex
protected void doReindex(String className,
long classPK)
throws Exception
- Specified by:
doReindex
in class BaseIndexer
- Throws:
Exception
doReindex
protected void doReindex(String[] ids)
throws Exception
- Specified by:
doReindex
in class BaseIndexer
- Throws:
Exception
doReindexDDMStructures
protected void doReindexDDMStructures(List<Long> ddmStructureIds)
throws Exception
- Overrides:
doReindexDDMStructures
in class BaseIndexer
- Throws:
Exception
extractBasicContent
protected String extractBasicContent(JournalArticle article,
String languageId)
extractContent
protected String extractContent(JournalArticle article,
String languageId)
throws Exception
- Throws:
Exception
extractDDMContent
protected String extractDDMContent(JournalArticle article,
String languageId)
throws Exception
- Throws:
Exception
fetchLatestIndexableArticleVersion
protected JournalArticle fetchLatestIndexableArticleVersion(long resourcePrimKey)
throws SystemException
- Throws:
SystemException
getArticleVersions
protected Collection<Document> getArticleVersions(JournalArticle article)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
getBasicContentSummary
protected String getBasicContentSummary(Document document,
Locale snippetLocale)
getDDMContentSummary
protected String getDDMContentSummary(Document document,
Locale snippetLocale)
getLanguageIds
protected String[] getLanguageIds(String defaultLanguageId,
String content)
getPortletId
protected String getPortletId(SearchContext searchContext)
- Specified by:
getPortletId
in class BaseIndexer
isHead
protected boolean isHead(JournalArticle article)
throws SystemException
- Throws:
SystemException
isHeadListable
protected boolean isHeadListable(JournalArticle article)
throws SystemException
- Throws:
SystemException
reindexArticles
protected void reindexArticles(long companyId)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException
reindexArticleVersions
protected void reindexArticleVersions(JournalArticle article)
throws PortalException,
SystemException
- Throws:
PortalException
SystemException