List of usage examples for com.liferay.portal.kernel.service GroupLocalServiceUtil getFriendlyURLGroup
public static com.liferay.portal.kernel.model.Group getFriendlyURLGroup(long companyId, String friendlyURL) throws com.liferay.portal.kernel.exception.PortalException
From source file:com.liferay.document.library.webdav.test.WebDAVOSXTest.java
License:Open Source License
@Test public void testGetFileWithEscapedCharactersInFileName() throws Exception { FileEntry fileEntry = null;/* w w w .j a va 2 s.c om*/ try { Group group = GroupLocalServiceUtil.getFriendlyURLGroup(PortalUtil.getDefaultCompanyId(), getGroupFriendlyURL()); Folder folder = DLAppLocalServiceUtil.getFolder(group.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, getFolderName()); fileEntry = DLAppLocalServiceUtil.addFileEntry(TestPropsValues.getUserId(), group.getGroupId(), folder.getFolderId(), _TEST_FILE_NAME_ILLEGAL_CHARACTERS, ContentTypes.APPLICATION_MSWORD, _TEST_FILE_NAME_ILLEGAL_CHARACTERS, StringPool.BLANK, StringPool.BLANK, _testFileBytes, ServiceContextTestUtil.getServiceContext(group.getGroupId())); assertCode(HttpServletResponse.SC_OK, serviceGet(_TEST_FILE_NAME_ILLEGAL_CHARACTERS_ESCAPED)); } finally { if (fileEntry != null) { DLAppLocalServiceUtil.deleteFileEntry(fileEntry.getFileEntryId()); } } }