1
14
15 package com.liferay.portlet.imagegallery.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18
19
39 public class IGImageServiceUtil {
40 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
41 long folderId, java.lang.String name, java.lang.String description,
42 java.io.File file, java.lang.String contentType,
43 java.lang.String[] tagsEntries, boolean addCommunityPermissions,
44 boolean addGuestPermissions)
45 throws com.liferay.portal.PortalException,
46 com.liferay.portal.SystemException, java.rmi.RemoteException {
47 return getService()
48 .addImage(folderId, name, description, file, contentType,
49 tagsEntries, addCommunityPermissions, addGuestPermissions);
50 }
51
52 public static com.liferay.portlet.imagegallery.model.IGImage addImage(
53 long folderId, java.lang.String name, java.lang.String description,
54 java.io.File file, java.lang.String contentType,
55 java.lang.String[] tagsEntries,
56 java.lang.String[] communityPermissions,
57 java.lang.String[] guestPermissions)
58 throws com.liferay.portal.PortalException,
59 com.liferay.portal.SystemException, java.rmi.RemoteException {
60 return getService()
61 .addImage(folderId, name, description, file, contentType,
62 tagsEntries, communityPermissions, guestPermissions);
63 }
64
65 public static void deleteImage(long imageId)
66 throws com.liferay.portal.PortalException,
67 com.liferay.portal.SystemException, java.rmi.RemoteException {
68 getService().deleteImage(imageId);
69 }
70
71 public static void deleteImageByFolderIdAndNameWithExtension(
72 long folderId, java.lang.String nameWithExtension)
73 throws com.liferay.portal.PortalException,
74 com.liferay.portal.SystemException, java.rmi.RemoteException {
75 getService()
76 .deleteImageByFolderIdAndNameWithExtension(folderId,
77 nameWithExtension);
78 }
79
80 public static com.liferay.portlet.imagegallery.model.IGImage getImage(
81 long imageId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException, java.rmi.RemoteException {
84 return getService().getImage(imageId);
85 }
86
87 public static com.liferay.portlet.imagegallery.model.IGImage getImageByFolderIdAndNameWithExtension(
88 long folderId, java.lang.String nameWithExtension)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException, java.rmi.RemoteException {
91 return getService()
92 .getImageByFolderIdAndNameWithExtension(folderId,
93 nameWithExtension);
94 }
95
96 public static com.liferay.portlet.imagegallery.model.IGImage getImageByLargeImageId(
97 long largeImageId)
98 throws com.liferay.portal.PortalException,
99 com.liferay.portal.SystemException, java.rmi.RemoteException {
100 return getService().getImageByLargeImageId(largeImageId);
101 }
102
103 public static com.liferay.portlet.imagegallery.model.IGImage getImageBySmallImageId(
104 long smallImageId)
105 throws com.liferay.portal.PortalException,
106 com.liferay.portal.SystemException, java.rmi.RemoteException {
107 return getService().getImageBySmallImageId(smallImageId);
108 }
109
110 public static java.util.List<com.liferay.portlet.imagegallery.model.IGImage> getImages(
111 long folderId)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException, java.rmi.RemoteException {
114 return getService().getImages(folderId);
115 }
116
117 public static com.liferay.portlet.imagegallery.model.IGImage updateImage(
118 long imageId, long folderId, java.lang.String name,
119 java.lang.String description, java.io.File file,
120 java.lang.String contentType, java.lang.String[] tagsEntries)
121 throws com.liferay.portal.PortalException,
122 com.liferay.portal.SystemException, java.rmi.RemoteException {
123 return getService()
124 .updateImage(imageId, folderId, name, description, file,
125 contentType, tagsEntries);
126 }
127
128 public static IGImageService getService() {
129 if (_service == null) {
130 _service = (IGImageService)PortalBeanLocatorUtil.locate(IGImageService.class.getName());
131 }
132
133 return _service;
134 }
135
136 public void setService(IGImageService service) {
137 _service = service;
138 }
139
140 private static IGImageService _service;
141 }