com.liferay.portlet.trash
Class BaseTrashHandlerTestCase
java.lang.Object
com.liferay.portlet.trash.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 |
isIndexableBaseModel()
|
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 |
testDeleteTrashVersions()
|
void |
testTrashAndDeleteApproved()
|
void |
testTrashAndDeleteDraft()
|
void |
testTrashAndRestoreApproved()
|
void |
testTrashAndRestoreDraft()
|
void |
testTrashBaseModelAndParentAndDeleteGroupTrashEntries()
|
void |
testTrashBaseModelAndParentAndDeleteParent()
|
void |
testTrashBaseModelAndParentAndRestoreModel()
|
void |
testTrashDuplicate()
|
void |
testTrashGrandparentBaseModelAndRestoreParentModel()
|
void |
testTrashIsRestorableBaseModel()
|
void |
testTrashIsRestorableBaseModelWithParent1()
|
void |
testTrashIsRestorableBaseModelWithParent2()
|
void |
testTrashIsRestorableBaseModelWithParent3()
|
void |
testTrashIsRestorableBaseModelWithParent4()
|
void |
testTrashMoveBaseModel()
|
void |
testTrashMyBaseModel()
|
void |
testTrashParentAndDeleteGroupTrashEntries()
|
void |
testTrashParentAndDeleteParent()
|
void |
testTrashRecentBaseModel()
|
void |
testTrashVersionBaseModelAndDelete()
|
void |
testTrashVersionBaseModelAndRestore()
|
void |
testTrashVersionParentBaseModel()
|
void |
testTrashVersionParentBaseModelAndRestore()
|
protected void |
trashBaseModel(boolean approved,
boolean delete)
|
protected void |
trashDuplicateBaseModel()
|
protected void |
trashGrandparentBaseModelAndRestoreParentModel()
|
protected void |
trashIsRestorableBaseModel()
|
protected void |
trashIsRestorableBaseModelWithParent(boolean deleteParent,
boolean moveParentToTrash)
|
protected void |
trashMoveBaseModel()
|
protected void |
trashMyBaseModel()
|
protected void |
trashParentBaseModel(boolean moveBaseModelToTrash,
boolean deleteTrashEntries,
boolean deleteGroupTrashEntries)
|
protected void |
trashRecentBaseModel()
|
protected void |
trashVersionBaseModel(boolean delete)
|
protected void |
trashVersionParentBaseModel(boolean moveBaseModel)
|
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
testDeleteTrashVersions
public void testDeleteTrashVersions()
throws Exception
- Throws:
Exception
testTrashAndDeleteApproved
public void testTrashAndDeleteApproved()
throws Exception
- Throws:
Exception
testTrashAndDeleteDraft
public void testTrashAndDeleteDraft()
throws Exception
- Throws:
Exception
testTrashAndRestoreApproved
public void testTrashAndRestoreApproved()
throws Exception
- Throws:
Exception
testTrashAndRestoreDraft
public void testTrashAndRestoreDraft()
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
testTrashDuplicate
public void testTrashDuplicate()
throws Exception
- Throws:
Exception
testTrashGrandparentBaseModelAndRestoreParentModel
public void testTrashGrandparentBaseModelAndRestoreParentModel()
throws Exception
- Throws:
Exception
testTrashIsRestorableBaseModel
public void testTrashIsRestorableBaseModel()
throws Exception
- Throws:
Exception
testTrashIsRestorableBaseModelWithParent1
public void testTrashIsRestorableBaseModelWithParent1()
throws Exception
- Throws:
Exception
testTrashIsRestorableBaseModelWithParent2
public void testTrashIsRestorableBaseModelWithParent2()
throws Exception
- Throws:
Exception
testTrashIsRestorableBaseModelWithParent3
public void testTrashIsRestorableBaseModelWithParent3()
throws Exception
- Throws:
Exception
testTrashIsRestorableBaseModelWithParent4
public void testTrashIsRestorableBaseModelWithParent4()
throws Exception
- Throws:
Exception
testTrashMoveBaseModel
public void testTrashMoveBaseModel()
throws Exception
- Throws:
Exception
testTrashMyBaseModel
public void testTrashMyBaseModel()
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
testTrashVersionBaseModelAndDelete
public void testTrashVersionBaseModelAndDelete()
throws Exception
- Throws:
Exception
testTrashVersionBaseModelAndRestore
public void testTrashVersionBaseModelAndRestore()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModel
public void testTrashVersionParentBaseModel()
throws Exception
- Throws:
Exception
testTrashVersionParentBaseModelAndRestore
public void testTrashVersionParentBaseModelAndRestore()
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)
isIndexableBaseModel
protected boolean isIndexableBaseModel()
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
trashBaseModel
protected void trashBaseModel(boolean approved,
boolean delete)
throws Exception
- Throws:
Exception
trashDuplicateBaseModel
protected void trashDuplicateBaseModel()
throws Exception
- Throws:
Exception
trashGrandparentBaseModelAndRestoreParentModel
protected void trashGrandparentBaseModelAndRestoreParentModel()
throws Exception
- Throws:
Exception
trashIsRestorableBaseModel
protected void trashIsRestorableBaseModel()
throws Exception
- Throws:
Exception
trashIsRestorableBaseModelWithParent
protected void trashIsRestorableBaseModelWithParent(boolean deleteParent,
boolean moveParentToTrash)
throws Exception
- Throws:
Exception
trashMoveBaseModel
protected void trashMoveBaseModel()
throws Exception
- Throws:
Exception
trashMyBaseModel
protected void trashMyBaseModel()
throws Exception
- Throws:
Exception
trashParentBaseModel
protected void trashParentBaseModel(boolean moveBaseModelToTrash,
boolean deleteTrashEntries,
boolean deleteGroupTrashEntries)
throws Exception
- Throws:
Exception
trashRecentBaseModel
protected void trashRecentBaseModel()
throws Exception
- Throws:
Exception
trashVersionBaseModel
protected void trashVersionBaseModel(boolean delete)
throws Exception
- Throws:
Exception
trashVersionParentBaseModel
protected void trashVersionParentBaseModel(boolean moveBaseModel)
throws Exception
- Throws:
Exception
updateBaseModel
protected BaseModel<?> updateBaseModel(long primaryKey,
ServiceContext serviceContext)
throws Exception
- Throws:
Exception