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 type, double version, java.lang.String displayStyle,
92 java.lang.String feedURL, java.lang.String tagURL)
93 throws com.liferay.portal.kernel.exception.PortalException,
94 com.liferay.portal.kernel.exception.SystemException {
95 return getService()
96 .getEntriesRSS(entryQuery, type, version, displayStyle,
97 feedURL, tagURL);
98 }
99
100 public static com.liferay.portlet.asset.model.AssetEntry getEntry(
101 long entryId)
102 throws com.liferay.portal.kernel.exception.PortalException,
103 com.liferay.portal.kernel.exception.SystemException {
104 return getService().getEntry(entryId);
105 }
106
107 public static com.liferay.portlet.asset.model.AssetEntry incrementViewCounter(
108 java.lang.String className, long classPK)
109 throws com.liferay.portal.kernel.exception.SystemException {
110 return getService().incrementViewCounter(className, classPK);
111 }
112
113 public static com.liferay.portlet.asset.model.AssetEntryDisplay[] searchEntryDisplays(
114 long companyId, java.lang.String portletId, java.lang.String keywords,
115 java.lang.String languageId, int start, int end)
116 throws com.liferay.portal.kernel.exception.SystemException {
117 return getService()
118 .searchEntryDisplays(companyId, portletId, keywords,
119 languageId, start, end);
120 }
121
122 public static int searchEntryDisplaysCount(long companyId,
123 java.lang.String portletId, java.lang.String keywords,
124 java.lang.String languageId)
125 throws com.liferay.portal.kernel.exception.SystemException {
126 return getService()
127 .searchEntryDisplaysCount(companyId, portletId, keywords,
128 languageId);
129 }
130
131 public static com.liferay.portlet.asset.model.AssetEntry updateEntry(
132 long groupId, java.lang.String className, long classPK,
133 long[] categoryIds, java.lang.String[] tagNames, boolean visible,
134 java.util.Date startDate, java.util.Date endDate,
135 java.util.Date publishDate, java.util.Date expirationDate,
136 java.lang.String mimeType, java.lang.String title,
137 java.lang.String description, java.lang.String summary,
138 java.lang.String url, int height, int width,
139 java.lang.Integer priority, boolean sync)
140 throws com.liferay.portal.kernel.exception.PortalException,
141 com.liferay.portal.kernel.exception.SystemException {
142 return getService()
143 .updateEntry(groupId, className, classPK, categoryIds,
144 tagNames, visible, startDate, endDate, publishDate, expirationDate,
145 mimeType, title, description, summary, url, height, width,
146 priority, sync);
147 }
148
149 public static AssetEntryService getService() {
150 if (_service == null) {
151 _service = (AssetEntryService)PortalBeanLocatorUtil.locate(AssetEntryService.class.getName());
152 }
153
154 return _service;
155 }
156
157 public void setService(AssetEntryService service) {
158 _service = service;
159 }
160
161 private static AssetEntryService _service;
162 }