001
014
015 package com.liferay.portlet.imagegallery.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class IGFolderServiceUtil {
035
040 public static com.liferay.portlet.imagegallery.model.IGFolder addFolder(
041 long parentFolderId, java.lang.String name,
042 java.lang.String description,
043 com.liferay.portal.service.ServiceContext serviceContext)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addFolder(parentFolderId, name, description, serviceContext);
048 }
049
050 public static com.liferay.portlet.imagegallery.model.IGFolder copyFolder(
051 long sourceFolderId, long parentFolderId, java.lang.String name,
052 java.lang.String description,
053 com.liferay.portal.service.ServiceContext serviceContext)
054 throws com.liferay.portal.kernel.exception.PortalException,
055 com.liferay.portal.kernel.exception.SystemException {
056 return getService()
057 .copyFolder(sourceFolderId, parentFolderId, name,
058 description, serviceContext);
059 }
060
061 public static void deleteFolder(long folderId)
062 throws com.liferay.portal.kernel.exception.PortalException,
063 com.liferay.portal.kernel.exception.SystemException {
064 getService().deleteFolder(folderId);
065 }
066
067 public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
068 long folderId)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 return getService().getFolder(folderId);
072 }
073
074 public static com.liferay.portlet.imagegallery.model.IGFolder getFolder(
075 long groupId, long parentFolderId, java.lang.String name)
076 throws com.liferay.portal.kernel.exception.PortalException,
077 com.liferay.portal.kernel.exception.SystemException {
078 return getService().getFolder(groupId, parentFolderId, name);
079 }
080
081 public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
082 long groupId, long parentFolderId)
083 throws com.liferay.portal.kernel.exception.SystemException {
084 return getService().getFolders(groupId, parentFolderId);
085 }
086
087 public static java.util.List<com.liferay.portlet.imagegallery.model.IGFolder> getFolders(
088 long groupId, long parentFolderId, int start, int end)
089 throws com.liferay.portal.kernel.exception.SystemException {
090 return getService().getFolders(groupId, parentFolderId, start, end);
091 }
092
093 public static int getFoldersCount(long groupId, long parentFolderId)
094 throws com.liferay.portal.kernel.exception.SystemException {
095 return getService().getFoldersCount(groupId, parentFolderId);
096 }
097
098 public static void getSubfolderIds(
099 java.util.List<java.lang.Long> folderIds, long groupId, long folderId)
100 throws com.liferay.portal.kernel.exception.SystemException {
101 getService().getSubfolderIds(folderIds, groupId, folderId);
102 }
103
104 public static com.liferay.portlet.imagegallery.model.IGFolder updateFolder(
105 long folderId, long parentFolderId, java.lang.String name,
106 java.lang.String description, boolean mergeWithParentFolder,
107 com.liferay.portal.service.ServiceContext serviceContext)
108 throws com.liferay.portal.kernel.exception.PortalException,
109 com.liferay.portal.kernel.exception.SystemException {
110 return getService()
111 .updateFolder(folderId, parentFolderId, name, description,
112 mergeWithParentFolder, serviceContext);
113 }
114
115 public static IGFolderService getService() {
116 if (_service == null) {
117 _service = (IGFolderService)PortalBeanLocatorUtil.locate(IGFolderService.class.getName());
118
119 ReferenceRegistry.registerReference(IGFolderServiceUtil.class,
120 "_service");
121 MethodCache.remove(IGFolderService.class);
122 }
123
124 return _service;
125 }
126
127 public void setService(IGFolderService service) {
128 MethodCache.remove(IGFolderService.class);
129
130 _service = service;
131
132 ReferenceRegistry.registerReference(IGFolderServiceUtil.class,
133 "_service");
134 MethodCache.remove(IGFolderService.class);
135 }
136
137 private static IGFolderService _service;
138 }