Skip to content

Commit

Permalink
SAK-45959 EmailService @deprecated javadoc "use .." (sakaiproject#9536)
Browse files Browse the repository at this point in the history
  • Loading branch information
axxter99 authored Aug 11, 2021
1 parent 54e1b20 commit 6d4ab69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import javax.mail.MessagingException;
import javax.mail.internet.InternetAddress;

import org.sakaiproject.email.api.AttachmentSizeException;
import org.sakaiproject.email.api.EmailAddress.RecipientType;
import org.sakaiproject.user.api.User;

Expand Down Expand Up @@ -133,7 +132,6 @@ void send(String fromStr, String toStr, String subject, String content, String h
/**
* Sends a single message to a set of users.
*
* @deprecated
* @param message
* {@link EmailMessage} that contains the parameters to create a message to the
* specified recipients.
Expand All @@ -144,6 +142,7 @@ void send(String fromStr, String toStr, String subject, String content, String h
* @throws NoRecipientsException
* @return {@link java.util.List} of recipients that were found to be invalid per to
* {@link javax.mail.internet.InternetAddress}.
* @deprecated use {@link #send(EmailMessage, true)}
*/
List<EmailAddress> send(EmailMessage message) throws AddressValidationException,
NoRecipientsException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ public void destroy()
* Work interface methods: org.sakai.service.email.EmailService
*********************************************************************************************************************************************************************************************************************************************************/

/**
* {@inheritDoc}
*/
@Override
public void sendMail(InternetAddress from, InternetAddress[] to, String subject, String content, InternetAddress[] headerTo,
InternetAddress[] replyTo, List<String> additionalHeaders)
{
Expand All @@ -290,9 +288,7 @@ public void sendMail(InternetAddress from, InternetAddress[] to, String subject,
sendMail(from, to, subject, content, recipients, replyTo, additionalHeaders, null);
}

/**
* {@inheritDoc}
*/
@Override
public void sendMail(InternetAddress from, InternetAddress[] to, String subject, String content,
Map<RecipientType, InternetAddress[]> headerTo, InternetAddress[] replyTo,
List<String> additionalHeaders, List<Attachment> attachments) {
Expand All @@ -304,6 +300,7 @@ public void sendMail(InternetAddress from, InternetAddress[] to, String subject,
}
}


public void sendMailMessagingException(InternetAddress from, InternetAddress[] to, String subject, String content,
Map<RecipientType, InternetAddress[]> headerTo, InternetAddress[] replyTo,
List<String> additionalHeaders, List<Attachment> attachments) throws AttachmentSizeException, MessagingException {
Expand Down Expand Up @@ -578,9 +575,7 @@ private void checkFrom(MimeMessage msg) {
}
}

/**
* {@inheritDoc}
*/
@Override
public void send(String fromStr, String toStr, String subject, String content, String headerToStr, String replyToStr,
List<String> additionalHeaders)
{
Expand Down Expand Up @@ -636,9 +631,7 @@ public void send(String fromStr, String toStr, String subject, String content, S
}
}

/**
* {@inheritDoc}
*/
@Override
public void sendToUsers(Collection<User> users, Collection<String> headers, String message)
{
if (headers == null)
Expand Down Expand Up @@ -887,12 +880,7 @@ private Properties createMailSessionProperties()
return props;
}

/**
* {@inheritDoc}
*
* @see org.sakaiproject.email.api.EmailService#send(EmailMessage)
* For temporary backward compatibility
*/
@Override
public List<EmailAddress> send(EmailMessage msg) throws AddressValidationException, NoRecipientsException {

List<EmailAddress> addresses = new ArrayList<>();
Expand All @@ -903,11 +891,8 @@ public List<EmailAddress> send(EmailMessage msg) throws AddressValidationExcepti
}
return addresses;
}
/**
* {@inheritDoc}
*
* @see org.sakaiproject.email.api.EmailService#send(EmailMessage)
*/

@Override
public List<EmailAddress> send(EmailMessage msg, boolean messagingException) throws AddressValidationException,
AttachmentSizeException, NoRecipientsException, MessagingException
{
Expand Down

0 comments on commit 6d4ab69

Please sign in to comment.