Example usage for com.liferay.portal.events ServicePreAction ServicePreAction

List of usage examples for com.liferay.portal.events ServicePreAction ServicePreAction

Introduction

In this page you can find the example usage for com.liferay.portal.events ServicePreAction ServicePreAction.

Prototype

public ServicePreAction() 

Source Link

Usage

From source file:com.liferay.social.activity.test.util.BaseSocialActivityInterpreterTestCase.java

License:Open Source License

@Before
public void setUp() throws Exception {
    group = GroupTestUtil.addGroup();//ww  w .  j a  v  a 2s  .c o  m

    trashHelper = _serviceTracker.getService();

    HttpServletRequest request = new MockHttpServletRequest();

    request.setAttribute(WebKeys.COMPANY_ID, TestPropsValues.getCompanyId());
    request.setAttribute(WebKeys.CURRENT_URL, "http://localhost:80/web/guest/home");
    request.setAttribute(WebKeys.USER, TestPropsValues.getUser());

    ServicePreAction servicePreAction = new ServicePreAction();

    ThemeDisplay themeDisplay = servicePreAction.initThemeDisplay(request, new MockHttpServletResponse());

    request.setAttribute(WebKeys.THEME_DISPLAY, themeDisplay);

    serviceContext = ServiceContextFactory.getInstance(request);
}