001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.portlet.tags.service;
022:
023: /**
024: * <a href="TagsAssetServiceUtil.java.html"><b><i>View Source</i></b></a>
025: *
026: * <p>
027: * ServiceBuilder generated this class. Modifications in this class will be
028: * overwritten the next time is generated.
029: * </p>
030: *
031: * <p>
032: * This class provides static methods for the
033: * <code>com.liferay.portlet.tags.service.TagsAssetService</code>
034: * bean. The static methods of this class calls the same methods of the bean
035: * instance. It's convenient to be able to just write one line to call a method
036: * on a bean instead of writing a lookup call and a method call.
037: * </p>
038: *
039: * <p>
040: * <code>com.liferay.portlet.tags.service.TagsAssetServiceFactory</code>
041: * is responsible for the lookup of the bean.
042: * </p>
043: *
044: * @author Brian Wing Shun Chan
045: *
046: * @see com.liferay.portlet.tags.service.TagsAssetService
047: * @see com.liferay.portlet.tags.service.TagsAssetServiceFactory
048: *
049: */
050: public class TagsAssetServiceUtil {
051: public static void deleteAsset(long assetId)
052: throws com.liferay.portal.PortalException,
053: com.liferay.portal.SystemException,
054: java.rmi.RemoteException {
055: TagsAssetService tagsAssetService = TagsAssetServiceFactory
056: .getService();
057:
058: tagsAssetService.deleteAsset(assetId);
059: }
060:
061: public static com.liferay.portlet.tags.model.TagsAsset getAsset(
062: long assetId) throws com.liferay.portal.PortalException,
063: com.liferay.portal.SystemException,
064: java.rmi.RemoteException {
065: TagsAssetService tagsAssetService = TagsAssetServiceFactory
066: .getService();
067:
068: return tagsAssetService.getAsset(assetId);
069: }
070:
071: public static java.lang.String getAssetsRSS(long groupId,
072: long[] classNameIds, long[] entryIds, long[] notEntryIds,
073: boolean andOperator, java.lang.String orderByCol1,
074: java.lang.String orderByCol2,
075: java.lang.String orderByType1,
076: java.lang.String orderByType2,
077: boolean excludeZeroViewCount, java.util.Date publishDate,
078: java.util.Date expirationDate, int max,
079: java.lang.String type, double version,
080: java.lang.String displayStyle, java.lang.String feedURL,
081: java.lang.String entryURL)
082: throws com.liferay.portal.PortalException,
083: com.liferay.portal.SystemException,
084: java.rmi.RemoteException {
085: TagsAssetService tagsAssetService = TagsAssetServiceFactory
086: .getService();
087:
088: return tagsAssetService.getAssetsRSS(groupId, classNameIds,
089: entryIds, notEntryIds, andOperator, orderByCol1,
090: orderByCol2, orderByType1, orderByType2,
091: excludeZeroViewCount, publishDate, expirationDate, max,
092: type, version, displayStyle, feedURL, entryURL);
093: }
094:
095: public static com.liferay.portlet.tags.model.TagsAssetType[] getAssetTypes(
096: java.lang.String languageId)
097: throws java.rmi.RemoteException {
098: TagsAssetService tagsAssetService = TagsAssetServiceFactory
099: .getService();
100:
101: return tagsAssetService.getAssetTypes(languageId);
102: }
103:
104: public static com.liferay.portlet.tags.model.TagsAssetDisplay[] getCompanyAssetDisplays(
105: long companyId, int begin, int end,
106: java.lang.String languageId)
107: throws com.liferay.portal.PortalException,
108: com.liferay.portal.SystemException,
109: java.rmi.RemoteException {
110: TagsAssetService tagsAssetService = TagsAssetServiceFactory
111: .getService();
112:
113: return tagsAssetService.getCompanyAssetDisplays(companyId,
114: begin, end, languageId);
115: }
116:
117: public static java.util.List getCompanyAssets(long companyId,
118: int begin, int end)
119: throws com.liferay.portal.SystemException,
120: java.rmi.RemoteException {
121: TagsAssetService tagsAssetService = TagsAssetServiceFactory
122: .getService();
123:
124: return tagsAssetService.getCompanyAssets(companyId, begin, end);
125: }
126:
127: public static int getCompanyAssetsCount(long companyId)
128: throws com.liferay.portal.SystemException,
129: java.rmi.RemoteException {
130: TagsAssetService tagsAssetService = TagsAssetServiceFactory
131: .getService();
132:
133: return tagsAssetService.getCompanyAssetsCount(companyId);
134: }
135:
136: public static java.lang.String getCompanyAssetsRSS(long companyId,
137: int max, java.lang.String type, double version,
138: java.lang.String displayStyle, java.lang.String feedURL,
139: java.lang.String entryURL)
140: throws com.liferay.portal.PortalException,
141: com.liferay.portal.SystemException,
142: java.rmi.RemoteException {
143: TagsAssetService tagsAssetService = TagsAssetServiceFactory
144: .getService();
145:
146: return tagsAssetService.getCompanyAssetsRSS(companyId, max,
147: type, version, displayStyle, feedURL, entryURL);
148: }
149:
150: public static com.liferay.portlet.tags.model.TagsAsset incrementViewCounter(
151: java.lang.String className, long classPK)
152: throws com.liferay.portal.PortalException,
153: com.liferay.portal.SystemException,
154: java.rmi.RemoteException {
155: TagsAssetService tagsAssetService = TagsAssetServiceFactory
156: .getService();
157:
158: return tagsAssetService
159: .incrementViewCounter(className, classPK);
160: }
161:
162: public static com.liferay.portlet.tags.model.TagsAssetDisplay[] searchAssetDisplays(
163: long companyId, java.lang.String portletId,
164: java.lang.String keywords, java.lang.String languageId,
165: int begin, int end)
166: throws com.liferay.portal.PortalException,
167: com.liferay.portal.SystemException,
168: java.rmi.RemoteException {
169: TagsAssetService tagsAssetService = TagsAssetServiceFactory
170: .getService();
171:
172: return tagsAssetService.searchAssetDisplays(companyId,
173: portletId, keywords, languageId, begin, end);
174: }
175:
176: public static int searchAssetDisplaysCount(long companyId,
177: java.lang.String portletId, java.lang.String keywords,
178: java.lang.String languageId)
179: throws com.liferay.portal.SystemException,
180: java.rmi.RemoteException {
181: TagsAssetService tagsAssetService = TagsAssetServiceFactory
182: .getService();
183:
184: return tagsAssetService.searchAssetDisplaysCount(companyId,
185: portletId, keywords, languageId);
186: }
187:
188: public static com.liferay.portlet.tags.model.TagsAsset updateAsset(
189: long groupId, java.lang.String className, long classPK,
190: java.lang.String[] entryNames, java.util.Date startDate,
191: java.util.Date endDate, java.util.Date publishDate,
192: java.util.Date expirationDate, java.lang.String mimeType,
193: java.lang.String title, java.lang.String description,
194: java.lang.String summary, java.lang.String url, int height,
195: int width, java.lang.Integer priority)
196: throws com.liferay.portal.PortalException,
197: com.liferay.portal.SystemException,
198: java.rmi.RemoteException {
199: TagsAssetService tagsAssetService = TagsAssetServiceFactory
200: .getService();
201:
202: return tagsAssetService.updateAsset(groupId, className,
203: classPK, entryNames, startDate, endDate, publishDate,
204: expirationDate, mimeType, title, description, summary,
205: url, height, width, priority);
206: }
207: }
|