Example usage for com.liferay.portal.kernel.trash TrashHandler moveEntry

List of usage examples for com.liferay.portal.kernel.trash TrashHandler moveEntry

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.trash TrashHandler moveEntry.

Prototype

public void moveEntry(long userId, long classPK, long containerModelId, ServiceContext serviceContext)
        throws PortalException;

Source Link

Document

Moves the entity with the class primary key to the container model with the class primary key

Usage

From source file:com.liferay.wiki.trash.test.WikiPageDependentsTrashHandlerTest.java

License:Open Source License

protected void movePage(WikiPage trashedPage, WikiPage newParentPage) throws PortalException {

    TrashHandler trashHandler = TrashHandlerRegistryUtil.getTrashHandler(WikiPage.class.getName());

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId());

    trashHandler.moveEntry(TestPropsValues.getUserId(), trashedPage.getResourcePrimKey(),
            newParentPage.getResourcePrimKey(), serviceContext);
}