001
014
015 package com.liferay.portlet.asset.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class AssetEntryServiceUtil {
035
040 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getCompanyEntries(
041 long companyId, int start, int end)
042 throws com.liferay.portal.kernel.exception.SystemException {
043 return getService().getCompanyEntries(companyId, start, end);
044 }
045
046 public static int getCompanyEntriesCount(long companyId)
047 throws com.liferay.portal.kernel.exception.SystemException {
048 return getService().getCompanyEntriesCount(companyId);
049 }
050
051 public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
052 long companyId, int start, int end, java.lang.String languageId)
053 throws com.liferay.portal.kernel.exception.SystemException {
054 return getService()
055 .getCompanyEntryDisplays(companyId, start, end, languageId);
056 }
057
058 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
059 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 return getService().getEntries(entryQuery);
063 }
064
065 public static int getEntriesCount(
066 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
067 throws com.liferay.portal.kernel.exception.PortalException,
068 com.liferay.portal.kernel.exception.SystemException {
069 return getService().getEntriesCount(entryQuery);
070 }
071
072 public static com.liferay.portlet.asset.model.AssetEntry getEntry(
073 long entryId)
074 throws com.liferay.portal.kernel.exception.PortalException,
075 com.liferay.portal.kernel.exception.SystemException {
076 return getService().getEntry(entryId);
077 }
078
079 public static com.liferay.portlet.asset.model.AssetEntry incrementViewCounter(
080 java.lang.String className, long classPK)
081 throws com.liferay.portal.kernel.exception.PortalException,
082 com.liferay.portal.kernel.exception.SystemException {
083 return getService().incrementViewCounter(className, classPK);
084 }
085
086 public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
087 long companyId, long[] groupIds, java.lang.String className,
088 java.lang.String keywords, java.lang.String languageId, int start,
089 int end) throws com.liferay.portal.kernel.exception.SystemException {
090 return getService()
091 .searchEntryDisplays(companyId, groupIds, className,
092 keywords, languageId, start, end);
093 }
094
095 public static int searchEntryDisplaysCount(long companyId, long[] groupIds,
096 java.lang.String className, java.lang.String keywords,
097 java.lang.String languageId)
098 throws com.liferay.portal.kernel.exception.SystemException {
099 return getService()
100 .searchEntryDisplaysCount(companyId, groupIds, className,
101 keywords, languageId);
102 }
103
104 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
105 long groupId, java.lang.String className, long classPK,
106 java.lang.String classUuid, long classTypeId, long[] categoryIds,
107 java.lang.String[] tagNames, boolean visible, java.util.Date startDate,
108 java.util.Date endDate, java.util.Date publishDate,
109 java.util.Date expirationDate, java.lang.String mimeType,
110 java.lang.String title, java.lang.String description,
111 java.lang.String summary, java.lang.String url,
112 java.lang.String layoutUuid, int height, int width,
113 java.lang.Integer priority, boolean sync)
114 throws com.liferay.portal.kernel.exception.PortalException,
115 com.liferay.portal.kernel.exception.SystemException {
116 return getService()
117 .updateEntry(groupId, className, classPK, classUuid,
118 classTypeId, categoryIds, tagNames, visible, startDate, endDate,
119 publishDate, expirationDate, mimeType, title, description, summary,
120 url, layoutUuid, height, width, priority, sync);
121 }
122
123 public static AssetEntryService getService() {
124 if (_service == null) {
125 _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
126
127 ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
128 "_service");
129 MethodCache.remove(AssetEntryService.class);
130 }
131
132 return _service;
133 }
134
135 public void setService(AssetEntryService service) {
136 MethodCache.remove(AssetEntryService.class);
137
138 _service = service;
139
140 ReferenceRegistry.registerReference(AssetEntryServiceUtil.class,
141 "_service");
142 MethodCache.remove(AssetEntryService.class);
143 }
144
145 private static AssetEntryService _service;
146 }