1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.kernel.util.BooleanWrapper;
20 import com.liferay.portal.kernel.util.LongWrapper;
21 import com.liferay.portal.kernel.util.MethodWrapper;
22 import com.liferay.portal.kernel.util.NullWrapper;
23 import com.liferay.portal.security.auth.HttpPrincipal;
24 import com.liferay.portal.service.PluginSettingServiceUtil;
25
26
63 public class PluginSettingServiceHttp {
64 public static com.liferay.portal.model.PluginSetting updatePluginSetting(
65 HttpPrincipal httpPrincipal, long companyId, java.lang.String pluginId,
66 java.lang.String pluginType, java.lang.String roles, boolean active)
67 throws com.liferay.portal.kernel.exception.PortalException,
68 com.liferay.portal.kernel.exception.SystemException {
69 try {
70 Object paramObj0 = new LongWrapper(companyId);
71
72 Object paramObj1 = pluginId;
73
74 if (pluginId == null) {
75 paramObj1 = new NullWrapper("java.lang.String");
76 }
77
78 Object paramObj2 = pluginType;
79
80 if (pluginType == null) {
81 paramObj2 = new NullWrapper("java.lang.String");
82 }
83
84 Object paramObj3 = roles;
85
86 if (roles == null) {
87 paramObj3 = new NullWrapper("java.lang.String");
88 }
89
90 Object paramObj4 = new BooleanWrapper(active);
91
92 MethodWrapper methodWrapper = new MethodWrapper(PluginSettingServiceUtil.class.getName(),
93 "updatePluginSetting",
94 new Object[] {
95 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4
96 });
97
98 Object returnObj = null;
99
100 try {
101 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
102 }
103 catch (Exception e) {
104 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
105 throw (com.liferay.portal.kernel.exception.PortalException)e;
106 }
107
108 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
109 throw (com.liferay.portal.kernel.exception.SystemException)e;
110 }
111
112 throw new com.liferay.portal.kernel.exception.SystemException(e);
113 }
114
115 return (com.liferay.portal.model.PluginSetting)returnObj;
116 }
117 catch (com.liferay.portal.kernel.exception.SystemException se) {
118 _log.error(se, se);
119
120 throw se;
121 }
122 }
123
124 private static Log _log = LogFactoryUtil.getLog(PluginSettingServiceHttp.class);
125 }