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.MethodWrapper;
20 import com.liferay.portal.security.auth.HttpPrincipal;
21 import com.liferay.portal.service.PortalServiceUtil;
22
23
60 public class PortalServiceHttp {
61 public static java.lang.String getAutoDeployDirectory(
62 HttpPrincipal httpPrincipal)
63 throws com.liferay.portal.kernel.exception.SystemException {
64 try {
65 MethodWrapper methodWrapper = new MethodWrapper(PortalServiceUtil.class.getName(),
66 "getAutoDeployDirectory", new Object[0]);
67
68 Object returnObj = null;
69
70 try {
71 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
72 }
73 catch (Exception e) {
74 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
75 throw (com.liferay.portal.kernel.exception.SystemException)e;
76 }
77
78 throw new com.liferay.portal.kernel.exception.SystemException(e);
79 }
80
81 return (java.lang.String)returnObj;
82 }
83 catch (com.liferay.portal.kernel.exception.SystemException se) {
84 _log.error(se, se);
85
86 throw se;
87 }
88 }
89
90 public static int getBuildNumber(HttpPrincipal httpPrincipal)
91 throws com.liferay.portal.kernel.exception.SystemException {
92 try {
93 MethodWrapper methodWrapper = new MethodWrapper(PortalServiceUtil.class.getName(),
94 "getBuildNumber", new Object[0]);
95
96 Object returnObj = null;
97
98 try {
99 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
100 }
101 catch (Exception e) {
102 throw new com.liferay.portal.kernel.exception.SystemException(e);
103 }
104
105 return ((Integer)returnObj).intValue();
106 }
107 catch (com.liferay.portal.kernel.exception.SystemException se) {
108 _log.error(se, se);
109
110 throw se;
111 }
112 }
113
114 public static void test(HttpPrincipal httpPrincipal)
115 throws com.liferay.portal.kernel.exception.SystemException {
116 try {
117 MethodWrapper methodWrapper = new MethodWrapper(PortalServiceUtil.class.getName(),
118 "test", new Object[0]);
119
120 try {
121 TunnelUtil.invoke(httpPrincipal, methodWrapper);
122 }
123 catch (Exception e) {
124 throw new com.liferay.portal.kernel.exception.SystemException(e);
125 }
126 }
127 catch (com.liferay.portal.kernel.exception.SystemException se) {
128 _log.error(se, se);
129
130 throw se;
131 }
132 }
133
134 public static void testCounterRollback(HttpPrincipal httpPrincipal)
135 throws com.liferay.portal.kernel.exception.SystemException {
136 try {
137 MethodWrapper methodWrapper = new MethodWrapper(PortalServiceUtil.class.getName(),
138 "testCounterRollback", new Object[0]);
139
140 try {
141 TunnelUtil.invoke(httpPrincipal, methodWrapper);
142 }
143 catch (Exception e) {
144 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
145 throw (com.liferay.portal.kernel.exception.SystemException)e;
146 }
147
148 throw new com.liferay.portal.kernel.exception.SystemException(e);
149 }
150 }
151 catch (com.liferay.portal.kernel.exception.SystemException se) {
152 _log.error(se, se);
153
154 throw se;
155 }
156 }
157
158 private static Log _log = LogFactoryUtil.getLog(PortalServiceHttp.class);
159 }