com.liferay.portlet.trash.test
Class BaseTrashHandlerTestCase
java.lang.Object
com.liferay.portlet.trash.test.BaseTrashHandlerTestCase
public abstract class BaseTrashHandlerTestCase
- extends Object
|
Method Summary |
protected BaseModel<?> |
addBaseModel(BaseModel<?> parentBaseModel,
boolean approved,
ServiceContext serviceContext)
|
protected abstract BaseModel<?> |
addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
ServiceContext serviceContext)
|
protected BaseModel<?> |
addBaseModelWithWorkflow(boolean approved,
ServiceContext serviceContext)
|
protected void |
deleteParentBaseModel(BaseModel<?> parentBaseModel,
boolean includeTrashedEntries)
|
protected BaseModel<?> |
expireBaseModel(BaseModel<?> baseModel,
ServiceContext serviceContext)
|
protected AssetEntry |
fetchAssetEntry(Class<?> clazz,
long classPK)
|
protected AssetEntry |
fetchAssetEntry(ClassedModel classedModel)
|
protected Long |
getAssetClassPK(ClassedModel classedModel)
|
protected abstract BaseModel<?> |
getBaseModel(long primaryKey)
|
protected abstract Class<?> |
getBaseModelClass()
|
protected String |
getBaseModelClassName()
|
protected String |
getBaseModelName(ClassedModel classedModel)
|
protected List<? extends WorkflowedModel> |
getChildrenWorkflowedModels(BaseModel<?> parentBaseModel)
|
protected long |
getDeletionSystemEventCount(TrashHandler trashHandler,
long systemEventSetKey)
|
protected int |
getMineBaseModelsCount(long groupId,
long userId)
|
protected abstract int |
getNotInTrashBaseModelsCount(BaseModel<?> parentBaseModel)
|
protected BaseModel<?> |
getParentBaseModel(Group group,
long parentBaseModelId,
ServiceContext serviceContext)
|
protected BaseModel<?> |
getParentBaseModel(Group group,
ServiceContext serviceContext)
|
protected Class<?> |
getParentBaseModelClass()
|
protected String |
getParentBaseModelClassName()
|
protected int |
getRecentBaseModelsCount(long groupId)
|
protected abstract String |
getSearchKeywords()
|
protected int |
getTrashEntriesCount(long groupId)
|
protected long |
getTrashEntryClassPK(ClassedModel classedModel)
|
protected abstract String |
getUniqueTitle(BaseModel<?> baseModel)
|
protected WorkflowedModel |
getWorkflowedModel(ClassedModel baseModel)
|
protected boolean |
isAssetableModel()
|
protected boolean |
isAssetableParentModel()
|
protected boolean |
isAssetEntryVisible(ClassedModel classedModel)
|
protected boolean |
isBaseModelContainerModel()
|
protected boolean |
isBaseModelMoveableFromTrash()
|
protected boolean |
isBaseModelTrashName(ClassedModel classedModel)
|
protected boolean |
isInTrashContainer(ClassedModel classedModel)
|
protected BaseModel<?> |
moveBaseModelFromTrash(ClassedModel classedModel,
Group group,
ServiceContext serviceContext)
|
protected abstract void |
moveBaseModelToTrash(long primaryKey)
|
protected void |
moveParentBaseModelToTrash(long primaryKey)
|
protected void |
restoreParentBaseModelFromTrash(long primaryKey)
|
protected int |
searchBaseModelsCount(Class<?> clazz,
long groupId)
|
protected int |
searchTrashEntriesCount(String keywords,
ServiceContext serviceContext)
|
void |
setUp()
|
void |
testAddBaseModelWithApprovedStatus()
|
void |
testAddBaseModelWithApprovedStatusAndIndexable()
|
void |
testAddBaseModelWithApprovedStatusIsVisible()
|
void |
testAddBaseModelWithDraftStatus()
|
void |
testAddBaseModelWithDraftStatusIndexable()
|
void |
testAddBaseModelWithDraftStatusIsNotVisible()
|
void |
testAddVersionBaseModel()
|
void |
testAddVersionBaseModelIndexable()
|
void |
testAddVersionBaseModelIsVisible()
|
void |
testDeleteTrashVersions()
|
void |
testMoveBaseModelToTrash()
|
void |
testMoveBaseModelToTrashIndexable()
|
void |
testMoveBaseModelToTrashIsNotVisible()
|
void |
testMoveBaseModelToTrashStatusIsInTrash()
|
void |
testMoveBaseModelToTrashUniqueTitleNotChange()
|
void |
testTrashAndDeleteWithApprovedStatus()
|
void |
testTrashAndDeleteWithApprovedStatusIndexable()
|
void |
testTrashAndDeleteWithDraftStatus()
|
void |
testTrashAndDeleteWithDraftStatusIndexable()
|
void |
testTrashAndRestoreWithApprovedStatus()
|
void |
testTrashAndRestoreWithApprovedStatusIndexable()
|
void |
testTrashAndRestoreWithApprovedStatusIsVisible()
|
void |
testTrashAndRestoreWithApprovedStatusRestoreStatus()
|
void |
testTrashAndRestoreWithApprovedStatusRestoreUniqueTitle()
|
void |
testTrashAndRestoreWithDraftStatus()
|
void |
testTrashAndRestoreWithDraftStatusIndexable()
|
void |
testTrashAndRestoreWithDraftStatusIsNotVisible()
|
void |
testTrashAndRestoreWithDraftStatusRestoreStatus()
|
void |
testTrashAndRestoreWithDraftStatusRestoreUniqueTitle()
|
void |
testTrashBaseModelAndDeleteWithParentIsNotRestorable()
|
void |
testTrashBaseModelAndParent()
|
void |
testTrashBaseModelAndParentAndDeleteGroupTrashEntries()
|
void |
testTrashBaseModelAndParentAndDeleteParent()
|
void |
testTrashBaseModelAndParentAndRestoreModel()
|
void |
testTrashBaseModelAndParentAndRestoreModelIsVisible()
|
void |
testTrashBaseModelAndParentIsNotVisible()
|
void |
testTrashBaseModelAndTrashParentAndDeleteParentIsNotRestorable()
|
void |
testTrashBaseModelAndTrashParentIsNotRestorable()
|
void |
testTrashBaseModelWithParentIsRestorable()
|
void |
testTrashDuplicate()
|
void |
testTrashGrandparentBaseModel()
|
void |
testTrashGrandparentBaseModelAndRestoreParentModel()
|
void |
testTrashIsRestorableBaseModel()
|
void |
testTrashMoveBaseModel()
|
void |
testTrashMoveBaseModelIndexable()
|
void |
testTrashMyBaseModel()
|
void |
testTrashParent()
|
void |
testTrashParentAndDeleteGroupTrashEntries()
|
void |
testTrashParentAndDeleteParent()
|
void |
testTrashRecentBaseModel()
|
void |
testTrashVersionBaseModel()
|
void |
testTrashVersionBaseModelAndDelete()
|
void |
testTrashVersionBaseModelAndDeleteIndexable()
|
void |
testTrashVersionBaseModelAndRestore()
|
void |
testTrashVersionBaseModelAndRestoreIndexable()
|
void |
testTrashVersionBaseModelAndRestoreIsVisible()
|
void |
testTrashVersionBaseModelIndexable()
|
void |
testTrashVersionBaseModelIsNotVisible()
|
void |
testTrashVersionParentBaseModel()
|
void |
testTrashVersionParentBaseModelAndRestore()
|
void |
testTrashVersionParentBaseModelIndexable()
|
void |
testTrashVersionParentBaseModelIsNotVisible()
|
protected BaseModel<?> |
updateBaseModel(long primaryKey,
ServiceContext serviceContext)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
baseModel
protected BaseModel<?> baseModel
group
@DeleteAfterTestRun
protected Group group
BaseTrashHandlerTestCase
public BaseTrashHandlerTestCase()
setUp
public void setUp()
throws Exception
- Throws:
Exception
testAddBaseModelWithApprovedStatus
public void testAddBaseModelWithApprovedStatus()
throws Exception
- Throws:
Exception
testAddBaseModelWithApprovedStatusAndIndexable
public void testAddBaseModelWithApprovedStatusAndIndexable()
throws Exception
- Throws:
Exception
testAddBaseModelWithApprovedStatusIsVisible
public void testAddBaseModelWithApprovedStatusIsVisible()
throws Exception
- Throws:
Exception
testAddBaseModelWithDraftStatus
public void testAddBaseModelWithDraftStatus()
throws Exception
- Throws:
Exception
testAddBaseModelWithDraftStatusIndexable
public void testAddBaseModelWithDraftStatusIndexable()
throws Exception
- Throws:
Exception
testAddBaseModelWithDraftStatusIsNotVisible
public void testAddBaseModelWithDraftStatusIsNotVisible()
throws Exception
- Throws:
Exception
testAddVersionBaseModel
public void testAddVersionBaseModel()
throws Exception
- Throws:
Exception
testAddVersionBaseModelIndexable
public void testAddVersionBaseModelIndexable()
throws Exception
- Throws:
Exception
testAddVersionBaseModelIsVisible
public void testAddVersionBaseModelIsVisible()
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
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
testTrashAndDeleteWithDraftStatus
public void testTrashAndDeleteWithDraftStatus()
throws Exception
- Throws:
Exception
testTrashAndDeleteWithDraftStatusIndexable
public void testTrashAndDeleteWithDraftStatusIndexable()
throws Exception
- Throws:
Exception
testTrashAndRestoreWithApprovedStatus
public void testTrashAndRestoreWithApprovedStatus()
throws Exception
- Throws:
Exception
testTrashAndRestoreWithApprovedStatusIndexable
public void testTrashAndRestoreWithApprovedStatusIndexable()
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
testTrashBaseModelAndParent
public void testTrashBaseModelAndParent()
throws Exception
- Throws:
Exception
testTrashBaseModelAndParentAndDeleteGroupTrashEntries
public void testTrashBaseModelAndParentAndDeleteGroupTrashEntries()
throws Exception
- Throws:
Exception
testTrashBaseModelAndParentAndDeleteParent
public void testTrashBaseModelAndParentAndDeleteParent()
throws Exception
- Throws:
Exception
testTrashBaseModelAndParentAndRestoreModel
public void testTrashBaseModelAndParentAndRestoreModel()
throws Exception
- Throws:
Exception
testTrashBaseModelAndParentAndRestoreModelIsVisible
public void testTrashBaseModelAndParentAndRestoreModelIsVisible()
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
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
testTrashIsRestorableBaseModel
public void testTrashIsRestorableBaseModel()
throws Exception
- Throws:
Exception
testTrashMoveBaseModel
public void testTrashMoveBaseModel()
throws Exception
- Throws:
Exception
testTrashMoveBaseModelIndexable
public void testTrashMoveBaseModelIndexable()
throws Exception
- Throws:
Exception
testTrashMyBaseModel
public void testTrashMyBaseModel()
throws Exception
- Throws:
Exception
testTrashParent
public void testTrashParent()
throws Exception
- Throws:
Exception
testTrashParentAndDeleteGroupTrashEntries
public void testTrashParentAndDeleteGroupTrashEntries()
throws Exception
- Throws:
Exception
testTrashParentAndDeleteParent
public void testTrashParentAndDeleteParent()
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
testTrashVersionBaseModelAndRestore
public void testTrashVersionBaseModelAndRestore()
throws Exception
- Throws:
Exception
testTrashVersionBaseModelAndRestoreIndexable
public void testTrashVersionBaseModelAndRestoreIndexable()
throws Exception
- Throws:
Exception
testTrashVersionBaseModelAndRestoreIsVisible
public void testTrashVersionBaseModelAndRestoreIsVisible()
throws Exception
- Throws:
Exception
testTrashVersionBaseModelIndexable
public void testTrashVersionBaseModelIndexable()
throws Exception
- Throws:
Exception
testTrashVersionBaseModelIsNotVisible
public void testTrashVersionBaseModelIsNotVisible()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModel
public void testTrashVersionParentBaseModel()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModelAndRestore
public void testTrashVersionParentBaseModelAndRestore()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModelIndexable
public void testTrashVersionParentBaseModelIndexable()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModelIsNotVisible
public void testTrashVersionParentBaseModelIsNotVisible()
throws Exception
- Throws:
Exception
addBaseModel
protected BaseModel<?> addBaseModel(BaseModel<?> parentBaseModel,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addBaseModelWithWorkflow
protected abstract BaseModel<?> addBaseModelWithWorkflow(BaseModel<?> parentBaseModel,
boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
addBaseModelWithWorkflow
protected BaseModel<?> addBaseModelWithWorkflow(boolean approved,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
deleteParentBaseModel
protected void deleteParentBaseModel(BaseModel<?> parentBaseModel,
boolean includeTrashedEntries)
throws Exception
- Throws:
Exception
expireBaseModel
protected BaseModel<?> expireBaseModel(BaseModel<?> baseModel,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
fetchAssetEntry
protected AssetEntry fetchAssetEntry(Class<?> clazz,
long classPK)
throws Exception
- Throws:
Exception
fetchAssetEntry
protected AssetEntry fetchAssetEntry(ClassedModel classedModel)
throws Exception
- Throws:
Exception
getAssetClassPK
protected Long getAssetClassPK(ClassedModel classedModel)
getBaseModel
protected abstract BaseModel<?> getBaseModel(long primaryKey)
throws Exception
- Throws:
Exception
getBaseModelClass
protected abstract Class<?> getBaseModelClass()
getBaseModelClassName
protected String getBaseModelClassName()
getBaseModelName
protected String getBaseModelName(ClassedModel classedModel)
getChildrenWorkflowedModels
protected List<? extends WorkflowedModel> getChildrenWorkflowedModels(BaseModel<?> parentBaseModel)
throws Exception
- Throws:
Exception
getDeletionSystemEventCount
protected long getDeletionSystemEventCount(TrashHandler trashHandler,
long systemEventSetKey)
throws Exception
- Throws:
Exception
getMineBaseModelsCount
protected int getMineBaseModelsCount(long groupId,
long userId)
throws Exception
- Throws:
Exception
getNotInTrashBaseModelsCount
protected abstract int getNotInTrashBaseModelsCount(BaseModel<?> parentBaseModel)
throws Exception
- Throws:
Exception
getParentBaseModel
protected BaseModel<?> getParentBaseModel(Group group,
long parentBaseModelId,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
getParentBaseModel
protected BaseModel<?> getParentBaseModel(Group group,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
getParentBaseModelClass
protected Class<?> getParentBaseModelClass()
getParentBaseModelClassName
protected String getParentBaseModelClassName()
getRecentBaseModelsCount
protected int getRecentBaseModelsCount(long groupId)
throws Exception
- Throws:
Exception
getSearchKeywords
protected abstract String getSearchKeywords()
getTrashEntriesCount
protected int getTrashEntriesCount(long groupId)
throws Exception
- Throws:
Exception
getTrashEntryClassPK
protected long getTrashEntryClassPK(ClassedModel classedModel)
getUniqueTitle
protected abstract String getUniqueTitle(BaseModel<?> baseModel)
getWorkflowedModel
protected WorkflowedModel getWorkflowedModel(ClassedModel baseModel)
throws Exception
- Throws:
Exception
isAssetableModel
protected boolean isAssetableModel()
isAssetableParentModel
protected boolean isAssetableParentModel()
isAssetEntryVisible
protected boolean isAssetEntryVisible(ClassedModel classedModel)
throws Exception
- Throws:
Exception
isBaseModelContainerModel
protected boolean isBaseModelContainerModel()
isBaseModelMoveableFromTrash
protected boolean isBaseModelMoveableFromTrash()
isBaseModelTrashName
protected boolean isBaseModelTrashName(ClassedModel classedModel)
isInTrashContainer
protected boolean isInTrashContainer(ClassedModel classedModel)
throws Exception
- Throws:
Exception
moveBaseModelFromTrash
protected BaseModel<?> moveBaseModelFromTrash(ClassedModel classedModel,
Group group,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
moveBaseModelToTrash
protected abstract void moveBaseModelToTrash(long primaryKey)
throws Exception
- Throws:
Exception
moveParentBaseModelToTrash
protected void moveParentBaseModelToTrash(long primaryKey)
throws Exception
- Throws:
Exception
restoreParentBaseModelFromTrash
protected void restoreParentBaseModelFromTrash(long primaryKey)
throws Exception
- Throws:
Exception
searchBaseModelsCount
protected int searchBaseModelsCount(Class<?> clazz,
long groupId)
throws Exception
- Throws:
Exception
searchTrashEntriesCount
protected int searchTrashEntriesCount(String keywords,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception
updateBaseModel
protected BaseModel<?> updateBaseModel(long primaryKey,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception