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 boolean
protected com.liferay.portal.kernel.model.Group
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAttachment
(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 void
addComment
(com.liferay.portal.kernel.model.ClassedModel classedModel, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected void
assertBaseModelsCount
(int expectedCount, com.liferay.portal.kernel.search.SearchContext searchContext) protected void
assertBaseModelsCount
(int expectedCount, String keywords, com.liferay.portal.kernel.search.SearchContext searchContext) protected void
assertGroupEntriesCount
(long expectedCount) protected void
assertGroupEntriesCount
(long expectedCount, long userId) protected void
assertGroupEntriesCount
(long expectedCount, com.liferay.portal.kernel.model.User user) protected void
deleteBaseModel
(long primaryKey) protected void
deleteBaseModel
(com.liferay.portal.kernel.model.BaseModel<?> baseModel) protected void
expireBaseModelVersions
(com.liferay.portal.kernel.model.BaseModel<?> baseModel, boolean expireAllVersions, com.liferay.portal.kernel.service.ServiceContext serviceContext) protected abstract Class<?>
protected String
protected Long
getBaseModelClassPK
(com.liferay.portal.kernel.model.ClassedModel classedModel) protected String
protected 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 String
protected abstract String
protected boolean
protected boolean
protected void
moveBaseModelToTrash
(long primaryKey) protected void
moveParentBaseModelToTrash
(long primaryKey) protected void
protected void
protected void
searchBaseModel
(int initialBaseModelsSearchCount) protected com.liferay.portal.kernel.search.Hits
searchBaseModelsCount
(com.liferay.portal.kernel.search.SearchContext searchContext) protected com.liferay.portal.kernel.search.Hits
searchBaseModelsCount
(Class<?> clazz, long groupId, com.liferay.portal.kernel.search.SearchContext searchContext) protected void
protected void
searchBaseModelWithDelete
(int initialBaseModelsSearchCount) protected void
protected void
searchBaseModelWithTrash
(int initialBaseModelsSearchCount) protected void
protected void
protected void
protected void
protected void
protected void
searchComments
(boolean searchByKeywords) protected void
searchExpireVersions
(boolean expireAllVersions) protected com.liferay.portal.kernel.search.Hits
searchGroupEntries
(long groupId, long userId) protected void
protected void
protected void
protected void
protected void
void
setUp()
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
protected void
testUserPermissions
(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 void
updateDDMStructure
(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
-