@Before public void setUp() throws Exception { _group = GroupTestUtil.addGroup(); String name = "Test Folder"; String description = "This is a test folder."; ServiceContext serviceContext = new ServiceContext(); serviceContext.setAddGroupPermissions(true); serviceContext.setAddGuestPermissions(true); serviceContext.setScopeGroupId(_group.getGroupId()); try { getDLAppServiceSoap() .deleteFolder(_group.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, name); } catch (Exception e) { } _folderSoap = getDLAppServiceSoap() .addFolder( _group.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, name, description, serviceContext); }
protected FileEntrySoap addFileEntry(String title) throws Exception { long folderId = _folderSoap.getFolderId(); String description = StringPool.BLANK; String changeLog = StringPool.BLANK; byte[] bytes = _CONTENT.getBytes(); ServiceContext serviceContext = new ServiceContext(); serviceContext.setAddGroupPermissions(true); serviceContext.setAddGuestPermissions(true); serviceContext.setScopeGroupId(_group.getGroupId()); return getDLAppServiceSoap() .addFileEntry( _group.getGroupId(), folderId, title, ContentTypes.TEXT_PLAIN, title, description, changeLog, bytes, serviceContext); }