001
014
015 package com.liferay.portlet.asset.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.http.TunnelUtil;
023
024 import com.liferay.portlet.asset.service.AssetCategoryPropertyServiceUtil;
025
026
054 public class AssetCategoryPropertyServiceHttp {
055 public static com.liferay.portlet.asset.model.AssetCategoryProperty addCategoryProperty(
056 HttpPrincipal httpPrincipal, long entryId, java.lang.String key,
057 java.lang.String value)
058 throws com.liferay.portal.kernel.exception.PortalException,
059 com.liferay.portal.kernel.exception.SystemException {
060 try {
061 MethodKey methodKey = new MethodKey(AssetCategoryPropertyServiceUtil.class,
062 "addCategoryProperty", _addCategoryPropertyParameterTypes0);
063
064 MethodHandler methodHandler = new MethodHandler(methodKey, entryId,
065 key, value);
066
067 Object returnObj = null;
068
069 try {
070 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
071 }
072 catch (Exception e) {
073 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
074 throw (com.liferay.portal.kernel.exception.PortalException)e;
075 }
076
077 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
078 throw (com.liferay.portal.kernel.exception.SystemException)e;
079 }
080
081 throw new com.liferay.portal.kernel.exception.SystemException(e);
082 }
083
084 return (com.liferay.portlet.asset.model.AssetCategoryProperty)returnObj;
085 }
086 catch (com.liferay.portal.kernel.exception.SystemException se) {
087 _log.error(se, se);
088
089 throw se;
090 }
091 }
092
093 public static void deleteCategoryProperty(HttpPrincipal httpPrincipal,
094 long categoryPropertyId)
095 throws com.liferay.portal.kernel.exception.PortalException,
096 com.liferay.portal.kernel.exception.SystemException {
097 try {
098 MethodKey methodKey = new MethodKey(AssetCategoryPropertyServiceUtil.class,
099 "deleteCategoryProperty",
100 _deleteCategoryPropertyParameterTypes1);
101
102 MethodHandler methodHandler = new MethodHandler(methodKey,
103 categoryPropertyId);
104
105 try {
106 TunnelUtil.invoke(httpPrincipal, methodHandler);
107 }
108 catch (Exception e) {
109 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
110 throw (com.liferay.portal.kernel.exception.PortalException)e;
111 }
112
113 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
114 throw (com.liferay.portal.kernel.exception.SystemException)e;
115 }
116
117 throw new com.liferay.portal.kernel.exception.SystemException(e);
118 }
119 }
120 catch (com.liferay.portal.kernel.exception.SystemException se) {
121 _log.error(se, se);
122
123 throw se;
124 }
125 }
126
127 public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> getCategoryProperties(
128 HttpPrincipal httpPrincipal, long entryId)
129 throws com.liferay.portal.kernel.exception.SystemException {
130 try {
131 MethodKey methodKey = new MethodKey(AssetCategoryPropertyServiceUtil.class,
132 "getCategoryProperties",
133 _getCategoryPropertiesParameterTypes2);
134
135 MethodHandler methodHandler = new MethodHandler(methodKey, entryId);
136
137 Object returnObj = null;
138
139 try {
140 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
141 }
142 catch (Exception e) {
143 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
144 throw (com.liferay.portal.kernel.exception.SystemException)e;
145 }
146
147 throw new com.liferay.portal.kernel.exception.SystemException(e);
148 }
149
150 return (java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty>)returnObj;
151 }
152 catch (com.liferay.portal.kernel.exception.SystemException se) {
153 _log.error(se, se);
154
155 throw se;
156 }
157 }
158
159 public static java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty> getCategoryPropertyValues(
160 HttpPrincipal httpPrincipal, long companyId, java.lang.String key)
161 throws com.liferay.portal.kernel.exception.SystemException {
162 try {
163 MethodKey methodKey = new MethodKey(AssetCategoryPropertyServiceUtil.class,
164 "getCategoryPropertyValues",
165 _getCategoryPropertyValuesParameterTypes3);
166
167 MethodHandler methodHandler = new MethodHandler(methodKey,
168 companyId, key);
169
170 Object returnObj = null;
171
172 try {
173 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
174 }
175 catch (Exception e) {
176 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
177 throw (com.liferay.portal.kernel.exception.SystemException)e;
178 }
179
180 throw new com.liferay.portal.kernel.exception.SystemException(e);
181 }
182
183 return (java.util.List<com.liferay.portlet.asset.model.AssetCategoryProperty>)returnObj;
184 }
185 catch (com.liferay.portal.kernel.exception.SystemException se) {
186 _log.error(se, se);
187
188 throw se;
189 }
190 }
191
192 public static com.liferay.portlet.asset.model.AssetCategoryProperty updateCategoryProperty(
193 HttpPrincipal httpPrincipal, long categoryPropertyId,
194 java.lang.String key, java.lang.String value)
195 throws com.liferay.portal.kernel.exception.PortalException,
196 com.liferay.portal.kernel.exception.SystemException {
197 try {
198 MethodKey methodKey = new MethodKey(AssetCategoryPropertyServiceUtil.class,
199 "updateCategoryProperty",
200 _updateCategoryPropertyParameterTypes4);
201
202 MethodHandler methodHandler = new MethodHandler(methodKey,
203 categoryPropertyId, key, value);
204
205 Object returnObj = null;
206
207 try {
208 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
209 }
210 catch (Exception e) {
211 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
212 throw (com.liferay.portal.kernel.exception.PortalException)e;
213 }
214
215 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
216 throw (com.liferay.portal.kernel.exception.SystemException)e;
217 }
218
219 throw new com.liferay.portal.kernel.exception.SystemException(e);
220 }
221
222 return (com.liferay.portlet.asset.model.AssetCategoryProperty)returnObj;
223 }
224 catch (com.liferay.portal.kernel.exception.SystemException se) {
225 _log.error(se, se);
226
227 throw se;
228 }
229 }
230
231 private static Log _log = LogFactoryUtil.getLog(AssetCategoryPropertyServiceHttp.class);
232 private static final Class<?>[] _addCategoryPropertyParameterTypes0 = new Class[] {
233 long.class, java.lang.String.class, java.lang.String.class
234 };
235 private static final Class<?>[] _deleteCategoryPropertyParameterTypes1 = new Class[] {
236 long.class
237 };
238 private static final Class<?>[] _getCategoryPropertiesParameterTypes2 = new Class[] {
239 long.class
240 };
241 private static final Class<?>[] _getCategoryPropertyValuesParameterTypes3 = new Class[] {
242 long.class, java.lang.String.class
243 };
244 private static final Class<?>[] _updateCategoryPropertyParameterTypes4 = new Class[] {
245 long.class, java.lang.String.class, java.lang.String.class
246 };
247 }