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