Example usage for com.liferay.portal.kernel.messaging DestinationNames FLAGS

List of usage examples for com.liferay.portal.kernel.messaging DestinationNames FLAGS

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.messaging DestinationNames FLAGS.

Prototype

String FLAGS

To view the source code for com.liferay.portal.kernel.messaging DestinationNames FLAGS.

Click 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 ww  w. ja v  a2s . co  m*/

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

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

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

License:Open Source License

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

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

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