1
14
15 package com.liferay.portlet.tags.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class TagsAssetServiceUtil {
42 public static void deleteAsset(long assetId)
43 throws com.liferay.portal.PortalException,
44 com.liferay.portal.SystemException {
45 getService().deleteAsset(assetId);
46 }
47
48 public static com.liferay.portlet.tags.model.TagsAsset getAsset(
49 long assetId)
50 throws com.liferay.portal.PortalException,
51 com.liferay.portal.SystemException {
52 return getService().getAsset(assetId);
53 }
54
55 public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getAssets(
56 long groupId, long[] classNameIds, long[] entryIds, long[] notEntryIds,
57 boolean andOperator, java.lang.String orderByCol1,
58 java.lang.String orderByCol2, java.lang.String orderByType1,
59 java.lang.String orderByType2, boolean excludeZeroViewCount,
60 java.util.Date publishDate, java.util.Date expirationDate, int start,
61 int end)
62 throws com.liferay.portal.PortalException,
63 com.liferay.portal.SystemException {
64 return getService()
65 .getAssets(groupId, classNameIds, entryIds, notEntryIds,
66 andOperator, orderByCol1, orderByCol2, orderByType1, orderByType2,
67 excludeZeroViewCount, publishDate, expirationDate, start, end);
68 }
69
70 public static int getAssetsCount(long groupId, long[] classNameIds,
71 long[] entryIds, long[] notEntryIds, boolean andOperator,
72 boolean excludeZeroViewCount, java.util.Date publishDate,
73 java.util.Date expirationDate)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 return getService()
77 .getAssetsCount(groupId, classNameIds, entryIds,
78 notEntryIds, andOperator, excludeZeroViewCount, publishDate,
79 expirationDate);
80 }
81
82 public static java.lang.String getAssetsRSS(long groupId,
83 long[] classNameIds, long[] entryIds, long[] notEntryIds,
84 boolean andOperator, java.lang.String orderByCol1,
85 java.lang.String orderByCol2, java.lang.String orderByType1,
86 java.lang.String orderByType2, boolean excludeZeroViewCount,
87 java.util.Date publishDate, java.util.Date expirationDate, int max,
88 java.lang.String type, double version, java.lang.String displayStyle,
89 java.lang.String feedURL, java.lang.String entryURL)
90 throws com.liferay.portal.PortalException,
91 com.liferay.portal.SystemException {
92 return getService()
93 .getAssetsRSS(groupId, classNameIds, entryIds, notEntryIds,
94 andOperator, orderByCol1, orderByCol2, orderByType1, orderByType2,
95 excludeZeroViewCount, publishDate, expirationDate, max, type,
96 version, displayStyle, feedURL, entryURL);
97 }
98
99 public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
100 java.lang.String languageId) {
101 return getService().getAssetTypes(languageId);
102 }
103
104 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
105 long companyId, int start, int end, java.lang.String languageId)
106 throws com.liferay.portal.SystemException {
107 return getService()
108 .getCompanyAssetDisplays(companyId, start, end, languageId);
109 }
110
111 public static java.util.List<com.liferay.portlet.tags.model.TagsAsset> getCompanyAssets(
112 long companyId, int start, int end)
113 throws com.liferay.portal.SystemException {
114 return getService().getCompanyAssets(companyId, start, end);
115 }
116
117 public static int getCompanyAssetsCount(long companyId)
118 throws com.liferay.portal.SystemException {
119 return getService().getCompanyAssetsCount(companyId);
120 }
121
122 public static java.lang.String getCompanyAssetsRSS(long companyId, int max,
123 java.lang.String type, double version, java.lang.String displayStyle,
124 java.lang.String feedURL, java.lang.String entryURL)
125 throws com.liferay.portal.PortalException,
126 com.liferay.portal.SystemException {
127 return getService()
128 .getCompanyAssetsRSS(companyId, max, type, version,
129 displayStyle, feedURL, entryURL);
130 }
131
132 public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
133 java.lang.String className, long classPK)
134 throws com.liferay.portal.SystemException {
135 return getService().incrementViewCounter(className, classPK);
136 }
137
138 public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
139 long companyId, java.lang.String portletId, java.lang.String keywords,
140 java.lang.String languageId, int start, int end)
141 throws com.liferay.portal.SystemException {
142 return getService()
143 .searchAssetDisplays(companyId, portletId, keywords,
144 languageId, start, end);
145 }
146
147 public static int searchAssetDisplaysCount(long companyId,
148 java.lang.String portletId, java.lang.String keywords,
149 java.lang.String languageId) throws com.liferay.portal.SystemException {
150 return getService()
151 .searchAssetDisplaysCount(companyId, portletId, keywords,
152 languageId);
153 }
154
155 public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
156 long groupId, java.lang.String className, long classPK,
157 java.lang.String[] categoryNames, java.lang.String[] entryNames,
158 boolean visible, java.util.Date startDate, java.util.Date endDate,
159 java.util.Date publishDate, java.util.Date expirationDate,
160 java.lang.String mimeType, java.lang.String title,
161 java.lang.String description, java.lang.String summary,
162 java.lang.String url, int height, int width, java.lang.Integer priority)
163 throws com.liferay.portal.PortalException,
164 com.liferay.portal.SystemException {
165 return getService()
166 .updateAsset(groupId, className, classPK, categoryNames,
167 entryNames, visible, startDate, endDate, publishDate,
168 expirationDate, mimeType, title, description, summary, url, height,
169 width, priority);
170 }
171
172 public static TagsAssetService getService() {
173 if (_service == null) {
174 _service = (TagsAssetService)PortalBeanLocatorUtil.locate(TagsAssetService.class.getName());
175
176 ReferenceRegistry.registerReference(TagsAssetServiceUtil.class,
177 "_service");
178 MethodCache.remove(TagsAssetService.class);
179 }
180
181 return _service;
182 }
183
184 public void setService(TagsAssetService service) {
185 MethodCache.remove(TagsAssetService.class);
186
187 _service = service;
188
189 ReferenceRegistry.registerReference(TagsAssetServiceUtil.class,
190 "_service");
191 MethodCache.remove(TagsAssetService.class);
192 }
193
194 private static TagsAssetService _service;
195 }