Liferay 7.0-ce-m3

com.liferay.portlet.wiki.trash
Class BaseWikiTrashHandler

java.lang.Object
  extended by com.liferay.portal.kernel.trash.BaseTrashHandler
      extended by com.liferay.portlet.wiki.trash.BaseWikiTrashHandler
All Implemented Interfaces:
TrashHandler
Direct Known Subclasses:
WikiNodeTrashHandler, WikiPageTrashHandler

public abstract class BaseWikiTrashHandler
extends BaseTrashHandler


Constructor Summary
BaseWikiTrashHandler()
           
 
Method Summary
 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 containerModelId, 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 containerModelId)
          Returns the number of container models that are children of the parent container model identified by the container model ID.
 long getDestinationContainerModelId(long classPK, long destinationContainerModelId)
           
 String getRootContainerModelClassName()
           
 long getRootContainerModelId(long classPK)
           
 List<ContainerModel> getRootContainerModels(long groupId)
           
 int getRootContainerModelsCount(long groupId)
           
 String getRootContainerModelTitle(long containerModelId, Locale locale)
           
 String getSubcontainerModelName()
          Returns the name of the subcontainer model (e.g. for a folder the subcontainer model name may be "subfolder").
 void moveEntry(long userId, long classPK, long containerModelId, ServiceContext serviceContext)
          Moves the entity with the class primary key to the container model with the class primary key
 void moveTrashEntry(long userId, long classPK, long containerModelId, ServiceContext serviceContext)
          Moves the model entity with the primary key out of the Recycle Bin to a new destination identified by the container model ID.
 
Methods inherited from class com.liferay.portal.kernel.trash.BaseTrashHandler
addDeletionSystemEvent, checkDuplicateEntry, checkDuplicateTrashEntry, checkRestorableEntry, checkRestorableEntry, getAssetRendererFactory, getContainerModelClassName, getContainerModelName, getDeleteMessage, getParentContainerModel, getParentContainerModel, getParentContainerModels, getRestoreContainedModelLink, getRestoreContainerModelLink, getRestoreMessage, getRootContainerModelName, getSystemEventClassName, getTrashContainedModelName, getTrashContainedModelsCount, getTrashContainedModelTrashRenderers, getTrashContainerModelName, getTrashContainerModelsCount, getTrashContainerModelTrashRenderers, getTrashEntry, getTrashRenderer, hasPermission, hasTrashPermission, isContainerModel, isDeletable, isInTrashContainer, isMovable, isRestorable, isRootContainerModelMovable, restoreRelatedTrashEntry, updateTitle
 
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

BaseWikiTrashHandler

public BaseWikiTrashHandler()
Method Detail

getContainerModel

public ContainerModel getContainerModel(long containerModelId)
                                 throws PortalException
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

getContainerModelClassName

public String getContainerModelClassName(long classPK)
Specified by:
getContainerModelClassName in interface TrashHandler
Overrides:
getContainerModelClassName in class BaseTrashHandler

getContainerModelName

public String getContainerModelName(long classPK)
                             throws PortalException
Specified by:
getContainerModelName in interface TrashHandler
Overrides:
getContainerModelName in class BaseTrashHandler
Throws:
PortalException

getContainerModels

public List<ContainerModel> getContainerModels(long classPK,
                                               long containerModelId,
                                               int start,
                                               int end)
                                        throws PortalException
Description copied from interface: TrashHandler
Returns a range of all the container models that are children of the parent container model identified by the container model ID. These container models must be able to contain the model entity identified by the primary key.

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.

Specified by:
getContainerModels in interface TrashHandler
Overrides:
getContainerModels in class BaseTrashHandler
Parameters:
classPK - the primary key of a model entity the container models must be able to contain
containerModelId - the primary key of the parent container model
start - the lower bound of the range of results
end - the upper bound of the range of results (not inclusive)
Returns:
the range of matching container models
Throws:
PortalException - if a model entity with the primary key could not be found

