001
014
015 package com.liferay.portlet.flags.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.flags.service.FlagsEntryServiceUtil;
026
027
057 public class FlagsEntryServiceHttp {
058 public static void addEntry(HttpPrincipal httpPrincipal,
059 java.lang.String className, long classPK,
060 java.lang.String reporterEmailAddress, long reportedUserId,
061 java.lang.String contentTitle, java.lang.String contentURL,
062 java.lang.String reason,
063 com.liferay.portal.service.ServiceContext serviceContext)
064 throws com.liferay.portal.kernel.exception.SystemException {
065 try {
066 Object paramObj0 = className;
067
068 if (className == null) {
069 paramObj0 = new NullWrapper("java.lang.String");
070 }
071
072 Object paramObj1 = new LongWrapper(classPK);
073
074 Object paramObj2 = reporterEmailAddress;
075
076 if (reporterEmailAddress == null) {
077 paramObj2 = new NullWrapper("java.lang.String");
078 }
079
080 Object paramObj3 = new LongWrapper(reportedUserId);
081
082 Object paramObj4 = contentTitle;
083
084 if (contentTitle == null) {
085 paramObj4 = new NullWrapper("java.lang.String");
086 }
087
088 Object paramObj5 = contentURL;
089
090 if (contentURL == null) {
091 paramObj5 = new NullWrapper("java.lang.String");
092 }
093
094 Object paramObj6 = reason;
095
096 if (reason == null) {
097 paramObj6 = new NullWrapper("java.lang.String");
098 }
099
100 Object paramObj7 = serviceContext;
101
102 if (serviceContext == null) {
103 paramObj7 = new NullWrapper(
104 "com.liferay.portal.service.ServiceContext");
105 }
106
107 MethodWrapper methodWrapper = new MethodWrapper(FlagsEntryServiceUtil.class.getName(),
108 "addEntry",
109 new Object[] {
110 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
111 paramObj5, paramObj6, paramObj7
112 });
113
114 try {
115 TunnelUtil.invoke(httpPrincipal, methodWrapper);
116 }
117 catch (Exception e) {
118 throw new com.liferay.portal.kernel.exception.SystemException(e);
119 }
120 }
121 catch (com.liferay.portal.kernel.exception.SystemException se) {
122 _log.error(se, se);
123
124 throw se;
125 }
126 }
127
128 private static Log _log = LogFactoryUtil.getLog(FlagsEntryServiceHttp.class);
129 }