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
{ | |
"fieldSets": [ | |
{ | |
"fields": [ | |
{ | |
"name": "contentStructureId", | |
"label": "ID da estrutura do conteúdo", | |
"type": "text", | |
"dataType": "int", | |
"defaultValue": "" |
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
<!-- | |
Importar CDN no Header | |
<script src='https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js'></script> | |
--> | |
[#assign currentYear = .now?string('yyyy')?number] | |
[#assign currentMonth = .now?string('MM')?number] | |
<div> | |
<div class="d-flex gap-3"> |
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 void relateFileToContent(long fileId, String externalReferenceCode) throws PortalException { | |
long groupId = _b3MigratorSystemConfiguration.clientsGroupId(); | |
AssetEntry journalArticleEntry = getJournalArticleEntry(externalReferenceCode, groupId); | |
AssetEntry fileEntry = getFileEntry(fileId, groupId); | |
if (Validator.isNotNull(journalArticleEntry) && Validator.isNotNull(fileEntry)) { | |
relateEntries(journalArticleEntry, fileEntry); | |
relateEntries(fileEntry, journalArticleEntry); |
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.service.UserLocalServiceUtil | |
import com.liferay.portal.kernel.util.PortalUtil | |
def deleteUsersByEmails(emails) { | |
def company = PortalUtil.getCompany(actionRequest) | |
def companyId = company.getCompanyId() | |
for (email in emails.split('\n')) { | |
try { | |
def user = UserLocalServiceUtil.fetchUserByEmailAddress(companyId, email.trim()) |
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.asset.kernel.model.AssetEntry; | |
import com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil; | |
import com.liferay.asset.kernel.service.persistence.AssetEntryQuery; | |
import com.liferay.portal.kernel.json.JSONFactoryUtil; | |
import com.liferay.portal.kernel.util.LocaleUtil; | |
Locale locale = LocaleUtil.BRAZIL; | |
long groupId = 0; | |
long curseStructureId = 0; | |
long eventStructureI = 0; |
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
<#-- | |
Configurações para habilitar serviceLocor localizar classes java | |
não instanciadas por BaseService e BaseLocalService | |
Setar varável em `portal-ext.properties` | |
template.engine.service.locator.restrict=false | |
--> | |
<#assign |
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
<#assign | |
userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService") | |
userId = 0 | |
user = userLocalService.getUser(userId) | |
userPerfilType = user.getExpandoBridge().getAttribute("userPerfilType") | |
> | |
<p> | |
${userPerfilType} | |
</p> |
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.document.library.kernel.service.DLAppLocalServiceUtil | |
import com.liferay.document.library.util.DLURLHelperUtil | |
import com.liferay.portal.kernel.service.ServiceContextThreadLocal | |
import com.liferay.portal.kernel.util.MimeTypesUtil | |
import java.nio.file.Path | |
import java.nio.file.StandardCopyOption | |
import java.nio.file.Files | |
serviceContext = ServiceContextThreadLocal.getServiceContext() |
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
<%@ include file="/init.jsp" %> | |
<portlet:defineObjects /> | |
<portlet:actionURL name="registerUser" var="registerUser"> </portlet:actionURL> | |
<div class="container items-align-center justify-content-center mt-5"> | |
<h2>Cadastro de usuário</h2> | |
<form action="${registerUser}" method="post"> | |
<div class="form-row"> |
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
package user.register.portlet; | |
import com.liferay.expando.kernel.model.ExpandoBridge; | |
import com.liferay.expando.kernel.util.ExpandoBridgeFactoryUtil; | |
import com.liferay.portal.kernel.exception.PortalException; | |
import com.liferay.portal.kernel.model.User; | |
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet; | |
import com.liferay.portal.kernel.service.ServiceContext; | |
import com.liferay.portal.kernel.service.ServiceContextFactory; | |
import com.liferay.portal.kernel.service.UserLocalServiceUtil; |
NewerOlder