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.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.PortalServiceUtil;
023
024
054 public class PortalServiceHttp {
055 public static java.lang.String getAutoDeployDirectory(
056 HttpPrincipal httpPrincipal)
057 throws com.liferay.portal.kernel.exception.SystemException {
058 try {
059 MethodKey methodKey = new MethodKey(PortalServiceUtil.class.getName(),
060 "getAutoDeployDirectory",
061 _getAutoDeployDirectoryParameterTypes0);
062
063 MethodHandler methodHandler = new MethodHandler(methodKey);
064
065 Object returnObj = null;
066
067 try {
068 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
069 }
070 catch (Exception e) {
071 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
072 throw (com.liferay.portal.kernel.exception.SystemException)e;
073 }
074
075 throw new com.liferay.portal.kernel.exception.SystemException(e);
076 }
077
078 return (java.lang.String)returnObj;
079 }
080 catch (com.liferay.portal.kernel.exception.SystemException se) {
081 _log.error(se, se);
082
083 throw se;
084 }
085 }
086
087 public static int getBuildNumber(HttpPrincipal httpPrincipal)
088 throws com.liferay.portal.kernel.exception.SystemException {
089 try {
090 MethodKey methodKey = new MethodKey(PortalServiceUtil.class.getName(),
091 "getBuildNumber", _getBuildNumberParameterTypes1);
092
093 MethodHandler methodHandler = new MethodHandler(methodKey);
094
095 Object returnObj = null;
096
097 try {
098 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
099 }
100 catch (Exception e) {
101 throw new com.liferay.portal.kernel.exception.SystemException(e);
102 }
103
104 return ((Integer)returnObj).intValue();
105 }
106 catch (com.liferay.portal.kernel.exception.SystemException se) {
107 _log.error(se, se);
108
109 throw se;
110 }
111 }
112
113 public static void test(HttpPrincipal httpPrincipal)
114 throws com.liferay.portal.kernel.exception.SystemException {
115 try {
116 MethodKey methodKey = new MethodKey(PortalServiceUtil.class.getName(),
117 "test", _testParameterTypes2);
118
119 MethodHandler methodHandler = new MethodHandler(methodKey);
120
121 try {
122 TunnelUtil.invoke(httpPrincipal, methodHandler);
123 }
124 catch (Exception e) {
125 throw new com.liferay.portal.kernel.exception.SystemException(e);
126 }
127 }
128 catch (com.liferay.portal.kernel.exception.SystemException se) {
129 _log.error(se, se);
130
131 throw se;
132 }
133 }
134
135 public static void testCounterRollback(HttpPrincipal httpPrincipal)
136 throws com.liferay.portal.kernel.exception.SystemException {
137 try {
138 MethodKey methodKey = new MethodKey(PortalServiceUtil.class.getName(),
139 "testCounterRollback", _testCounterRollbackParameterTypes3);
140
141 MethodHandler methodHandler = new MethodHandler(methodKey);
142
143 try {
144 TunnelUtil.invoke(httpPrincipal, methodHandler);
145 }
146 catch (Exception e) {
147 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
148 throw (com.liferay.portal.kernel.exception.SystemException)e;
149 }
150
151 throw new com.liferay.portal.kernel.exception.SystemException(e);
152 }
153 }
154 catch (com.liferay.portal.kernel.exception.SystemException se) {
155 _log.error(se, se);
156
157 throw se;
158 }
159 }
160
161 private static Log _log = LogFactoryUtil.getLog(PortalServiceHttp.class);
162 private static final Class<?>[] _getAutoDeployDirectoryParameterTypes0 = new Class[] {
163
164 };
165 private static final Class<?>[] _getBuildNumberParameterTypes1 = new Class[] {
166
167 };
168 private static final Class<?>[] _testParameterTypes2 = new Class[] { };
169 private static final Class<?>[] _testCounterRollbackParameterTypes3 = new Class[] {
170
171 };
172 }