本文整理汇总了Java中com.liferay.portlet.documentlibrary.model.DLFileEntry.getGroupId方法的典型用法代码示例。如果您正苦于以下问题:Java DLFileEntry.getGroupId方法的具体用法?Java DLFileEntry.getGroupId怎么用?Java DLFileEntry.getGroupId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portlet.documentlibrary.model.DLFileEntry
的用法示例。
在下文中一共展示了DLFileEntry.getGroupId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getUploadList
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
public List<ResultItem> getUploadList(Long id) {
List<FieldResult> fieldResults = formController.getFieldResults(id);
List<ResultItem> resultItems = new ArrayList<ResultItem>();
for (FieldResult fieldResult : fieldResults) {
if (fieldResult.getContent() != null && !fieldResult.getContent().isEmpty()) {
Date date = fieldResult.getResult().getCreated();
List<ResultItem> items = new ArrayList<ResultItem>();
for (String fileEntryId : fieldResult.getContent().split("\\,")) {
try {
DLFileEntry dlFileEntry = DLFileEntryLocalServiceUtil.getDLFileEntry(new Long(fileEntryId));
String name = dlFileEntry.getTitle();
String content = "/../documents/" + dlFileEntry.getGroupId() + "/" + dlFileEntry.getFolderId() + "/" + URLEncoder.encode(dlFileEntry.getTitle(), "UTF-8") + "/" + dlFileEntry.getUuid();
items.add(new ResultItem(name, content));
} catch (Exception e) {
e.printStackTrace();
}
}
resultItems.add(new ResultItem(date, items));
}
}
return resultItems;
}
示例2: usePreviewImage
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
public void usePreviewImage(Field field) throws NumberFormatException, PortalException, SystemException, UnsupportedEncodingException {
DLFileEntry dlFileEntry = DLFileEntryLocalServiceUtil.getDLFileEntry(new Long(this.tempDocument.getId()));
String url = "/../documents/" + dlFileEntry.getGroupId() + "/" + dlFileEntry.getFolderId() + "/" + URLEncoder.encode(dlFileEntry.getTitle(), "UTF-8") + "/" + dlFileEntry.getUuid();
field.getValue().setContent(url);
}