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.softwarecatalog.service;
022:
023: /**
024: * <a href="SCProductVersionServiceUtil.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.softwarecatalog.service.SCProductVersionService</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.softwarecatalog.service.SCProductVersionServiceFactory</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.softwarecatalog.service.SCProductVersionService
047: * @see com.liferay.portlet.softwarecatalog.service.SCProductVersionServiceFactory
048: *
049: */
050: public class SCProductVersionServiceUtil {
051: public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
052: long productEntryId, java.lang.String version,
053: java.lang.String changeLog,
054: java.lang.String downloadPageURL,
055: java.lang.String directDownloadURL,
056: boolean repoStoreArtifact, long[] frameworkVersionIds,
057: boolean addCommunityPermissions, boolean addGuestPermissions)
058: throws com.liferay.portal.PortalException,
059: com.liferay.portal.SystemException,
060: java.rmi.RemoteException {
061: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
062: .getService();
063:
064: return scProductVersionService.addProductVersion(
065: productEntryId, version, changeLog, downloadPageURL,
066: directDownloadURL, repoStoreArtifact,
067: frameworkVersionIds, addCommunityPermissions,
068: addGuestPermissions);
069: }
070:
071: public static com.liferay.portlet.softwarecatalog.model.SCProductVersion addProductVersion(
072: long productEntryId, java.lang.String version,
073: java.lang.String changeLog,
074: java.lang.String downloadPageURL,
075: java.lang.String directDownloadURL,
076: boolean repoStoreArtifact, long[] frameworkVersionIds,
077: java.lang.String[] communityPermissions,
078: java.lang.String[] guestPermissions)
079: throws com.liferay.portal.PortalException,
080: com.liferay.portal.SystemException,
081: java.rmi.RemoteException {
082: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
083: .getService();
084:
085: return scProductVersionService.addProductVersion(
086: productEntryId, version, changeLog, downloadPageURL,
087: directDownloadURL, repoStoreArtifact,
088: frameworkVersionIds, communityPermissions,
089: guestPermissions);
090: }
091:
092: public static void deleteProductVersion(long productVersionId)
093: throws com.liferay.portal.PortalException,
094: com.liferay.portal.SystemException,
095: java.rmi.RemoteException {
096: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
097: .getService();
098:
099: scProductVersionService.deleteProductVersion(productVersionId);
100: }
101:
102: public static com.liferay.portlet.softwarecatalog.model.SCProductVersion getProductVersion(
103: long productVersionId)
104: throws com.liferay.portal.PortalException,
105: com.liferay.portal.SystemException,
106: java.rmi.RemoteException {
107: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
108: .getService();
109:
110: return scProductVersionService
111: .getProductVersion(productVersionId);
112: }
113:
114: public static java.util.List getProductVersions(
115: long productEntryId, int begin, int end)
116: throws com.liferay.portal.PortalException,
117: com.liferay.portal.SystemException,
118: java.rmi.RemoteException {
119: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
120: .getService();
121:
122: return scProductVersionService.getProductVersions(
123: productEntryId, begin, end);
124: }
125:
126: public static int getProductVersionsCount(long productEntryId)
127: throws com.liferay.portal.PortalException,
128: com.liferay.portal.SystemException,
129: java.rmi.RemoteException {
130: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
131: .getService();
132:
133: return scProductVersionService
134: .getProductVersionsCount(productEntryId);
135: }
136:
137: public static com.liferay.portlet.softwarecatalog.model.SCProductVersion updateProductVersion(
138: long productVersionId, java.lang.String version,
139: java.lang.String changeLog,
140: java.lang.String downloadPageURL,
141: java.lang.String directDownloadURL,
142: boolean repoStoreArtifact, long[] frameworkVersionIds)
143: throws com.liferay.portal.PortalException,
144: com.liferay.portal.SystemException,
145: java.rmi.RemoteException {
146: SCProductVersionService scProductVersionService = SCProductVersionServiceFactory
147: .getService();
148:
149: return scProductVersionService.updateProductVersion(
150: productVersionId, version, changeLog, downloadPageURL,
151: directDownloadURL, repoStoreArtifact,
152: frameworkVersionIds);
153: }
154: }
|