Class BaseSearchTestCase
java.lang.Object
com.liferay.portal.search.test.util.BaseSearchTestCase
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.liferay.portal.kernel.model.BaseModel<?>protected static final booleanprotected com.liferay.portal.kernel.model.Group -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAttachment(com.liferay.portal.kernel.model.ClassedModel classedModel) protected com.liferay.portal.kernel.model.BaseModel<?>addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected com.liferay.portal.kernel.model.BaseModel<?>addBaseModelWithDDMStructure(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected abstract com.liferay.portal.kernel.model.BaseModel<?>addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected com.liferay.portal.kernel.model.BaseModel<?>addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, Map<Locale, String> keywordsMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected voidaddComment(com.liferay.portal.kernel.model.ClassedModel classedModel, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected voidassertBaseModelsCount(int expectedCount, com.liferay.portal.kernel.search.SearchContext searchContext) protected voidassertBaseModelsCount(int expectedCount, String keywords, com.liferay.portal.kernel.search.SearchContext searchContext) protected voidassertGroupEntriesCount(long expectedCount) protected voidassertGroupEntriesCount(long expectedCount, long userId) protected voidassertGroupEntriesCount(long expectedCount, com.liferay.portal.kernel.model.User user) protected voiddeleteBaseModel(long primaryKey) protected voiddeleteBaseModel(com.liferay.portal.kernel.model.BaseModel<?> baseModel) protected voidexpireBaseModelVersions(com.liferay.portal.kernel.model.BaseModel<?> baseModel, boolean expireAllVersions, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected abstract Class<?>protected Stringprotected LonggetBaseModelClassPK(com.liferay.portal.kernel.model.ClassedModel classedModel) protected Stringprotected com.liferay.portal.kernel.model.BaseModel<?>getParentBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected com.liferay.portal.kernel.model.BaseModel<?>getParentBaseModel(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected Stringprotected abstract Stringprotected booleanprotected booleanprotected voidmoveBaseModelToTrash(long primaryKey) protected voidmoveParentBaseModelToTrash(long primaryKey) protected voidprotected voidprotected voidsearchBaseModel(int initialBaseModelsSearchCount) protected com.liferay.portal.kernel.search.HitssearchBaseModelsCount(com.liferay.portal.kernel.search.SearchContext searchContext) protected com.liferay.portal.kernel.search.HitssearchBaseModelsCount(Class<?> clazz, long groupId, com.liferay.portal.kernel.search.SearchContext searchContext) protected voidprotected voidsearchBaseModelWithDelete(int initialBaseModelsSearchCount) protected voidprotected voidsearchBaseModelWithTrash(int initialBaseModelsSearchCount) protected voidprotected voidprotected voidprotected voidprotected voidprotected voidsearchComments(boolean searchByKeywords) protected voidsearchExpireVersions(boolean expireAllVersions) protected com.liferay.portal.kernel.search.HitssearchGroupEntries(long groupId, long userId) protected voidprotected voidprotected voidprotected voidprotected voidvoidsetUp()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprotected voidtestUserPermissions(boolean addBaseModelPermission, boolean addParentBaseModelPermission) protected com.liferay.portal.kernel.model.BaseModel<?>updateBaseModel(com.liferay.portal.kernel.model.BaseModel<?> baseModel, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected voidupdateDDMStructure(com.liferay.portal.kernel.service.ServiceContext serviceContext)
-
Field Details
-
searchTestRule
-
CHECK_BASE_MODEL_PERMISSION
protected static final boolean CHECK_BASE_MODEL_PERMISSION- See Also:
-
baseModel
protected com.liferay.portal.kernel.model.BaseModel<?> baseModel -
group
@DeleteAfterTestRun protected com.liferay.portal.kernel.model.Group group
-
-
Constructor Details
-
BaseSearchTestCase
public BaseSearchTestCase()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testBaseModelUserPermissions
- Throws:
Exception
-
testLocalizedSearch
- Throws:
Exception
-
testParentBaseModelUserPermissions
- Throws:
Exception
-
testSearchAttachments
- Throws:
Exception
-
testSearchBaseModel
- Throws:
Exception
-
testSearchBaseModelWithDelete
- Throws:
Exception
-
testSearchBaseModelWithTrash
- Throws:
Exception
-
testSearchBaseModelWithUpdate
- Throws:
Exception
-
testSearchByDDMStructureField
- Throws:
Exception
-
testSearchByKeywords
- Throws:
Exception
-
testSearchByKeywordsInsideParentBaseModel
- Throws:
Exception
-
testSearchComments
- Throws:
Exception
-
testSearchCommentsByKeywords
- Throws:
Exception
-
testSearchExpireAllVersions
- Throws:
Exception
-
testSearchExpireLatestVersion
- Throws:
Exception
-
testSearchMixedPhraseKeywords
- Throws:
Exception
-
testSearchMyEntries
- Throws:
Exception
-
testSearchRecentEntries
- Throws:
Exception
-
testSearchStatus
- Throws:
Exception
-
testSearchVersions
- Throws:
Exception
-
testSearchWithinDDMStructure
- Throws:
Exception
-
addAttachment
protected void addAttachment(com.liferay.portal.kernel.model.ClassedModel classedModel) throws Exception - Throws:
Exception
-
addBaseModel
protected com.liferay.portal.kernel.model.BaseModel<?> addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
addBaseModelWithDDMStructure
protected com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithDDMStructure(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
addBaseModelWithWorkflow
protected com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, Map<Locale, String> keywordsMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception- Throws:
Exception
-
addBaseModelWithWorkflow
protected abstract com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithWorkflow(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean approved, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
addComment
protected void addComment(com.liferay.portal.kernel.model.ClassedModel classedModel, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
assertBaseModelsCount
protected void assertBaseModelsCount(int expectedCount, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception - Throws:
Exception
-
assertBaseModelsCount
protected void assertBaseModelsCount(int expectedCount, String keywords, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception - Throws:
Exception
-
assertGroupEntriesCount
- Throws:
Exception
-
assertGroupEntriesCount
- Throws:
Exception
-
assertGroupEntriesCount
protected void assertGroupEntriesCount(long expectedCount, com.liferay.portal.kernel.model.User user) throws Exception - Throws:
Exception
-
deleteBaseModel
protected void deleteBaseModel(com.liferay.portal.kernel.model.BaseModel<?> baseModel) throws Exception - Throws:
Exception
-
deleteBaseModel
- Throws:
Exception
-
expireBaseModelVersions
protected void expireBaseModelVersions(com.liferay.portal.kernel.model.BaseModel<?> baseModel, boolean expireAllVersions, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getBaseModelClass
-
getBaseModelClassName
-
getBaseModelClassPK
-
getDDMStructureFieldName
-
getParentBaseModel
protected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getParentBaseModel
protected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
getParentBaseModelClassName
-
getSearchKeywords
-
isCheckBaseModelPermission
protected boolean isCheckBaseModelPermission() -
isExpirableAllVersions
protected boolean isExpirableAllVersions() -
moveBaseModelToTrash
- Throws:
Exception
-
moveParentBaseModelToTrash
- Throws:
Exception
-
searchAttachments
- Throws:
Exception
-
searchBaseModel
- Throws:
Exception
-
searchBaseModel
- Throws:
Exception
-
searchBaseModelsCount
protected com.liferay.portal.kernel.search.Hits searchBaseModelsCount(Class<?> clazz, long groupId, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception - Throws:
Exception
-
searchBaseModelsCount
protected com.liferay.portal.kernel.search.Hits searchBaseModelsCount(com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception - Throws:
Exception
-
searchBaseModelWithDelete
- Throws:
Exception
-
searchBaseModelWithDelete
- Throws:
Exception
-
searchBaseModelWithTrash
- Throws:
Exception
-
searchBaseModelWithTrash
- Throws:
Exception
-
searchBaseModelWithUpdate
- Throws:
Exception
-
searchByDDMStructureField
- Throws:
Exception
-
searchByKeywords
- Throws:
Exception
-
searchByKeywordsInsideParentBaseModel
- Throws:
Exception
-
searchByMixedPhraseKeywords
- Throws:
Exception
-
searchComments
- Throws:
Exception
-
searchExpireVersions
- Throws:
Exception
-
searchGroupEntries
protected com.liferay.portal.kernel.search.Hits searchGroupEntries(long groupId, long userId) throws Exception - Throws:
Exception
-
searchMyEntries
- Throws:
Exception
-
searchRecentEntries
- Throws:
Exception
-
searchStatus
- Throws:
Exception
-
searchVersions
- Throws:
Exception
-
searchWithinDDMStructure
- Throws:
Exception
-
testUserPermissions
protected void testUserPermissions(boolean addBaseModelPermission, boolean addParentBaseModelPermission) throws Exception - Throws:
Exception
-
updateBaseModel
protected com.liferay.portal.kernel.model.BaseModel<?> updateBaseModel(com.liferay.portal.kernel.model.BaseModel<?> baseModel, String keywords, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-
updateDDMStructure
protected void updateDDMStructure(com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception - Throws:
Exception
-