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