本文整理汇总了Java中com.liferay.portlet.documentlibrary.model.DLFileEntry.getVersion方法的典型用法代码示例。如果您正苦于以下问题:Java DLFileEntry.getVersion方法的具体用法?Java DLFileEntry.getVersion怎么用?Java DLFileEntry.getVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.liferay.portlet.documentlibrary.model.DLFileEntry
的用法示例。
在下文中一共展示了DLFileEntry.getVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIconURL
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
public String getIconURL(long applicationId) throws Exception {
String result = "";
try {
// _log.debug("getIconURL(applicationId " + applicationId + ")");
Application application = applicationLocalService.getApplication(applicationId);
if (application.getLogoImageId() != 0) {
DLFileEntry fe = DLFileEntryLocalServiceUtil.getDLFileEntry(application.getLogoImageId());
result = "http://localhost/documents/10180/0/" +
HttpUtil.encodeURL(HtmlUtil.unescape(fe.getTitle())) +
StringPool.SLASH +
fe.getUuid() +
"?version=" + fe.getVersion() +
"&t=" + fe.getModifiedDate().getTime() +
"&imageThumbnail=1";
}
} catch (SystemException se) {
_log.error("applicationId: " + applicationId);
_log.error(se.getMessage());
} catch (PortalException pe) {
_log.error("applicationId: " + applicationId);
_log.error(pe.getMessage());
}
return result;
}
示例2: getExternIconURL
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
private String getExternIconURL(Application application) throws Exception {
String result = "";
try {
if (application.getLogoImageId() != 0) {
DLFileEntry fe = DLFileEntryLocalServiceUtil.getDLFileEntry(application.getLogoImageId());
result = "http://" + AppConstants.COMPANY_VIRTUAL_HOST + "/documents/10180/0/" +
HttpUtil.encodeURL(HtmlUtil.unescape(fe.getTitle())) +
StringPool.SLASH +
fe.getUuid() +
"?version=" + fe.getVersion() +
"&t=" + fe.getModifiedDate().getTime() +
"&imageThumbnail=1";
}
} catch (SystemException se) {
_log.error(se.getMessage());
} catch (PortalException pe) {
_log.error(pe.getMessage());
}
return result;
}
示例3: getNewApplications
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
public List<List> getNewApplications(long companyId, int year, int month, int day, int count) throws SystemException {
List<List> result = new ArrayList<List>();
Date modifiedDate = PortalUtil.getDate(month, day, year);
Date now = new Date();
List<Application> applications = applicationPersistence.findAll();
List<Application> applications2 = new ArrayList<Application>();
for (Application app: applications) {
applications2.add(app);
}
OrderByComparator orderByComparator = CustomComparatorUtil.getApplicationOrderByComparator("modifiedDate", "desc");
Collections.sort(applications2, orderByComparator);
applications2 = applications2.subList(0, count);
for (Application application: applications2) {
if (application.getLifeCycleStatus() >= 4) {
List toAdd = new ArrayList();
toAdd.add(application);
DLFileEntry fe;
try {
fe = DLFileEntryLocalServiceUtil.getDLFileEntry(application.getLogoImageId());
String iconUrl = "http://localhost/documents/10180/0/" +
HttpUtil.encodeURL(HtmlUtil.unescape(fe.getTitle())) +
StringPool.SLASH +
fe.getUuid() +
"?version=" + fe.getVersion() +
"&t=" + fe.getModifiedDate().getTime() +
"&imageThumbnail=1";
toAdd.add(iconUrl);
} catch (PortalException e) {
_log.error(e.getMessage());
}
result.add(toAdd);
}
}
return result;
}
示例4: getNewApplications
import com.liferay.portlet.documentlibrary.model.DLFileEntry; //导入方法依赖的package包/类
public List<List> getNewApplications(long companyId, int year, int month, int day, int count) throws SystemException {
_log.debug("getNewApplications2: ");
List<List> result = new ArrayList<List>();
try {
Date modifiedDate = PortalUtil.getDate(month, day, year);
Date now = new Date();
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Application.class);
Criterion criterion = null;
criterion = RestrictionsFactoryUtil.between("modifiedDate",modifiedDate,now);
dynamicQuery.add(criterion);
dynamicQuery.add(PropertyFactoryUtil.forName("lifeCycleStatus").eq(E_Stati.APPLICATION_STATUS_VERIFIED.getIntStatus()));
Order defaultOrder = OrderFactoryUtil.desc("modifiedDate");
dynamicQuery.addOrder(defaultOrder);
dynamicQuery.setLimit(0, count);
List<Application> applications = ApplicationLocalServiceUtil.dynamicQuery(dynamicQuery);
for (Application application: applications) {
List toAdd = new ArrayList();
toAdd.add(application);
if (application.getLogoImageId() != 0) {
DLFileEntry fe;
fe = DLFileEntryLocalServiceUtil.getDLFileEntry(application.getLogoImageId());
//String iconUrl = "http://localhost/documents/10180/0/" + HttpUtil.encodeURL(fe.getTitle(), true);
String iconUrl = "http://localhost/documents/10180/0/" +
HttpUtil.encodeURL(HtmlUtil.unescape(fe.getTitle())) +
StringPool.SLASH +
fe.getUuid() +
"?version=" + fe.getVersion() +
"&t=" + fe.getModifiedDate().getTime() +
"&imageThumbnail=1";
toAdd.add(iconUrl);
}
result.add(toAdd);
}
} catch (Exception e) {
_log.error(e.getMessage());
e.printStackTrace();
}
return result;
}