1
14
15 package com.liferay.portlet.documentlibrary.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class DLFolderServiceUtil {
40 public static com.liferay.portlet.documentlibrary.model.DLFolder addFolder(
41 long groupId, long parentFolderId, java.lang.String name,
42 java.lang.String description,
43 com.liferay.portal.service.ServiceContext serviceContext)
44 throws com.liferay.portal.kernel.exception.PortalException,
45 com.liferay.portal.kernel.exception.SystemException {
46 return getService()
47 .addFolder(groupId, parentFolderId, name, description,
48 serviceContext);
49 }
50
51 public static com.liferay.portlet.documentlibrary.model.DLFolder copyFolder(
52 long groupId, long sourceFolderId, long parentFolderId,
53 java.lang.String name, java.lang.String description,
54 com.liferay.portal.service.ServiceContext serviceContext)
55 throws com.liferay.portal.kernel.exception.PortalException,
56 com.liferay.portal.kernel.exception.SystemException,
57 java.rmi.RemoteException {
58 return getService()
59 .copyFolder(groupId, sourceFolderId, parentFolderId, name,
60 description, serviceContext);
61 }
62
63 public static void deleteFolder(long folderId)
64 throws com.liferay.portal.kernel.exception.PortalException,
65 com.liferay.portal.kernel.exception.SystemException,
66 java.rmi.RemoteException {
67 getService().deleteFolder(folderId);
68 }
69
70 public static void deleteFolder(long groupId, long parentFolderId,
71 java.lang.String name)
72 throws com.liferay.portal.kernel.exception.PortalException,
73 com.liferay.portal.kernel.exception.SystemException,
74 java.rmi.RemoteException {
75 getService().deleteFolder(groupId, parentFolderId, name);
76 }
77
78 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
79 long folderId)
80 throws com.liferay.portal.kernel.exception.PortalException,
81 com.liferay.portal.kernel.exception.SystemException {
82 return getService().getFolder(folderId);
83 }
84
85 public static com.liferay.portlet.documentlibrary.model.DLFolder getFolder(
86 long groupId, long parentFolderId, java.lang.String name)
87 throws com.liferay.portal.kernel.exception.PortalException,
88 com.liferay.portal.kernel.exception.SystemException {
89 return getService().getFolder(groupId, parentFolderId, name);
90 }
91
92 public static long getFolderId(long groupId, long parentFolderId,
93 java.lang.String name)
94 throws com.liferay.portal.kernel.exception.PortalException,
95 com.liferay.portal.kernel.exception.SystemException {
96 return getService().getFolderId(groupId, parentFolderId, name);
97 }
98
99 public static java.util.List<com.liferay.portlet.documentlibrary.model.DLFolder> getFolders(
100 long groupId, long parentFolderId)
101 throws com.liferay.portal.kernel.exception.PortalException,
102 com.liferay.portal.kernel.exception.SystemException {
103 return getService().getFolders(groupId, parentFolderId);
104 }
105
106 public static boolean hasInheritableLock(long folderId)
107 throws com.liferay.portal.kernel.exception.PortalException,
108 com.liferay.portal.kernel.exception.SystemException {
109 return getService().hasInheritableLock(folderId);
110 }
111
112 public static com.liferay.portal.model.Lock lockFolder(long folderId)
113 throws com.liferay.portal.kernel.exception.PortalException,
114 com.liferay.portal.kernel.exception.SystemException,
115 java.rmi.RemoteException {
116 return getService().lockFolder(folderId);
117 }
118
119 public static com.liferay.portal.model.Lock lockFolder(long folderId,
120 java.lang.String owner, boolean inheritable, long expirationTime)
121 throws com.liferay.portal.kernel.exception.PortalException,
122 com.liferay.portal.kernel.exception.SystemException,
123 java.rmi.RemoteException {
124 return getService()
125 .lockFolder(folderId, owner, inheritable, expirationTime);
126 }
127
128 public static com.liferay.portal.model.Lock refreshFolderLock(
129 java.lang.String lockUuid, long expirationTime)
130 throws com.liferay.portal.kernel.exception.PortalException,
131 com.liferay.portal.kernel.exception.SystemException {
132 return getService().refreshFolderLock(lockUuid, expirationTime);
133 }
134
135 public static void unlockFolder(long groupId, long folderId,
136 java.lang.String lockUuid)
137 throws com.liferay.portal.kernel.exception.PortalException,
138 com.liferay.portal.kernel.exception.SystemException {
139 getService().unlockFolder(groupId, folderId, lockUuid);
140 }
141
142 public static void unlockFolder(long groupId, long parentFolderId,
143 java.lang.String name, java.lang.String lockUuid)
144 throws com.liferay.portal.kernel.exception.PortalException,
145 com.liferay.portal.kernel.exception.SystemException {
146 getService().unlockFolder(groupId, parentFolderId, name, lockUuid);
147 }
148
149 public static com.liferay.portlet.documentlibrary.model.DLFolder updateFolder(
150 long folderId, long parentFolderId, java.lang.String name,
151 java.lang.String description,
152 com.liferay.portal.service.ServiceContext serviceContext)
153 throws com.liferay.portal.kernel.exception.PortalException,
154 com.liferay.portal.kernel.exception.SystemException,
155 java.rmi.RemoteException {
156 return getService()
157 .updateFolder(folderId, parentFolderId, name, description,
158 serviceContext);
159 }
160
161 public static boolean verifyInheritableLock(long folderId,
162 java.lang.String lockUuid)
163 throws com.liferay.portal.kernel.exception.PortalException,
164 com.liferay.portal.kernel.exception.SystemException {
165 return getService().verifyInheritableLock(folderId, lockUuid);
166 }
167
168 public static DLFolderService getService() {
169 if (_service == null) {
170 _service = (DLFolderService)PortalBeanLocatorUtil.locate(DLFolderService.class.getName());
171 }
172
173 return _service;
174 }
175
176 public void setService(DLFolderService service) {
177 _service = service;
178 }
179
180 private static DLFolderService _service;
181 }