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