Example usage for com.liferay.portal.kernel.exception EmailAddressException EmailAddressException

List of usage examples for com.liferay.portal.kernel.exception EmailAddressException EmailAddressException

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.exception EmailAddressException EmailAddressException.

Prototype

public EmailAddressException() 

Source Link

Usage

From source file:com.liferay.flags.service.impl.FlagsEntryServiceImpl.java

License:Open Source License

@Override
public void addEntry(String className, long classPK, String reporterEmailAddress, long reportedUserId,
        String contentTitle, String contentURL, String reason, ServiceContext serviceContext)
        throws PortalException {

    if (!Validator.isEmailAddress(reporterEmailAddress)) {
        throw new EmailAddressException();
    }//from w  w w  .j  a v a2s .  c om

    FlagsRequest flagsRequest = new FlagsRequest(className, classPK, reporterEmailAddress, reportedUserId,
            contentTitle, contentURL, reason, serviceContext);

    MessageBusUtil.sendMessage(DestinationNames.FLAGS, flagsRequest);
}