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
| /** | |
| * 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
| 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
| 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
| 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
| 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
| public class CustomServiceComponentLocalServiceImpl extends | |
| ServiceComponentLocalServiceImpl { | |
| @Override | |
| public void upgradeDB( | |
| ClassLoader classLoader, String buildNamespace, long buildNumber, | |
| boolean buildAutoUpgrade, ServiceComponent previousServiceComponent, | |
| String tablesSQL, String sequencesSQL, String indexesSQL) | |
| throws Exception { |
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
| public String getJSON(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { | |
| String className = ParamUtil.getString(request, "serviceClassName"); | |
| boolean useThreadLocal = (className.indexOf("UmpServiceUtil") > 0) || (className.indexOf("MyStreetServiceUtil") > 0); | |
| try { | |
| if (useThreadLocal) { | |
| JSONRequestThreadLocal.setRequest(request); | |
| } | |
| return super.getJSON(mapping, form, request, response); | |
| } |
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
| for (AssetTag assetTag : assetTags) { | |
| // CUSTOM START | |
| // By only exporting tags that are more recent than the export start | |
| // date of the Layout, we assume that at some point in time the | |
| // exporting Site and the importing Site had exactly the same Tags, | |
| // and that every Layout export will harvest any tags not found in | |
| // the importing Site | |
| if(portletDataContext.hasDateRange()) { | |
| int diff = DateUtil.compareTo(portletDataContext.getStartDate(), | |
| assetTag.getModifiedDate()); |
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.util.zip.ZipFile | |
| /* | |
| * detect-patch-conflicts.groovy | |
| * Input - patches.dir property to indicate the location of the patches zip files | |
| * Output - detected.patch.conflict property - set to true if conflicts were found | |
| */ | |
| def conflict = false | |
| // CUSTOM START - this configuraton should be paramaterized to generalize this script |