Liferay 6.2.0-ce-m5

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 getTrashContainer(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
checkDuplicateTrashEntry, getAssetRendererFactory, getContainerModel, getContainerModelClassName, getContainerModelName, getContainerModels, getContainerModelsCount, getDeleteMessage, getParentContainerModel, getParentContainerModels, getRestoreLink, getRestoreMessage, getRootContainerModelName, getSubcontainerModelName, getTrashContainedModelName, getTrashContainedModelsCount, getTrashContainedModelTrashRenderers, getTrashContainerModelName, getTrashContainerModelsCount, getTrashContainerModelTrashRenderers, getTrashRenderer, hasTrashPermission, isContainerModel, isMovable, isRestorable, 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

getTrashContainer

public ContainerModel getTrashContainer(long classPK)
                                 throws PortalException,
                                        SystemException
Specified by:
getTrashContainer in interface TrashHandler
Overrides:
getTrashContainer 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.0-ce-m5