List of usage examples for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_APPROVED
int STATUS_APPROVED
To view the source code for com.liferay.portal.kernel.workflow WorkflowConstants STATUS_APPROVED.
Click Source Link
From source file:com.liferay.document.library.repository.external.model.ExtRepositoryFileVersionAdapter.java
License:Open Source License
@Override public int getStatus() { return WorkflowConstants.STATUS_APPROVED; }
From source file:com.liferay.document.library.search.test.DLFileEntrySearchTest.java
License:Open Source License
@Override protected Hits searchGroupEntries(long groupId, long creatorUserId) throws Exception { return DLAppServiceUtil.search(groupId, creatorUserId, WorkflowConstants.STATUS_APPROVED, QueryUtil.ALL_POS, QueryUtil.ALL_POS);// w w w.j a va2 s. c o m }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountBy_G_U_R_F_M_FileVersionUserChangedByWorkflow() throws Exception { ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId()); FileEntry fileEntry = DLAppTestUtil.addFileEntryWithWorkflow(_user.getUserId(), _group.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, RandomTestUtil.randomString(), "FE.txt", false, serviceContext);/* w ww. j av a 2 s . c o m*/ LiferayFileEntry liferayFileEntry = (LiferayFileEntry) fileEntry; DLFileEntry dlFileEntry = liferayFileEntry.getDLFileEntry(); DLFileVersion dlFileVersion = dlFileEntry.getLatestFileVersion(true); DLFileEntryLocalServiceUtil.updateStatus(TestPropsValues.getUserId(), dlFileVersion.getFileVersionId(), WorkflowConstants.STATUS_APPROVED, serviceContext, new HashMap<String, Serializable>()); QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); List<Long> repositoryIds = ListUtil.toList(new long[] { _group.getGroupId() }); List<Long> folderIds = ListUtil.toList(new long[] { DLFolderConstants.DEFAULT_PARENT_FOLDER_ID }); Assert.assertEquals(1, doCountBy_G_U_R_F_M(_user.getUserId(), repositoryIds, folderIds, null, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApproved() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(2, doCountBy_G_U_F_M(0, null, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByMimeType() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(1, doCountBy_G_U_F_M(0, ContentTypes.TEXT_PLAIN, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByMimeType_BothRepositories() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(2, doCountBy_G_U_R_F_M_BothRepositories(0, ContentTypes.TEXT_PLAIN, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByMimeType_DefaultRepository() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(1, doCountBy_G_U_R_F_M_DefaultRepository(0, ContentTypes.TEXT_PLAIN, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByMimeType_EmptyRepositories() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(2, doCountBy_G_U_R_F_M_EmptyRepositories(0, ContentTypes.TEXT_PLAIN, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByMimeType_NewRepository() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(1, doCountBy_G_U_R_F_M_NewRepository(0, ContentTypes.TEXT_PLAIN, queryDefinition)); }
From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java
License:Open Source License
@Test public void testCountByG_U_F_M_StatusApprovedByUserId() throws Exception { QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>(); queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED); Assert.assertEquals(1, doCountBy_G_U_F_M(_defaultRepositoryFolder.getUserId(), null, queryDefinition)); }