forked from liferay/liferay-portal
/
dl_folders.ftl
23 lines (16 loc) · 1.51 KB
/
dl_folders.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<#include "macro.ftl">
<#if (dlFolderDepth <= maxDLFolderDepth)>
<#list 1..maxDLFolderCount as dlFolderCount>
<#assign dlFolder = dataFactory.newDLFolder(groupId, parentDLFolderId, dlFolderCount)>
insert into DLFolder values ('${dlFolder.uuid}', ${dlFolder.folderId}, ${dlFolder.groupId}, ${dlFolder.companyId}, ${dlFolder.userId}, '${dlFolder.userName}', '${dataFactory.getDateString(dlFolder.createDate)}', '${dataFactory.getDateString(dlFolder.modifiedDate)}', ${dlFolder.repositoryId}, ${dlFolder.mountPoint?string}, ${dlFolder.parentFolderId}, '${dlFolder.name}', '${dlFolder.description}', '${dataFactory.getDateString(dlFolder.lastPostDate)}', ${dlFolder.defaultFileEntryTypeId}, ${dlFolder.hidden?string}, ${dlFolder.overrideFileEntryTypes?string}, ${dlFolder.status}, ${dlFolder.statusByUserId}, '${dlFolder.statusByUserName}', '${dataFactory.getDateString(dlFolder.statusDate)}');
<#if (maxDLFileEntryCount > 0)>
<#list 1..maxDLFileEntryCount as dlFileEntryCount>
<#assign dlFileEntry = dataFactory.newDlFileEntry(dlFolder, dlFileEntryCount)>
${sampleSQLBuilder.insertDLFileEntry(dlFileEntry, ddmStructureId)}
${writerDocumentLibraryCSV.write(dlFolder.folderId + "," + dlFileEntry.name + "," + dlFileEntry.fileEntryId + "," + dataFactory.getDateLong(dlFileEntry.createDate) + "," + dataFactory.getDateLong(dlFolder.createDate) +"\n")}
</#list>
</#if>
${sampleSQLBuilder.insertDLFolders(groupId, dlFolder.folderId, dlFolderDepth + 1, ddmStructureId)}
<@insertDLSync _entry = dlFolder/>
</#list>
</#if>