001
014
015 package com.liferay.portal.service.impl;
016
017 import com.liferay.portal.kernel.exception.SystemException;
018 import com.liferay.portal.kernel.log.Log;
019 import com.liferay.portal.kernel.log.LogFactoryUtil;
020 import com.liferay.portal.kernel.util.PropsKeys;
021 import com.liferay.portal.kernel.util.ReleaseInfo;
022 import com.liferay.portal.service.base.PortalServiceBaseImpl;
023 import com.liferay.portal.util.PrefsPropsUtil;
024 import com.liferay.portal.util.PropsValues;
025
026
029 public class PortalServiceImpl extends PortalServiceBaseImpl {
030
031 public String getAutoDeployDirectory() throws SystemException {
032 return PrefsPropsUtil.getString(
033 PropsKeys.AUTO_DEPLOY_DEPLOY_DIR,
034 PropsValues.AUTO_DEPLOY_DEPLOY_DIR);
035 }
036
037 public int getBuildNumber() {
038 return ReleaseInfo.getBuildNumber();
039 }
040
041 public void test() {
042 long userId = 0;
043
044 try {
045 userId = getUserId();
046 }
047 catch (Exception e) {
048 e.printStackTrace();
049 }
050
051 if (_log.isInfoEnabled()) {
052 _log.info("User id " + userId);
053 }
054 }
055
056 public void testCounterRollback() throws SystemException {
057 int counterIncrement = PropsValues.COUNTER_INCREMENT;
058
059 for (int i = 0; i < counterIncrement * 2; i++) {
060 counterLocalService.increment();
061 }
062
063 throw new SystemException();
064 }
065
066 private static Log _log = LogFactoryUtil.getLog(PortalServiceImpl.class);
067
068 }