Class BaseTrashHandlerTestCase

java.lang.Object
com.liferay.trash.test.util.BaseTrashHandlerTestCase

public abstract class BaseTrashHandlerTestCase extends Object
  • Field Details

    • searchTestRule

      public com.liferay.portal.search.test.rule.SearchTestRule searchTestRule
    • baseModel

      protected com.liferay.portal.kernel.model.BaseModel<?> baseModel
    • group

      @DeleteAfterTestRun protected com.liferay.portal.kernel.model.Group group
  • Constructor Details

    • BaseTrashHandlerTestCase

      public BaseTrashHandlerTestCase()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • testDeleteTrashVersions

      public void testDeleteTrashVersions() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrash

      public void testMoveBaseModelToTrash() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashIndexable

      public void testMoveBaseModelToTrashIndexable() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashIndexableAndReindex

      public void testMoveBaseModelToTrashIndexableAndReindex() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashIndexableWithEqualsParentAndBaseModelClass

      public void testMoveBaseModelToTrashIndexableWithEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashIndexableWithEqualsParentAndBaseModelClassAndReindex

      public void testMoveBaseModelToTrashIndexableWithEqualsParentAndBaseModelClassAndReindex() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashIsNotVisible

      public void testMoveBaseModelToTrashIsNotVisible() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashStatusIsInTrash

      public void testMoveBaseModelToTrashStatusIsInTrash() throws Exception
      Throws:
      Exception
    • testMoveBaseModelToTrashUniqueTitleNotChange

      public void testMoveBaseModelToTrashUniqueTitleNotChange() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithApprovedStatus

      public void testTrashAndDeleteWithApprovedStatus() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithApprovedStatusIndexable

      public void testTrashAndDeleteWithApprovedStatusIndexable() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithApprovedStatusIndexableAndEqualsParentAndBaseModelClass

      public void testTrashAndDeleteWithApprovedStatusIndexableAndEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithApprovedStatusIsNotFound

      public void testTrashAndDeleteWithApprovedStatusIsNotFound() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithDraftStatus

      public void testTrashAndDeleteWithDraftStatus() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithDraftStatusIndexable

      public void testTrashAndDeleteWithDraftStatusIndexable() throws Exception
      Throws:
      Exception
    • testTrashAndDeleteWithDraftStatusIsNotFound

      public void testTrashAndDeleteWithDraftStatusIsNotFound() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatus

      public void testTrashAndRestoreWithApprovedStatus() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatusIndexable

      public void testTrashAndRestoreWithApprovedStatusIndexable() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatusIndexableAndEqualsParentAndBaseModelClass

      public void testTrashAndRestoreWithApprovedStatusIndexableAndEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatusIsVisible

      public void testTrashAndRestoreWithApprovedStatusIsVisible() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatusRestoreStatus

      public void testTrashAndRestoreWithApprovedStatusRestoreStatus() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithApprovedStatusRestoreUniqueTitle

      public void testTrashAndRestoreWithApprovedStatusRestoreUniqueTitle() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithDraftStatus

      public void testTrashAndRestoreWithDraftStatus() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithDraftStatusIndexable

      public void testTrashAndRestoreWithDraftStatusIndexable() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithDraftStatusIsNotVisible

      public void testTrashAndRestoreWithDraftStatusIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithDraftStatusRestoreStatus

      public void testTrashAndRestoreWithDraftStatusRestoreStatus() throws Exception
      Throws:
      Exception
    • testTrashAndRestoreWithDraftStatusRestoreUniqueTitle

      public void testTrashAndRestoreWithDraftStatusRestoreUniqueTitle() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndDeleteWithParentIsNotRestorable

      public void testTrashBaseModelAndDeleteWithParentIsNotRestorable() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndDeleteGroupTrashEntries

      public void testTrashBaseModelAndParentAndDeleteGroupTrashEntries() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndDeleteParent

      public void testTrashBaseModelAndParentAndDeleteParent() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndDeleteParentNoMoveableFromTrash

      public void testTrashBaseModelAndParentAndDeleteParentNoMoveableFromTrash() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndRestore

      public void testTrashBaseModelAndParentAndRestore() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndRestoreModel

      public void testTrashBaseModelAndParentAndRestoreModel() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentAndRestoreModelIsVisible

      public void testTrashBaseModelAndParentAndRestoreModelIsVisible() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentIsInContainerBaseModel

      public void testTrashBaseModelAndParentIsInContainerBaseModel() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndParentIsNotVisible

      public void testTrashBaseModelAndParentIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndTrashParentAndDeleteParentIsNotRestorable

      public void testTrashBaseModelAndTrashParentAndDeleteParentIsNotRestorable() throws Exception
      Throws:
      Exception
    • testTrashBaseModelAndTrashParentIsNotRestorable

      public void testTrashBaseModelAndTrashParentIsNotRestorable() throws Exception
      Throws:
      Exception
    • testTrashBaseModelIsInTrashContainer

      public void testTrashBaseModelIsInTrashContainer() throws Exception
      Throws:
      Exception
    • testTrashBaseModelWithParentIsRestorable

      public void testTrashBaseModelWithParentIsRestorable() throws Exception
      Throws:
      Exception
    • testTrashDuplicate

      public void testTrashDuplicate() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModel

      public void testTrashGrandparentBaseModel() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelAndRestoreParentModel

      public void testTrashGrandparentBaseModelAndRestoreParentModel() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelAndRestoreParentModelIsNotInTrashContainer

      public void testTrashGrandparentBaseModelAndRestoreParentModelIsNotInTrashContainer() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelAndRestoreParentModelIsVisible

      public void testTrashGrandparentBaseModelAndRestoreParentModelIsVisible() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelAndRestoreParentModelIsVisibleParent

      public void testTrashGrandparentBaseModelAndRestoreParentModelIsVisibleParent() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelIsNotVisible

      public void testTrashGrandparentBaseModelIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashGrandparentBaseModelIsNotVisibleParent

      public void testTrashGrandparentBaseModelIsNotVisibleParent() throws Exception
      Throws:
      Exception
    • testTrashIsRestorableBaseModel

      public void testTrashIsRestorableBaseModel() throws Exception
      Throws:
      Exception
    • testTrashMyBaseModel

      public void testTrashMyBaseModel() throws Exception
      Throws:
      Exception
    • testTrashParent

      public void testTrashParent() throws Exception
      Throws:
      Exception
    • testTrashParentAndBaseModel

      public void testTrashParentAndBaseModel() throws Exception
      Throws:
      Exception
    • testTrashParentAndDeleteGroupTrashEntries

      public void testTrashParentAndDeleteGroupTrashEntries() throws Exception
      Throws:
      Exception
    • testTrashParentAndDeleteParent

      public void testTrashParentAndDeleteParent() throws Exception
      Throws:
      Exception
    • testTrashParentAndRestoreBaseModelIsVisible

      public void testTrashParentAndRestoreBaseModelIsVisible() throws Exception
      Throws:
      Exception
    • testTrashParentAndRestoreIndexable

      public void testTrashParentAndRestoreIndexable() throws Exception
      Throws:
      Exception
    • testTrashParentAndRestoreParentAndBaseModel

      public void testTrashParentAndRestoreParentAndBaseModel() throws Exception
      Throws:
      Exception
    • testTrashParentIndexable

      public void testTrashParentIndexable() throws Exception
      Throws:
      Exception
    • testTrashParentIndexableAndReindex

      public void testTrashParentIndexableAndReindex() throws Exception
      Throws:
      Exception
    • testTrashParentIsNotVisible

      public void testTrashParentIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashParentWithBaseModelIsInTrashContainer

      public void testTrashParentWithBaseModelIsInTrashContainer() throws Exception
      Throws:
      Exception
    • testTrashParentWithBaseModelIsIsNotVisible

      public void testTrashParentWithBaseModelIsIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashRecentBaseModel

      public void testTrashRecentBaseModel() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModel

      public void testTrashVersionBaseModel() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndDelete

      public void testTrashVersionBaseModelAndDelete() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndDeleteIndexable

      public void testTrashVersionBaseModelAndDeleteIndexable() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndDeleteIndexableWithEqualsParentAndBaseModelClass

      public void testTrashVersionBaseModelAndDeleteIndexableWithEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndDeleteIsNotFound

      public void testTrashVersionBaseModelAndDeleteIsNotFound() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndRestore

      public void testTrashVersionBaseModelAndRestore() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndRestoreIndexable

      public void testTrashVersionBaseModelAndRestoreIndexable() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndRestoreIndexableWithEqualsParentAndBaseModelClass

      public void testTrashVersionBaseModelAndRestoreIndexableWithEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelAndRestoreIsVisible

      public void testTrashVersionBaseModelAndRestoreIsVisible() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelIndexable

      public void testTrashVersionBaseModelIndexable() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelIndexableAndReindex

      public void testTrashVersionBaseModelIndexableAndReindex() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelIndexableWithEqualsParentAndBaseModelClass

      public void testTrashVersionBaseModelIndexableWithEqualsParentAndBaseModelClass() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelIndexableWithEqualsParentAndBaseModelClassAndReindex

      public void testTrashVersionBaseModelIndexableWithEqualsParentAndBaseModelClassAndReindex() throws Exception
      Throws:
      Exception
    • testTrashVersionBaseModelIsNotVisible

      public void testTrashVersionBaseModelIsNotVisible() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModel

      public void testTrashVersionParentBaseModel() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelAndCustomRestore

      public void testTrashVersionParentBaseModelAndCustomRestore() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelAndRestore

      public void testTrashVersionParentBaseModelAndRestore() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelAndRestoreIsNotInTrashContainer

      public void testTrashVersionParentBaseModelAndRestoreIsNotInTrashContainer() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelAndRestoreIsVisible

      public void testTrashVersionParentBaseModelAndRestoreIsVisible() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelIndexable

      public void testTrashVersionParentBaseModelIndexable() throws Exception
      Throws:
      Exception
    • testTrashVersionParentBaseModelIsNotVisible

      public void testTrashVersionParentBaseModelIsNotVisible() throws Exception
      Throws:
      Exception
    • addBaseModel

      protected com.liferay.portal.kernel.model.BaseModel<?> addBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, 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, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
      Throws:
      Exception
    • addBaseModelWithWorkflow

      protected com.liferay.portal.kernel.model.BaseModel<?> addBaseModelWithWorkflow(com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
      Throws:
      Exception
    • addDraftBaseModel

      protected com.liferay.portal.kernel.model.BaseModel<?> addDraftBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws Exception
      Throws:
      Exception
    • deleteParentBaseModel

      protected void deleteParentBaseModel(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel, boolean includeTrashedEntries) throws Exception
      Throws:
      Exception
    • getAssetClassPK

      protected Long getAssetClassPK(com.liferay.portal.kernel.model.ClassedModel classedModel)
    • getBaseModel

      protected abstract com.liferay.portal.kernel.model.BaseModel<?> getBaseModel(long primaryKey) throws Exception
      Throws:
      Exception
    • getBaseModelClass

      protected abstract Class<?> getBaseModelClass()
    • getBaseModelClassName

      protected String getBaseModelClassName()
    • getDeletionSystemEventCount

      protected long getDeletionSystemEventCount(com.liferay.portal.kernel.trash.TrashHandler trashHandler, long systemEventSetKey) throws Exception
      Throws:
      Exception
    • getNotInTrashBaseModelsCount

      protected abstract int getNotInTrashBaseModelsCount(com.liferay.portal.kernel.model.BaseModel<?> parentBaseModel) throws Exception
      Throws:
      Exception
    • getParentBaseModel

      protected com.liferay.portal.kernel.model.BaseModel<?> getParentBaseModel(com.liferay.portal.kernel.model.Group group, long parentBaseModelId, 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
    • getTrashEntriesCount

      protected int getTrashEntriesCount(long groupId) throws Exception
      Throws:
      Exception
    • getTrashEntryClassPK

      protected long getTrashEntryClassPK(com.liferay.portal.kernel.model.ClassedModel classedModel)
    • getTrashHandler

      protected com.liferay.portal.kernel.trash.TrashHandler getTrashHandler(String className)
    • getUniqueTitle

      protected abstract String getUniqueTitle(com.liferay.portal.kernel.model.BaseModel<?> baseModel)
    • getWorkflowedModel

      protected com.liferay.portal.kernel.model.WorkflowedModel getWorkflowedModel(com.liferay.portal.kernel.model.ClassedModel baseModel) throws Exception
      Throws:
      Exception
    • isBaseModelContainerModel

      protected boolean isBaseModelContainerModel()
    • isInTrashContainer

      protected boolean isInTrashContainer(com.liferay.portal.kernel.model.ClassedModel classedModel) throws Exception
      Throws:
      Exception
    • isInTrashContainer

      protected abstract boolean isInTrashContainer(com.liferay.portal.kernel.model.TrashedModel trashedModel)
    • isValidTrashTitle

      protected boolean isValidTrashTitle(String title)
    • moveBaseModelToTrash

      protected abstract void moveBaseModelToTrash(long primaryKey) throws Exception
      Throws:
      Exception
    • reindex

      protected void reindex(com.liferay.portal.kernel.model.ClassedModel classedModel) throws Exception
      Throws:
      Exception