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.service.UserLocalServiceUtil | |
| import com.liferay.portal.util.PortalUtil | |
| import com.liferay.portal.model.User | |
| try { | |
| long companyId = PortalUtil.getDefaultCompanyId() | |
| String email = "[email protected]" | |
| User user = UserLocalServiceUtil.getUserByEmailAddress(companyId, email) | |
| println user |
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
| private static Log _log = | |
| LogFactoryUtil.getLog($NAME$.class); |
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
| setCompanyVirtualHost("uat.company.org"); | |
| def setCompanyVirtualHost(newVirtualHost) { | |
| long companyId = PortalUtil.getDefaultCompanyId() | |
| Company c = CompanyLocalServiceUtil.getCompany(companyId) | |
| println "Current company virtual host: " + c.virtualHostname | |
| c = CompanyServiceUtil.updateCompany(companyId, newVirtualHost, c.mx, c.maxUsers, c.active); |
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
| var videoListItem; | |
| var videoListItems; | |
| AUI().ready('aui-io', | |
| function() { | |
| var params = { | |
| groupId:"$groupId", | |
| uuid:"$uuid.data" | |
| } | |
| Liferay.Service.SS.DMContent.getDMVideoList(params, | |
| function (msg) { |
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
| /** | |
| * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved. | |
| * | |
| * This library is free software; you can redistribute it and/or modify it under | |
| * the terms of the GNU Lesser General Public License as published by the Free | |
| * Software Foundation; either version 2.1 of the License, or (at your option) | |
| * any later version. | |
| * | |
| * This library is distributed in the hope that it will be useful, but WITHOUT | |
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
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.kernel.cluster.ClusterExecutorUtil | |
| import com.liferay.portal.kernel.cluster.ClusterNode | |
| try { | |
| println "Clustering enabled: " + ClusterExecutorUtil.isEnabled() | |
| List<ClusterNode> nodes = ClusterExecutorUtil.getClusterNodes() | |
| println "Number of nodes: " + nodes.size() |
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 java.lang.management.ManagementFactory | |
| import javax.management.MBeanServer | |
| import javax.management.ObjectName | |
| import com.liferay.portal.kernel.util.StringUtil | |
| MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); | |
| ObjectName objectName = new ObjectName("Catalina:type=Manager,context=/,host=localhost") | |
| Object mbean = mbs.getMBeanInfo(objectName); | |
| println "Found manager bean" | |
| //println mbean.toString() |
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
| drop index IX_3463D95B on JournalArticle; | |
| create temporary table temp_ja | |
| select * from ( | |
| select groupId, articleId, uuid_, type_, max(version) as 'maxVersionId', count(id_) as 'countId' from JournalArticle ja | |
| group by groupId, uuid_ | |
| ) temp | |
| where temp.countId > 1; | |
| delete ja from JournalArticle ja |
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.model.Role | |
| import com.liferay.portal.model.User | |
| import com.liferay.portal.security.permission.PermissionChecker | |
| import com.liferay.portal.security.permission.PermissionCheckerBag | |
| import com.liferay.portal.security.permission.PermissionCheckerFactoryUtil | |
| import com.liferay.portal.service.OrganizationLocalServiceUtil | |
| import com.liferay.portal.service.RoleLocalServiceUtil | |
| import com.liferay.portal.service.UserLocalServiceUtil | |
| import com.liferay.portal.service.permission.PortletPermissionUtil |
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.service.RoleLocalServiceUtil | |
| import com.liferay.portal.service.ResourcePermissionLocalServiceUtil | |
| import com.liferay.portal.service.ResourceActionLocalServiceUtil | |
| import com.liferay.portal.security.permission.ActionKeys | |
| import com.liferay.portal.model.ResourceAction | |
| import com.liferay.portal.util.PortletKeys | |
| Map<String, String[]> portletSets = new TreeMap<String, String[]>(); | |
| // Mobile Device Rules |