public abstract class BaseSearchTestCase
extends Object
Modifier and Type | Field and Description |
---|---|
protected com.liferay.portal.kernel.model.BaseModel<?> |
baseModel |
protected boolean |
CHECK_BASE_MODEL_PERMISSION |
protected com.liferay.portal.kernel.model.Group |
group |
Constructor and Description |
---|
BaseSearchTestCase() |
Modifier and Type | Method and Description |
---|---|
protected 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 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 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 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(com.liferay.portal.kernel.model.BaseModel<?> baseModel) |
protected void |
deleteBaseModel(long primaryKey) |
protected void |
expireBaseModelVersions(com.liferay.portal.kernel.model.BaseModel<?> baseModel,
boolean expireAllVersions,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
protected abstract Class<?> |
getBaseModelClass() |
protected String |
getBaseModelClassName() |
protected Long |
getBaseModelClassPK(com.liferay.portal.kernel.model.ClassedModel classedModel) |
protected String |
getDDMStructureFieldName() |
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 |
getParentBaseModelClassName() |
protected abstract String |
getSearchKeywords() |
protected boolean |
isCheckBaseModelPermission() |
protected boolean |
isExpirableAllVersions() |
protected void |
moveBaseModelToTrash(long primaryKey) |
protected void |
moveParentBaseModelToTrash(long primaryKey) |
protected void |
searchAttachments() |
protected void |
searchBaseModel() |
protected void |
searchBaseModel(int initialBaseModelsSearchCount) |
protected com.liferay.portal.kernel.search.Hits |
searchBaseModelsCount(Class<?> clazz,
long groupId,
com.liferay.portal.kernel.search.SearchContext searchContext) |
protected com.liferay.portal.kernel.search.Hits |
searchBaseModelsCount(com.liferay.portal.kernel.search.SearchContext searchContext) |
protected void |
searchBaseModelWithDelete() |
protected void |
searchBaseModelWithDelete(int initialBaseModelsSearchCount) |
protected void |
searchBaseModelWithTrash() |
protected void |
searchBaseModelWithTrash(int initialBaseModelsSearchCount) |
protected void |
searchBaseModelWithUpdate() |
protected void |
searchByDDMStructureField() |
protected void |
searchByKeywords() |
protected void |
searchByKeywordsInsideParentBaseModel() |
protected void |
searchByMixedPhraseKeywords() |
protected void |
searchComments() |
protected void |
searchExpireVersions(boolean expireAllVersions) |
protected com.liferay.portal.kernel.search.Hits |
searchGroupEntries(long groupId,
long userId) |
protected void |
searchMyEntries() |
protected void |
searchRecentEntries() |
protected void |
searchStatus() |
protected void |
searchVersions() |
protected void |
searchWithinDDMStructure() |
void |
setUp() |
void |
testBaseModelUserPermissions() |
void |
testLocalizedSearch() |
void |
testParentBaseModelUserPermissions() |
void |
testSearchAttachments() |
void |
testSearchBaseModel() |
void |
testSearchBaseModelWithDelete() |
void |
testSearchBaseModelWithTrash() |
void |
testSearchBaseModelWithUpdate() |
void |
testSearchByDDMStructureField() |
void |
testSearchByKeywords() |
void |
testSearchByKeywordsInsideParentBaseModel() |
void |
testSearchComments() |
void |
testSearchExpireAllVersions() |
void |
testSearchExpireLatestVersion() |
void |
testSearchMixedPhraseKeywords() |
void |
testSearchMyEntries() |
void |
testSearchRecentEntries() |
void |
testSearchStatus() |
void |
testSearchVersions() |
void |
testSearchWithinDDMStructure() |
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) |
protected final boolean CHECK_BASE_MODEL_PERMISSION
protected com.liferay.portal.kernel.model.BaseModel<?> baseModel
@DeleteAfterTestRun protected com.liferay.portal.kernel.model.Group group
public void setUp() throws Exception
Exception
public void testBaseModelUserPermissions() throws Exception
Exception
public void testLocalizedSearch() throws Exception
Exception
public void testParentBaseModelUserPermissions() throws Exception
Exception
public void testSearchAttachments() throws Exception
Exception
public void testSearchBaseModel() throws Exception
Exception
public void testSearchBaseModelWithDelete() throws Exception
Exception
public void testSearchBaseModelWithTrash() throws Exception
Exception
public void testSearchBaseModelWithUpdate() throws Exception
Exception
public void testSearchByDDMStructureField() throws Exception
Exception
public void testSearchByKeywords() throws Exception
Exception
public void testSearchByKeywordsInsideParentBaseModel() throws Exception
Exception
public void testSearchComments() throws Exception
Exception
public void testSearchExpireAllVersions() throws Exception
Exception
public void testSearchExpireLatestVersion() throws Exception
Exception
public void testSearchMixedPhraseKeywords() throws Exception
Exception
public void testSearchMyEntries() throws Exception
Exception
public void testSearchRecentEntries() throws Exception
Exception
public void testSearchStatus() throws Exception
Exception
public void testSearchVersions() throws Exception
Exception
public void testSearchWithinDDMStructure() throws Exception
Exception
protected void addAttachment(com.liferay.portal.kernel.model.ClassedModel classedModel) throws Exception
Exception
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
Exception
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
Exception
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
Exception
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
Exception
protected void addComment(com.liferay.portal.kernel.model.ClassedModel classedModel, String body, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
Exception
protected void assertBaseModelsCount(int expectedCount, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception
Exception
protected void assertBaseModelsCount(int expectedCount, String keywords, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception
Exception
protected void assertGroupEntriesCount(long expectedCount) throws Exception
Exception
protected void assertGroupEntriesCount(long expectedCount, long userId) throws Exception
Exception
protected void assertGroupEntriesCount(long expectedCount, com.liferay.portal.kernel.model.User user) throws Exception
Exception
protected void deleteBaseModel(com.liferay.portal.kernel.model.BaseModel<?> baseModel) throws Exception
Exception
protected void deleteBaseModel(long primaryKey) throws Exception
Exception
protected void expireBaseModelVersions(com.liferay.portal.kernel.model.BaseModel<?> baseModel, boolean expireAllVersions, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
Exception
protected abstract Class<?> getBaseModelClass()
protected String getBaseModelClassName()
protected Long getBaseModelClassPK(com.liferay.portal.kernel.model.ClassedModel classedModel)
protected String getDDMStructureFieldName()
protected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
Exception
protected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.Group group, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
Exception
protected String getParentBaseModelClassName()
protected abstract String getSearchKeywords()
protected boolean isCheckBaseModelPermission()
protected boolean isExpirableAllVersions()
protected void moveBaseModelToTrash(long primaryKey) throws Exception
Exception
protected void moveParentBaseModelToTrash(long primaryKey) throws Exception
Exception
protected void searchAttachments() throws Exception
Exception
protected void searchBaseModel() throws Exception
Exception
protected void searchBaseModel(int initialBaseModelsSearchCount) throws Exception
Exception
protected com.liferay.portal.kernel.search.Hits searchBaseModelsCount(Class<?> clazz, long groupId, com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception
Exception
protected com.liferay.portal.kernel.search.Hits searchBaseModelsCount(com.liferay.portal.kernel.search.SearchContext searchContext) throws Exception
Exception
protected void searchBaseModelWithDelete() throws Exception
Exception
protected void searchBaseModelWithDelete(int initialBaseModelsSearchCount) throws Exception
Exception
protected void searchBaseModelWithTrash() throws Exception
Exception
protected void searchBaseModelWithTrash(int initialBaseModelsSearchCount) throws Exception
Exception
protected void searchBaseModelWithUpdate() throws Exception
Exception
protected void searchByDDMStructureField() throws Exception
Exception
protected void searchByKeywords() throws Exception
Exception
protected void searchByKeywordsInsideParentBaseModel() throws Exception
Exception
protected void searchByMixedPhraseKeywords() throws Exception
Exception
protected void searchComments() throws Exception
Exception
protected void searchExpireVersions(boolean expireAllVersions) throws Exception
Exception
protected com.liferay.portal.kernel.search.Hits searchGroupEntries(long groupId, long userId) throws Exception
Exception
protected void searchMyEntries() throws Exception
Exception
protected void searchRecentEntries() throws Exception
Exception
protected void searchStatus() throws Exception
Exception
protected void searchVersions() throws Exception
Exception
protected void searchWithinDDMStructure() throws Exception
Exception
protected void testUserPermissions(boolean addBaseModelPermission, boolean addParentBaseModelPermission) throws Exception
Exception
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
Exception
protected void updateDDMStructure(com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
Exception