getContainerModelsCount

public int getContainerModelsCount(long classPK,
                                   long containerModelId)
                            throws PortalException
Description copied from interface: TrashHandler
Returns the number of container models that are children of the parent container model identified by the container model ID. These container models must be able to contain the model entity identified by the primary key.

This method checks for the view permission when counting the container models.

Specified by:
getContainerModelsCount in interface TrashHandler
Overrides:
getContainerModelsCount in class BaseTrashHandler
Parameters:
classPK - the primary key of a model entity the container models must be able to contain
containerModelId - the primary key of the parent container model
Returns:
the number of matching container models
Throws:
PortalException - if a model entity with the primary key could not be found

getDestinationContainerModelId

public long getDestinationContainerModelId(long classPK,
                                           long destinationContainerModelId)
Specified by:
getDestinationContainerModelId in interface TrashHandler
Overrides:
getDestinationContainerModelId in class BaseTrashHandler

getRootContainerModelClassName

public String getRootContainerModelClassName()
Specified by:
getRootContainerModelClassName in interface TrashHandler
Overrides:
getRootContainerModelClassName in class BaseTrashHandler

getRootContainerModelId

public long getRootContainerModelId(long classPK)
                             throws PortalException
Specified by:
getRootContainerModelId in interface TrashHandler
Overrides:
getRootContainerModelId in class BaseTrashHandler
Throws:
PortalException

getRootContainerModels

public List<ContainerModel> getRootContainerModels(long groupId)
                                            throws PortalException
Specified by:
getRootContainerModels in interface TrashHandler
Overrides:
getRootContainerModels in class BaseTrashHandler
Throws:
PortalException

getRootContainerModelsCount

public int getRootContainerModelsCount(long groupId)
Specified by:
getRootContainerModelsCount in interface TrashHandler
Overrides:
getRootContainerModelsCount in class BaseTrashHandler

getRootContainerModelTitle

public String getRootContainerModelTitle(long containerModelId,
                                         Locale locale)
                                  throws PortalException
Specified by:
getRootContainerModelTitle in interface TrashHandler
Overrides:
getRootContainerModelTitle in class BaseTrashHandler
Throws:
PortalException

getSubcontainerModelName

public String getSubcontainerModelName()
Description copied from interface: TrashHandler
Returns the name of the subcontainer model (e.g. for a folder the subcontainer model name may be "subfolder").

Specified by:
getSubcontainerModelName in interface TrashHandler
Overrides:
getSubcontainerModelName in class BaseTrashHandler
Returns:
the name of the subcontainer model

moveEntry

public void moveEntry(long userId,
                      long classPK,
                      long containerModelId,
                      ServiceContext serviceContext)
               throws PortalException
Description copied from interface: TrashHandler
Moves the entity with the class primary key to the container model with the class primary key

Specified by:
moveEntry in interface TrashHandler
Overrides:
moveEntry in class BaseTrashHandler
Parameters:
userId - the user ID
classPK - the primary key of the model entity
containerModelId - the primary key of the destination container model
serviceContext - the service context to be applied
Throws:
PortalException - if a model entity with the primary key or the destination container model with the primary key could not be found

moveTrashEntry

public void moveTrashEntry(long userId,
                           long classPK,
                           long containerModelId,
                           ServiceContext serviceContext)
                    throws PortalException
Description copied from interface: TrashHandler
Moves the model entity with the primary key out of the Recycle Bin to a new destination identified by the container model ID.

Specified by:
moveTrashEntry in interface TrashHandler
Overrides:
moveTrashEntry in class BaseTrashHandler
Parameters:
userId - the user ID
classPK - the primary key of the model entity
containerModelId - the primary key of the destination container model
serviceContext - the service context to be applied
Throws:
PortalException - if a model entity with the primary key or the destination container model with the primary key could not be found

Liferay 7.0-ce-m3