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