Example usage for com.liferay.portal.kernel.util PortletKeys BACKGROUND_TASK

List of usage examples for com.liferay.portal.kernel.util PortletKeys BACKGROUND_TASK

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PortletKeys BACKGROUND_TASK.

Prototype

String BACKGROUND_TASK

To view the source code for com.liferay.portal.kernel.util PortletKeys BACKGROUND_TASK.

Click Source Link

Usage

From source file:com.liferay.document.library.web.exportimport.data.handler.test.DLPortletDataHandlerTest.java

License:Open Source License

protected void addRepositoryEntries() throws Exception {
    long classNameId = PortalUtil.getClassNameId(LiferayRepository.class.getName());

    Repository repository = RepositoryLocalServiceUtil.addRepository(TestPropsValues.getUserId(),
            stagingGroup.getGroupId(), classNameId, DLFolderConstants.DEFAULT_PARENT_FOLDER_ID,
            PortletKeys.BACKGROUND_TASK, StringPool.BLANK, PortletKeys.BACKGROUND_TASK, new UnicodeProperties(),
            true, ServiceContextTestUtil.getServiceContext());

    ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(stagingGroup.getGroupId(),
            TestPropsValues.getUserId());

    Folder folder = DLAppServiceUtil.addFolder(repository.getRepositoryId(),
            DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, RandomTestUtil.randomString(),
            RandomTestUtil.randomString(), serviceContext);

    DLAppLocalServiceUtil.addFileEntry(TestPropsValues.getUserId(), repository.getRepositoryId(),
            folder.getFolderId(), RandomTestUtil.randomString() + ".txt", ContentTypes.TEXT_PLAIN,
            RandomTestUtil.randomBytes(TikaSafeRandomizerBumper.INSTANCE), serviceContext);
}