List of usage examples for com.liferay.portal.kernel.service UserLocalServiceUtil getGroupUserIds
public static long[] getGroupUserIds(long groupId)
From source file:com.liferay.message.boards.service.test.MBMessageServiceTest.java
License:Open Source License
@Before public void setUp() throws Exception { String name = "Test Category"; String description = "This is a test category."; String displayStyle = MBCategoryConstants.DEFAULT_DISPLAY_STYLE; String emailAddress = null;/*from w ww. jav a 2s. c o m*/ String inProtocol = null; String inServerName = null; int inServerPort = 0; boolean inUseSSL = false; String inUserName = null; String inPassword = null; int inReadInterval = 0; String outEmailAddress = null; boolean outCustom = false; String outServerName = null; int outServerPort = 0; boolean outUseSSL = false; String outUserName = null; String outPassword = null; boolean allowAnonymous = false; boolean mailingListActive = false; _group = GroupTestUtil.addGroup(); for (int i = 0; i < ServiceTestUtil.THREAD_COUNT; i++) { UserTestUtil.addUser(_group.getGroupId()); } ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(_group.getGroupId()); serviceContext.setGroupPermissions(new String[] { ActionKeys.ADD_MESSAGE, ActionKeys.VIEW }); serviceContext.setGuestPermissions(new String[] { ActionKeys.ADD_MESSAGE, ActionKeys.VIEW }); _category = MBCategoryServiceUtil.addCategory(MBCategoryConstants.DEFAULT_PARENT_CATEGORY_ID, name, description, displayStyle, emailAddress, inProtocol, inServerName, inServerPort, inUseSSL, inUserName, inPassword, inReadInterval, outEmailAddress, outCustom, outServerName, outServerPort, outUseSSL, outUserName, outPassword, allowAnonymous, mailingListActive, serviceContext); _userIds = UserLocalServiceUtil.getGroupUserIds(_group.getGroupId()); }