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.documentlibrary.service;
022:
023: /**
024: * <a href="DLFolderServiceUtil.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.documentlibrary.service.DLFolderService</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.documentlibrary.service.DLFolderServiceFactory</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.documentlibrary.service.DLFolderService
047: * @see com.liferay.portlet.documentlibrary.service.DLFolderServiceFactory
048: *
049: */
050: public class DLFolderServiceUtil {
051: public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
052: long plid, long parentFolderId, java.lang.String name,
053: java.lang.String description,
054: boolean addCommunityPermissions, boolean addGuestPermissions)
055: throws com.liferay.portal.PortalException,
056: com.liferay.portal.SystemException,
057: java.rmi.RemoteException {
058: DLFolderService dlFolderService = DLFolderServiceFactory
059: .getService();
060:
061: return dlFolderService.addFolder(plid, parentFolderId, name,
062: description, addCommunityPermissions,
063: addGuestPermissions);
064: }
065:
066: public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
067: long plid, long parentFolderId, java.lang.String name,
068: java.lang.String description,
069: java.lang.String[] communityPermissions,
070: java.lang.String[] guestPermissions)
071: throws com.liferay.portal.PortalException,
072: com.liferay.portal.SystemException,
073: java.rmi.RemoteException {
074: DLFolderService dlFolderService = DLFolderServiceFactory
075: .getService();
076:
077: return dlFolderService.addFolder(plid, parentFolderId, name,
078: description, communityPermissions, guestPermissions);
079: }
080:
081: public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
082: long plid, long sourceFolderId, long parentFolderId,
083: java.lang.String name, java.lang.String description,
084: boolean addCommunityPermissions, boolean addGuestPermissions)
085: throws com.liferay.portal.PortalException,
086: com.liferay.portal.SystemException,
087: java.rmi.RemoteException {
088: DLFolderService dlFolderService = DLFolderServiceFactory
089: .getService();
090:
091: return dlFolderService.copyFolder(plid, sourceFolderId,
092: parentFolderId, name, description,
093: addCommunityPermissions, addGuestPermissions);
094: }
095:
096: public static void deleteFolder(long folderId)
097: throws com.liferay.portal.PortalException,
098: com.liferay.portal.SystemException,
099: java.rmi.RemoteException {
100: DLFolderService dlFolderService = DLFolderServiceFactory
101: .getService();
102:
103: dlFolderService.deleteFolder(folderId);
104: }
105:
106: public static void deleteFolder(long groupId, long parentFolderId,
107: java.lang.String name)
108: throws com.liferay.portal.PortalException,
109: com.liferay.portal.SystemException,
110: java.rmi.RemoteException {
111: DLFolderService dlFolderService = DLFolderServiceFactory
112: .getService();
113:
114: dlFolderService.deleteFolder(groupId, parentFolderId, name);
115: }
116:
117: public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
118: long folderId) throws com.liferay.portal.PortalException,
119: com.liferay.portal.SystemException,
120: java.rmi.RemoteException {
121: DLFolderService dlFolderService = DLFolderServiceFactory
122: .getService();
123:
124: return dlFolderService.getFolder(folderId);
125: }
126:
127: public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
128: long groupId, long parentFolderId, java.lang.String name)
129: throws com.liferay.portal.PortalException,
130: com.liferay.portal.SystemException,
131: java.rmi.RemoteException {
132: DLFolderService dlFolderService = DLFolderServiceFactory
133: .getService();
134:
135: return dlFolderService.getFolder(groupId, parentFolderId, name);
136: }
137:
138: public static long getFolderId(long groupId, long parentFolderId,
139: java.lang.String name)
140: throws com.liferay.portal.PortalException,
141: com.liferay.portal.SystemException,
142: java.rmi.RemoteException {
143: DLFolderService dlFolderService = DLFolderServiceFactory
144: .getService();
145:
146: return dlFolderService.getFolderId(groupId, parentFolderId,
147: name);
148: }
149:
150: public static void reIndexSearch(long companyId)
151: throws com.liferay.portal.PortalException,
152: com.liferay.portal.SystemException,
153: java.rmi.RemoteException {
154: DLFolderService dlFolderService = DLFolderServiceFactory
155: .getService();
156:
157: dlFolderService.reIndexSearch(companyId);
158: }
159:
160: public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
161: long folderId, long parentFolderId, java.lang.String name,
162: java.lang.String description)
163: throws com.liferay.portal.PortalException,
164: com.liferay.portal.SystemException,
165: java.rmi.RemoteException {
166: DLFolderService dlFolderService = DLFolderServiceFactory
167: .getService();
168:
169: return dlFolderService.updateFolder(folderId, parentFolderId,
170: name, description);
171: }
172: }
|