Liferay 6.2-ce-ga5

com.liferay.portlet.messageboards.trash
Class MBMessageTrashHandler

java.lang.Object
  extended by com.liferay.portal.kernel.trash.BaseTrashHandler
      extended by com.liferay.portlet.messageboards.trash.MBMessageTrashHandler
All Implemented Interfaces:
TrashHandler

public class MBMessageTrashHandler
extends BaseTrashHandler

Implements trash handling for message boards message entity.


Constructor Summary
MBMessageTrashHandler()
           
 
Method Summary
 void deleteTrashEntry(long classPK)
          Deletes the model entity with the primary key.
 String getClassName()
          Returns the class name handled by this trash handler.
 ContainerModel getContainerModel(long containerModelId)
          Returns the container model with the primary key.
 String getContainerModelClassName()
          Returns the parent container model's class name.
 ContainerModel getParentContainerModel(TrashedModel trashedModel)
           
 TrashEntry getTrashEntry(long classPK)
           
protected  boolean hasPermission(PermissionChecker permissionChecker, long classPK, String actionId)
           
 boolean isDeletable()
          Returns true if the entity can be deleted from the Recycle Bin.
 boolean isInTrash(long classPK)
          Returns true if the model entity with the primary key is in the Recycle Bin.
 boolean isInTrashContainer(long classPK)
          Returns true if the model entity with the primary key is in a container that is in the Recycle Bin.
 void restoreRelatedTrashEntry(String className, long classPK)
          Restores the model entity that is related to the model entity with the class name and class PK.
 void restoreTrashEntry(long userId, long classPK)
          Restores the model entity with the primary key.
 
Methods inherited from class com.liferay.portal.kernel.trash.BaseTrashHandler
addDeletionSystemEvent, checkDuplicateEntry, checkDuplicateTrashEntry, getAssetRendererFactory, getContainerModelName, getContainerModels, getContainerModelsCount, getDeleteMessage, getParentContainerModel, getParentContainerModels, getRestoreContainedModelLink, getRestoreContainerModelLink, getRestoreMessage, getRootContainerModelName, getSubcontainerModelName, getSystemEventClassName, getTrashContainedModelName, getTrashContainedModelsCount, getTrashContainedModelTrashRenderers, getTrashContainerModelName, getTrashContainerModelsCount, getTrashContainerModelTrashRenderers, getTrashRenderer, hasTrashPermission, isContainerModel, isMovable, isRestorable, isTrashEntry, moveEntry, moveTrashEntry, updateTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MBMessageTrashHandler

public MBMessageTrashHandler()
Method Detail

deleteTrashEntry

public void deleteTrashEntry(long classPK)
Description copied from interface: TrashHandler
Deletes the model entity with the primary key.

Parameters:
classPK - the primary key of the model entity to delete

getClassName

public String getClassName()
Description copied from interface: TrashHandler
Returns the class name handled by this trash handler.

Returns:
the class name handled by this trash handler

getContainerModel

public ContainerModel getContainerModel(long containerModelId)
                                 throws PortalException,
                                        SystemException
Description copied from interface: TrashHandler
Returns the container model with the primary key.

Specified by:
getContainerModel in interface TrashHandler
Overrides:
getContainerModel in class BaseTrashHandler
Parameters:
containerModelId - the primary key of the container model
Returns:
the container model with the primary key
Throws:
PortalException - if a container model with the primary key could not be found
SystemException - if a system exception occurred

getContainerModelClassName

public String getContainerModelClassName()
Description copied from interface: TrashHandler
Returns the parent container model's class name.

Specified by:
getContainerModelClassName in interface TrashHandler
Overrides:
getContainerModelClassName in class BaseTrashHandler

getParentContainerModel

public ContainerModel getParentContainerModel(TrashedModel trashedModel)
                                       throws PortalException,
                                              SystemException
Specified by:
getParentContainerModel in interface TrashHandler
Overrides:
getParentContainerModel in class BaseTrashHandler
Throws:
PortalException
SystemException

getTrashEntry

public TrashEntry getTrashEntry(long classPK)
                         throws PortalException,
                                SystemException
Specified by:
getTrashEntry in interface TrashHandler
Overrides:
getTrashEntry in class BaseTrashHandler
Throws:
PortalException
SystemException

isDeletable

public boolean isDeletable()
Description copied from interface: TrashHandler
Returns true if the entity can be deleted from the Recycle Bin.

Specified by:
isDeletable in interface TrashHandler
Overrides:
isDeletable in class BaseTrashHandler
Returns:
true if the entity can be deleted from the Recycle Bin.

isInTrash

public boolean isInTrash(long classPK)
                  throws PortalException,
                         SystemException
Description copied from interface: TrashHandler
Returns true if the model entity with the primary key is in the Recycle Bin.

Parameters:
classPK - the primary key of the model entity
Returns:
true if the model entity is in the Recycle Bin; false otherwise
Throws:
PortalException - if a model entity with the primary key could not be found in the portal
SystemException - if a system exception occurred

isInTrashContainer

public boolean isInTrashContainer(long classPK)
                           throws PortalException,
                                  SystemException
Description copied from interface: TrashHandler
Returns true if the model entity with the primary key is in a container that is in the Recycle Bin.

Specified by:
isInTrashContainer in interface TrashHandler
Overrides:
isInTrashContainer in class BaseTrashHandler
Parameters:
classPK - the primary key of the model entity
Returns:
true if the model entity with the primary key is in a container that is in the Recycle Bin; false otherwise
Throws:
PortalException - if a model entity with the primary key could not be found in the portal
SystemException - if a system exception occurred

restoreRelatedTrashEntry

public void restoreRelatedTrashEntry(String className,
                                     long classPK)
                              throws PortalException,
                                     SystemException
Description copied from interface: TrashHandler
Restores the model entity that is related to the model entity with the class name and class PK. For example, WikiPageTrashHandler.restoreRelatedTrashEntry( String, long) restores the attachment related to the wiki page with the class name and class PK.

Specified by:
restoreRelatedTrashEntry in interface TrashHandler
Overrides:
restoreRelatedTrashEntry in class BaseTrashHandler
Parameters:
className - the class name of the model entity with a related model entity to restore
classPK - the primary key of the model entity with a related model entity to restore
Throws:
PortalException - if a model entity with the primary key could not be found
SystemException - if a system exception occurred

restoreTrashEntry

public void restoreTrashEntry(long userId,
                              long classPK)
Description copied from interface: TrashHandler
Restores the model entity with the primary key.

Parameters:
userId - the user ID
classPK - the primary key of the model entity to restore

hasPermission

protected boolean hasPermission(PermissionChecker permissionChecker,
                                long classPK,
                                String actionId)
                         throws PortalException,
                                SystemException
Specified by:
hasPermission in class BaseTrashHandler
Throws:
PortalException
SystemException

Liferay 6.2-ce-ga5