Skip to content
This repository has been archived by the owner on Nov 20, 2021. It is now read-only.

Commit

Permalink
LPS-60774 MailService is a special case, although service builder con…
Browse files Browse the repository at this point in the history
…sider it as remote service, it does not do any permission checking, just redirecting calls to MessageBus. It is actually safe to use it within local services, but let's do it manually to avoid over complexing SB logic.
  • Loading branch information
shuyangzhou authored and brianchandotcom committed Nov 26, 2015
1 parent e85d148 commit 8ba29c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Expand Up @@ -14,6 +14,8 @@

package com.liferay.social.networking.service.impl;

import com.liferay.mail.service.MailService;
import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.json.JSONFactoryUtil;
Expand Down Expand Up @@ -234,4 +236,7 @@ protected void sendEmail(WallEntry wallEntry, ThemeDisplay themeDisplay)
mailService.sendEmail(mailMessage);
}

@BeanReference(type = MailService.class)
protected MailService mailService;

}
Expand Up @@ -14,6 +14,7 @@

package com.liferay.portal.service.impl;

import com.liferay.mail.service.MailService;
import com.liferay.portal.CompanyMaxUsersException;
import com.liferay.portal.ContactBirthdayException;
import com.liferay.portal.ContactNameException;
Expand All @@ -34,6 +35,7 @@
import com.liferay.portal.UserReminderQueryException;
import com.liferay.portal.UserScreenNameException;
import com.liferay.portal.UserSmsException;
import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.cache.PortalCache;
import com.liferay.portal.kernel.cache.PortalCacheMapSynchronizeUtil;
import com.liferay.portal.kernel.cache.PortalCacheMapSynchronizeUtil.Synchronizer;
Expand Down Expand Up @@ -6605,6 +6607,9 @@ protected void validateScreenName(
}
}

@BeanReference(type = MailService.class)
protected MailService mailService;

private static final Log _log = LogFactoryUtil.getLog(
UserLocalServiceImpl.class);

Expand Down
Expand Up @@ -14,6 +14,8 @@

package com.liferay.portlet.calendar.service.impl;

import com.liferay.mail.service.MailService;
import com.liferay.portal.kernel.bean.BeanReference;
import com.liferay.portal.kernel.cal.DayAndPosition;
import com.liferay.portal.kernel.cal.Recurrence;
import com.liferay.portal.kernel.cal.TZSRecurrence;
Expand Down Expand Up @@ -1771,6 +1773,9 @@ protected void validate(
}
}

@BeanReference(type = MailService.class)
protected MailService mailService;

private static final long _CALENDAR_EVENT_CHECK_INTERVAL =
PropsValues.CALENDAR_EVENT_CHECK_INTERVAL * Time.MINUTE;

Expand Down

0 comments on commit 8ba29c8

Please sign in to comment.