1
14
15 package com.liferay.portlet.asset.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class AssetEntryServiceUtil {
40 public static void deleteEntry(long entryId)
41 throws com.liferay.portal.kernel.exception.PortalException,
42 com.liferay.portal.kernel.exception.SystemException {
43 getService().deleteEntry(entryId);
44 }
45
46 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getCompanyEntries(
47 long companyId, int start, int end)
48 throws com.liferay.portal.kernel.exception.SystemException {
49 return getService().getCompanyEntries(companyId, start, end);
50 }
51
52 public static int getCompanyEntriesCount(long companyId)
53 throws com.liferay.portal.kernel.exception.SystemException {
54 return getService().getCompanyEntriesCount(companyId);
55 }
56
57 public static java.lang.String getCompanyEntriesRSS(long companyId,
58 int max, java.lang.String type, double version,
59 java.lang.String displayStyle, java.lang.String feedURL,
60 java.lang.String tagURL)
61 throws com.liferay.portal.kernel.exception.PortalException,
62 com.liferay.portal.kernel.exception.SystemException {
63 return getService()
64 .getCompanyEntriesRSS(companyId, max, type, version,
65 displayStyle, feedURL, tagURL);
66 }
67
68 public static com.liferay.portlet.asset.model.AssetEntryDisplay[] getCompanyEntryDisplays(
69 long companyId, int start, int end, java.lang.String languageId)
70 throws com.liferay.portal.kernel.exception.SystemException {
71 return getService()
72 .getCompanyEntryDisplays(companyId, start, end, languageId);
73 }
74
75 public static java.util.List<com.liferay.portlet.asset.model.AssetEntry> getEntries(
76 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
77 throws com.liferay.portal.kernel.exception.PortalException,
78 com.liferay.portal.kernel.exception.SystemException {
79 return getService().getEntries(entryQuery);
80 }
81
82 public static int getEntriesCount(
83 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery)
84 throws com.liferay.portal.kernel.exception.PortalException,
85 com.liferay.portal.kernel.exception.SystemException {
86 return getService().getEntriesCount(entryQuery);
87 }
88
89 public static java.lang.String getEntriesRSS(
90 com.liferay.portlet.asset.service.persistence.AssetEntryQuery entryQuery,
91 java.lang.String name, java.lang.String type, double version,
92 java.lang.String displayStyle, java.lang.String feedURL,
93 java.lang.String tagURL)
94 throws com.liferay.portal.kernel.exception.PortalException,
95 com.liferay.portal.kernel.exception.SystemException {
96 return getService()
97 .getEntriesRSS(entryQuery, name, type, version,
98 displayStyle, feedURL, tagURL);
99 }
100
101 public static com.liferay.portlet.asset.model.AssetEntry getEntry(
102 long entryId)
103 throws com.liferay.portal.kernel.exception.PortalException,
104 com.liferay.portal.kernel.exception.SystemException {
105 return getService().getEntry(entryId);
106 }
107
108 public static void incrementViewCounter(java.lang.String className,
109 long classPK)
110 throws com.liferay.portal.kernel.exception.PortalException,
111 com.liferay.portal.kernel.exception.SystemException {
112 getService().incrementViewCounter(className, classPK);
113 }
114
115 public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
116 long companyId, java.lang.String portletId, java.lang.String keywords,
117 java.lang.String languageId, int start, int end)
118 throws com.liferay.portal.kernel.exception.SystemException {
119 return getService()
120 .searchEntryDisplays(companyId, portletId, keywords,
121 languageId, start, end);
122 }
123
124 public static int searchEntryDisplaysCount(long companyId,
125 java.lang.String portletId, java.lang.String keywords,
126 java.lang.String languageId)
127 throws com.liferay.portal.kernel.exception.SystemException {
128 return getService()
129 .searchEntryDisplaysCount(companyId, portletId, keywords,
130 languageId);
131 }
132
133 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
134 long groupId, java.lang.String className, long classPK,
135 long[] categoryIds, java.lang.String[] tagNames, boolean visible,
136 java.util.Date startDate, java.util.Date endDate,
137 java.util.Date publishDate, java.util.Date expirationDate,
138 java.lang.String mimeType, java.lang.String title,
139 java.lang.String description, java.lang.String summary,
140 java.lang.String url, int height, int width,
141 java.lang.Integer priority, boolean sync)
142 throws com.liferay.portal.kernel.exception.PortalException,
143 com.liferay.portal.kernel.exception.SystemException {
144 return getService()
145 .updateEntry(groupId, className, classPK, categoryIds,
146 tagNames, visible, startDate, endDate, publishDate, expirationDate,
147 mimeType, title, description, summary, url, height, width,
148 priority, sync);
149 }
150
151 public static AssetEntryService getService() {
152 if (_service == null) {
153 _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
154 }
155
156 return _service;
157 }
158
159 public void setService(AssetEntryService service) {
160 _service = service;
161 }
162
163 private static AssetEntryService _service;
164 }