001
014
015 package com.liferay.portlet.documentlibrary.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.LongWrapper;
020 import com.liferay.portal.kernel.util.MethodWrapper;
021 import com.liferay.portal.kernel.util.NullWrapper;
022 import com.liferay.portal.security.auth.HttpPrincipal;
023 import com.liferay.portal.service.http.TunnelUtil;
024
025 import com.liferay.portlet.documentlibrary.service.DLFileVersionServiceUtil;
026
027
057 public class DLFileVersionServiceHttp {
058 public static com.liferay.portlet.documentlibrary.model.DLFileVersion updateDescription(
059 HttpPrincipal httpPrincipal, long fileVersionId,
060 java.lang.String description)
061 throws com.liferay.portal.kernel.exception.PortalException,
062 com.liferay.portal.kernel.exception.SystemException {
063 try {
064 Object paramObj0 = new LongWrapper(fileVersionId);
065
066 Object paramObj1 = description;
067
068 if (description == null) {
069 paramObj1 = new NullWrapper("java.lang.String");
070 }
071
072 MethodWrapper methodWrapper = new MethodWrapper(DLFileVersionServiceUtil.class.getName(),
073 "updateDescription", new Object[] { paramObj0, paramObj1 });
074
075 Object returnObj = null;
076
077 try {
078 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
079 }
080 catch (Exception e) {
081 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
082 throw (com.liferay.portal.kernel.exception.PortalException)e;
083 }
084
085 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
086 throw (com.liferay.portal.kernel.exception.SystemException)e;
087 }
088
089 throw new com.liferay.portal.kernel.exception.SystemException(e);
090 }
091
092 return (com.liferay.portlet.documentlibrary.model.DLFileVersion)returnObj;
093 }
094 catch (com.liferay.portal.kernel.exception.SystemException se) {
095 _log.error(se, se);
096
097 throw se;
098 }
099 }
100
101 private static Log _log = LogFactoryUtil.getLog(DLFileVersionServiceHttp.class);
102 }