|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.kernel.trash.BaseTrashHandler com.liferay.portlet.bookmarks.trash.BookmarksBaseTrashHandler
public abstract class BookmarksBaseTrashHandler
Represents the trash handler for bookmarks folder entity.
Constructor Summary | |
---|---|
BookmarksBaseTrashHandler()
|
Method Summary | |
---|---|
ContainerModel |
getContainerModel(long containerModelId)
Returns the container model with the primary key. |
String |
getContainerModelClassName()
Returns the parent container model's class name. |
String |
getContainerModelName()
Returns the name of the container model (e.g. folder name). |
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 abstract long |
getGroupId(long classPK)
|
List<ContainerModel> |
getParentContainerModels(long classPK)
Returns all the parent container models of the model entity with the primary key ordered by hierarchy. |
String |
getRootContainerModelName()
Returns the name of the root container (e.g. |
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 BookmarksBaseTrashHandler()
Method Detail |
---|
public ContainerModel getContainerModel(long containerModelId) throws PortalException, SystemException
TrashHandler
getContainerModel
in interface TrashHandler
getContainerModel
in class BaseTrashHandler
containerModelId
- the primary key of the container model
PortalException
- if a container model with the primary key could
not be found
SystemException
- if a system exception occurredpublic String getContainerModelClassName()
TrashHandler
getContainerModelClassName
in interface TrashHandler
getContainerModelClassName
in class BaseTrashHandler
public String getContainerModelName()
TrashHandler
getContainerModelName
in interface TrashHandler
getContainerModelName
in class BaseTrashHandler
public List<ContainerModel> getContainerModels(long classPK, long parentContainerModelId, int start, int end) throws PortalException, SystemException
TrashHandler
This 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 TrashHandler
getContainerModels
in class BaseTrashHandler
classPK
- 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
SystemException
- if a system exception occurredpublic int getContainerModelsCount(long classPK, long parentContainerModelId) throws PortalException, SystemException
TrashHandler
This method checks for the view permission when counting the container models.
getContainerModelsCount
in interface TrashHandler
getContainerModelsCount
in class BaseTrashHandler
classPK
- 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
SystemException
- if a system exception occurredpublic List<ContainerModel> getParentContainerModels(long classPK) throws PortalException, SystemException
TrashHandler
For 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 TrashHandler
getParentContainerModels
in class BaseTrashHandler
classPK
- the primary key of a model entity the container models
must be able to contain
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic String getRootContainerModelName()
TrashHandler
getRootContainerModelName
in interface TrashHandler
getRootContainerModelName
in class BaseTrashHandler
public String getTrashContainedModelName()
TrashHandler
For example, "files" may be the model name for a folder and "pages" may be the model name for a wiki node.
getTrashContainedModelName
in interface TrashHandler
getTrashContainedModelName
in class BaseTrashHandler
public int getTrashContainedModelsCount(long classPK) throws PortalException, SystemException
TrashHandler
For 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 TrashHandler
getTrashContainedModelsCount
in class BaseTrashHandler
classPK
- the primary key of a container model
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic List<TrashRenderer> getTrashContainedModelTrashRenderers(long classPK, int start, int end) throws PortalException, SystemException
TrashHandler
For 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 TrashHandler
getTrashContainedModelTrashRenderers
in class BaseTrashHandler
classPK
- 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 occurred
SystemException
- if a system exception occurredpublic String getTrashContainerModelName()
TrashHandler
For example, "folder" may be the container model name for a file entry.
getTrashContainerModelName
in interface TrashHandler
getTrashContainerModelName
in class BaseTrashHandler
public int getTrashContainerModelsCount(long classPK) throws PortalException, SystemException
TrashHandler
For 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 TrashHandler
getTrashContainerModelsCount
in class BaseTrashHandler
classPK
- the primary key of a container model
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic List<TrashRenderer> getTrashContainerModelTrashRenderers(long classPK, int start, int end) throws PortalException, SystemException
TrashHandler
For 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 TrashHandler
getTrashContainerModelTrashRenderers
in class BaseTrashHandler
classPK
- 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 occurred
SystemException
- if a system exception occurredpublic boolean isMovable()
TrashHandler
true
if the entity can be moved from one container
model (such as a folder) to another.
isMovable
in interface TrashHandler
isMovable
in class BaseTrashHandler
true
if the entity can be moved from one container
model to another; false
otherwiseprotected abstract long getGroupId(long classPK) throws PortalException, SystemException
PortalException
SystemException
|
Liferay 6.2-ce-ga5 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |