1
14
15 package com.liferay.portal.service.impl;
16
17 import com.liferay.portal.SystemException;
18 import com.liferay.portal.kernel.log.Log;
19 import com.liferay.portal.kernel.log.LogFactoryUtil;
20 import com.liferay.portal.kernel.util.PropsKeys;
21 import com.liferay.portal.kernel.util.ReleaseInfo;
22 import com.liferay.portal.service.base.PortalServiceBaseImpl;
23 import com.liferay.portal.util.PrefsPropsUtil;
24 import com.liferay.portal.util.PropsValues;
25
26
31 public class PortalServiceImpl extends PortalServiceBaseImpl {
32
33 public String getAutoDeployDirectory() throws SystemException {
34 return PrefsPropsUtil.getString(
35 PropsKeys.AUTO_DEPLOY_DEPLOY_DIR,
36 PropsValues.AUTO_DEPLOY_DEPLOY_DIR);
37 }
38
39 public int getBuildNumber() {
40 return ReleaseInfo.getBuildNumber();
41 }
42
43 public void test() {
44 long userId = 0;
45
46 try {
47 userId = getUserId();
48 }
49 catch (Exception e) {
50 e.printStackTrace();
51 }
52
53 if (_log.isInfoEnabled()) {
54 _log.info("User id " + userId);
55 }
56 }
57
58 public void testCounterRollback() throws SystemException {
59 int counterIncrement = PropsValues.COUNTER_INCREMENT;
60
61 for (int i = 0; i < counterIncrement * 2; i++) {
62 counterLocalService.increment();
63 }
64
65 throw new SystemException();
66 }
67
68 private static Log _log = LogFactoryUtil.getLog(PortalServiceImpl.class);
69
70 }