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.AssetTagPropertyServiceUtil;
025
026
056 public class AssetTagPropertyServiceHttp {
057 public static com.liferay.portlet.asset.model.AssetTagProperty addTagProperty(
058 HttpPrincipal httpPrincipal, long tagId, java.lang.String key,
059 java.lang.String value)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 try {
063 MethodKey methodKey = new MethodKey(AssetTagPropertyServiceUtil.class.getName(),
064 "addTagProperty", long.class, java.lang.String.class,
065 java.lang.String.class);
066
067 MethodHandler methodHandler = new MethodHandler(methodKey, tagId,
068 key, value);
069
070 Object returnObj = null;
071
072 try {
073 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074 }
075 catch (Exception e) {
076 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077 throw (com.liferay.portal.kernel.exception.PortalException)e;
078 }
079
080 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
081 throw (com.liferay.portal.kernel.exception.SystemException)e;
082 }
083
084 throw new com.liferay.portal.kernel.exception.SystemException(e);
085 }
086
087 return (com.liferay.portlet.asset.model.AssetTagProperty)returnObj;
088 }
089 catch (com.liferay.portal.kernel.exception.SystemException se) {
090 _log.error(se, se);
091
092 throw se;
093 }
094 }
095
096 public static void deleteTagProperty(HttpPrincipal httpPrincipal,
097 long tagPropertyId)
098 throws com.liferay.portal.kernel.exception.PortalException,
099 com.liferay.portal.kernel.exception.SystemException {
100 try {
101 MethodKey methodKey = new MethodKey(AssetTagPropertyServiceUtil.class.getName(),
102 "deleteTagProperty", long.class);
103
104 MethodHandler methodHandler = new MethodHandler(methodKey,
105 tagPropertyId);
106
107 try {
108 TunnelUtil.invoke(httpPrincipal, methodHandler);
109 }
110 catch (Exception e) {
111 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
112 throw (com.liferay.portal.kernel.exception.PortalException)e;
113 }
114
115 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
116 throw (com.liferay.portal.kernel.exception.SystemException)e;
117 }
118
119 throw new com.liferay.portal.kernel.exception.SystemException(e);
120 }
121 }
122 catch (com.liferay.portal.kernel.exception.SystemException se) {
123 _log.error(se, se);
124
125 throw se;
126 }
127 }
128
129 public static java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> getTagProperties(
130 HttpPrincipal httpPrincipal, long tagId)
131 throws com.liferay.portal.kernel.exception.SystemException {
132 try {
133 MethodKey methodKey = new MethodKey(AssetTagPropertyServiceUtil.class.getName(),
134 "getTagProperties", long.class);
135
136 MethodHandler methodHandler = new MethodHandler(methodKey, tagId);
137
138 Object returnObj = null;
139
140 try {
141 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
142 }
143 catch (Exception e) {
144 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
145 throw (com.liferay.portal.kernel.exception.SystemException)e;
146 }
147
148 throw new com.liferay.portal.kernel.exception.SystemException(e);
149 }
150
151 return (java.util.List<com.liferay.portlet.asset.model.AssetTagProperty>)returnObj;
152 }
153 catch (com.liferay.portal.kernel.exception.SystemException se) {
154 _log.error(se, se);
155
156 throw se;
157 }
158 }
159
160 public static java.util.List<com.liferay.portlet.asset.model.AssetTagProperty> getTagPropertyValues(
161 HttpPrincipal httpPrincipal, long companyId, java.lang.String key)
162 throws com.liferay.portal.kernel.exception.SystemException {
163 try {
164 MethodKey methodKey = new MethodKey(AssetTagPropertyServiceUtil.class.getName(),
165 "getTagPropertyValues", long.class, java.lang.String.class);
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.AssetTagProperty>)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.AssetTagProperty updateTagProperty(
193 HttpPrincipal httpPrincipal, long tagPropertyId, java.lang.String key,
194 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(AssetTagPropertyServiceUtil.class.getName(),
199 "updateTagProperty", long.class, java.lang.String.class,
200 java.lang.String.class);
201
202 MethodHandler methodHandler = new MethodHandler(methodKey,
203 tagPropertyId, 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.AssetTagProperty)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(AssetTagPropertyServiceHttp.class);
232 }