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