|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.kernel.trash.BaseTrashHandler
com.liferay.portlet.documentlibrary.trash.DLBaseTrashHandler
public abstract class DLBaseTrashHandler
| Constructor Summary | |
|---|---|
DLBaseTrashHandler()
|
|
| Method Summary | |
|---|---|
protected DLFolder |
fetchDLFolder(long classPK)
|
ContainerModel |
getContainerModel(long containerModelId)
Returns the container model with the primary key. |
String |
getContainerModelClassName(long classPK)
|
String |
getContainerModelName(long classPK)
|
List<ContainerModel> |
getContainerModels(long classPK,
long parentContainerModelId,
int start,
int end)
Returns a range of all the container models that are children of the parent container model identified by the container model ID. |
int |
getContainerModelsCount(long classPK,
long parentContainerModelId)
Returns the number of container models that are children of the parent container model identified by the container model ID. |
protected DLFolder |
getDLFolder(long classPK)
|
List<ContainerModel> |
getParentContainerModels(long classPK)
Returns all the parent container models of the model entity with the primary key ordered by hierarchy. |
protected abstract Repository |
getRepository(long classPK)
|
String |
getRootContainerModelName()
Returns the name of the root container (e.g. |
String |
getRootContainerModelTitle(long containerModelId,
Locale locale)
|
String |
getTrashContainedModelName()
Returns the name of the contained model. |
int |
getTrashContainedModelsCount(long classPK)
Returns the number of model entities (excluding container model entities) that are children of the parent container model identified by the primary key. |
List<TrashRenderer> |
getTrashContainedModelTrashRenderers(long classPK,
int start,
int end)
Returns a range of all the trash renderers of model entities (excluding container models) that are children of the parent container model identified by the primary key. |
String |
getTrashContainerModelName()
Returns the name of the container model. |
int |
getTrashContainerModelsCount(long classPK)
Returns the number of container models that are children of the parent container model identified by the primary key. |
List<TrashRenderer> |
getTrashContainerModelTrashRenderers(long classPK,
int start,
int end)
Returns a range of all the trash renderers of model entities that are children of the parent container model identified by the primary key. |
boolean |
isMovable()
Returns true if the entity can be moved from one container
model (such as a folder) to another. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.kernel.trash.TrashHandler |
|---|
deleteTrashEntry, getClassName, isInTrash, restoreTrashEntry |
| Constructor Detail |
|---|
public DLBaseTrashHandler()
| Method Detail |
|---|
public ContainerModel getContainerModel(long containerModelId)
throws PortalException
TrashHandler
getContainerModel in interface TrashHandlergetContainerModel in class BaseTrashHandlercontainerModelId - the primary key of the container model
PortalException - if a container model with the primary key could
not be foundpublic String getContainerModelClassName(long classPK)
getContainerModelClassName in interface TrashHandlergetContainerModelClassName in class BaseTrashHandlerpublic String getContainerModelName(long classPK)
getContainerModelName in interface TrashHandlergetContainerModelName in class BaseTrashHandler
public List<ContainerModel> getContainerModels(long classPK,
long parentContainerModelId,
int start,
int end)
throws PortalException
TrashHandlerThis method checks for the view permission when retrieving the container models.
Useful when paginating results. Returns a maximum of end -
start instances. The start and end
values are not primary keys but, rather, indexes in the result set. Thus,
0 refers to the first result in the set. Setting both
start and end to QueryUtil.ALL_POS will return the full
result set.
getContainerModels in interface TrashHandlergetContainerModels in class BaseTrashHandlerclassPK - the primary key of a model entity the container models
must be able to containparentContainerModelId - the primary key of the parent container modelstart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)
PortalException - if a model entity with the primary key could not
be found
public int getContainerModelsCount(long classPK,
long parentContainerModelId)
throws PortalException
TrashHandlerThis method checks for the view permission when counting the container models.
getContainerModelsCount in interface TrashHandlergetContainerModelsCount in class BaseTrashHandlerclassPK - the primary key of a model entity the container models
must be able to containparentContainerModelId - the primary key of the parent container model
PortalException - if a model entity with the primary key could not
be found
public List<ContainerModel> getParentContainerModels(long classPK)
throws PortalException
TrashHandlerFor example, if the primary key is for a file entry inside folder C, which is inside folder B, which is inside folder A; this method returns container models for folders A, B, and C.
getParentContainerModels in interface TrashHandlergetParentContainerModels in class BaseTrashHandlerclassPK - the primary key of a model entity the container models
must be able to contain
PortalException - if a portal exception occurredpublic String getRootContainerModelName()
TrashHandler
getRootContainerModelName in interface TrashHandlergetRootContainerModelName in class BaseTrashHandler
public String getRootContainerModelTitle(long containerModelId,
Locale locale)
getRootContainerModelTitle in interface TrashHandlergetRootContainerModelTitle in class BaseTrashHandlerpublic String getTrashContainedModelName()
TrashHandlerFor example, "files" may be the model name for a folder and "pages" may be the model name for a wiki node.
getTrashContainedModelName in interface TrashHandlergetTrashContainedModelName in class BaseTrashHandler
public int getTrashContainedModelsCount(long classPK)
throws PortalException
TrashHandlerFor example, for a folder with subfolders and documents, the number of documents (excluding those explicitely moved to the recycle bin) is returned.
getTrashContainedModelsCount in interface TrashHandlergetTrashContainedModelsCount in class BaseTrashHandlerclassPK - the primary key of a container model
PortalException - if a portal exception occurred
public List<TrashRenderer> getTrashContainedModelTrashRenderers(long classPK,
int start,
int end)
throws PortalException
TrashHandlerFor example, for a folder with subfolders and documents, a range of all the trash renderers of documents (excluding those explicitly moved to the recycle bin) is returned.
Useful when paginating results. Returns a maximum of end -
start instances. The start and end
values are not primary keys but, rather, indexes in the result set. Thus,
0 refers to the first result in the set. Setting both
start and end to QueryUtil.ALL_POS will return the full
result set.
getTrashContainedModelTrashRenderers in interface TrashHandlergetTrashContainedModelTrashRenderers in class BaseTrashHandlerclassPK - the primary key of a container modelstart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)
PortalException - if a portal exception occurredpublic String getTrashContainerModelName()
TrashHandlerFor example, "folder" may be the container model name for a file entry.
getTrashContainerModelName in interface TrashHandlergetTrashContainerModelName in class BaseTrashHandler
public int getTrashContainerModelsCount(long classPK)
throws PortalException
TrashHandlerFor example, for a folder with subfolders and documents, the number of folders (excluding those explicitly moved to the recycle bin) is returned.
getTrashContainerModelsCount in interface TrashHandlergetTrashContainerModelsCount in class BaseTrashHandlerclassPK - the primary key of a container model
PortalException - if a portal exception occurred
public List<TrashRenderer> getTrashContainerModelTrashRenderers(long classPK,
int start,
int end)
throws PortalException
TrashHandlerFor example, for a folder with subfolders and documents, the range of renderers representing folders (excluding those explicitly moved to the recycle bin) is returned.
Useful when paginating results. Returns a maximum of end -
start instances. The start and end
values are not primary keys but, rather, indexes in the result set. Thus,
0 refers to the first result in the set. Setting both
start and end to QueryUtil.ALL_POS will return the full
result set.
getTrashContainerModelTrashRenderers in interface TrashHandlergetTrashContainerModelTrashRenderers in class BaseTrashHandlerclassPK - the primary key of a container modelstart - the lower bound of the range of resultsend - the upper bound of the range of results (not inclusive)
PortalException - if a portal exception occurredpublic boolean isMovable()
TrashHandlertrue if the entity can be moved from one container
model (such as a folder) to another.
isMovable in interface TrashHandlerisMovable in class BaseTrashHandlertrue if the entity can be moved from one container
model to another; false otherwise
protected DLFolder fetchDLFolder(long classPK)
throws PortalException
PortalException
protected DLFolder getDLFolder(long classPK)
throws PortalException
PortalException
protected abstract Repository getRepository(long classPK)
throws PortalException
PortalException
|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||