Created
February 7, 2014 16:51
-
-
Save gabriel-lee/8866728 to your computer and use it in GitHub Desktop.
addDepartment test script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portal.model.Organization; | |
import com.liferay.portal.service.OrganizationLocalServiceUtil; | |
import com.liferay.portal.util.PortalUtil; | |
import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil; | |
import com.liferay.portal.model.User; | |
import com.liferay.portal.service.UserLocalServiceUtil; | |
long companyId = PortalUtil.getDefaultCompanyId(); | |
Organization organization = OrganizationLocalServiceUtil.getOrganization(companyId, "Gabriel Test 1 Company 2-6-14"); | |
User user = UserLocalServiceUtil.getUserByScreenName(companyId, "sdsg_test"); | |
PortletBeanLocatorUtil.locate("noa-omas-portlet", "com.nintendo.tpt.security.omas.service.OmasLocalService").addDepartment(companyId, organization, "", user.getUserId(), "TEST"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment