001
014
015 package com.liferay.portal.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.BooleanWrapper;
020 import com.liferay.portal.kernel.util.LongWrapper;
021 import com.liferay.portal.kernel.util.MethodWrapper;
022 import com.liferay.portal.kernel.util.NullWrapper;
023 import com.liferay.portal.security.auth.HttpPrincipal;
024 import com.liferay.portal.service.PluginSettingServiceUtil;
025
026
056 public class PluginSettingServiceHttp {
057 public static com.liferay.portal.model.PluginSetting updatePluginSetting(
058 HttpPrincipal httpPrincipal, long companyId, java.lang.String pluginId,
059 java.lang.String pluginType, java.lang.String roles, boolean active)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 try {
063 Object paramObj0 = new LongWrapper(companyId);
064
065 Object paramObj1 = pluginId;
066
067 if (pluginId == null) {
068 paramObj1 = new NullWrapper("java.lang.String");
069 }
070
071 Object paramObj2 = pluginType;
072
073 if (pluginType == null) {
074 paramObj2 = new NullWrapper("java.lang.String");
075 }
076
077 Object paramObj3 = roles;
078
079 if (roles == null) {
080 paramObj3 = new NullWrapper("java.lang.String");
081 }
082
083 Object paramObj4 = new BooleanWrapper(active);
084
085 MethodWrapper methodWrapper = new MethodWrapper(PluginSettingServiceUtil.class.getName(),
086 "updatePluginSetting",
087 new Object[] {
088 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
089 });
090
091 Object returnObj = null;
092
093 try {
094 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
095 }
096 catch (Exception e) {
097 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
098 throw (com.liferay.portal.kernel.exception.PortalException)e;
099 }
100
101 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
102 throw (com.liferay.portal.kernel.exception.SystemException)e;
103 }
104
105 throw new com.liferay.portal.kernel.exception.SystemException(e);
106 }
107
108 return (com.liferay.portal.model.PluginSetting)returnObj;
109 }
110 catch (com.liferay.portal.kernel.exception.SystemException se) {
111 _log.error(se, se);
112
113 throw se;
114 }
115 }
116
117 private static Log _log = LogFactoryUtil.getLog(PluginSettingServiceHttp.class);
118 }