Skip to content

Instantly share code, notes, and snippets.

View fabian-bouche-liferay's full-sized avatar

Fabian Bouché fabian-bouche-liferay

View GitHub Profile
@fabian-bouche-liferay
fabian-bouche-liferay / addRemoveFilesAndFolderPermissionsForRole.groovy
Created June 27, 2025 20:07 — forked from mraandrews/addRemoveFilesAndFolderPermissionsForRole.groovy
Liferay script for Bulk Adding/Removing DLFolder and DLFileEntry Permission Actions for Roles
/**
* Author: mraandrews@gmail.com
* Name: addRemoveFilesAndFolderPermissionsForRole.groovy
*
* Prerequisits: Runs in the Liferay Admin Gui script console
Run with HTML output selected
*
* Description: This script will add and remove the permissions for folders and files in Liferay's DAM (Documents and Media Feature). You can add a folder ID of the folder
* you'd like to start with, and it will recurse the folders and files, changing their permissions. You need ot target the site you want to do this in, and provide
* the roles and permissions for the files and folders.
@fabian-bouche-liferay
fabian-bouche-liferay / LiferayService.js
Created January 21, 2025 12:12 — forked from lgdd/LiferayService.js
Liferay Service to call REST APIs within Client Extensions
/**
* @module LiferayService
* A service for making API calls to Liferay REST endpoints using Liferay.Util.fetch.
*/
const LiferayService = (() => {
/**
* @private
* Makes an API call using Liferay.Util.fetch.
*
* @async
@fabian-bouche-liferay
fabian-bouche-liferay / Notes.md
Created August 30, 2024 13:48 — forked from chrisvest/Notes.md
PrintCompilation on different versions of HotSpot VM

About PrintCompilation

This note tries to document the output of PrintCompilation flag in HotSpot VM. It was originally intended to be a reply to a blog post on PrintCompilation from Stephen Colebourne. It's kind of grown too big to fit as a reply, so I'm putting it here.

Written by: Kris Mok rednaxelafx@gmail.com

Most of the contents in this note are based on my reading of HotSpot source code from OpenJDK and experimenting with the VM flags; otheres come from HotSpot mailing lists and other reading materials listed in the "References" section.

This

package com.imolczek.lab.liferay.testportlet.portlet;
import java.io.IOException;
import javax.portlet.ActionURL;
import javax.portlet.Portlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceURL;
package com.liferay.samples.fbo.custom;
import java.io.IOException;
import java.util.Enumeration;
import java.util.Map;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.filter.FilterChain;
package com.liferay.samples.fbo.custom;
import java.util.List;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.model.Layout;
package com.liferay.samples.fbo.custom;
import java.util.List;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.liferay.document.library.kernel.service.DLAppService;
import com.liferay.document.library.kernel.service.DLAppServiceWrapper;
package com.liferay.samples.fbo.coe.samlmapper;
import javax.servlet.http.Cookie;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import com.liferay.portal.kernel.cache.MultiVMPool;
package com.liferay.samples.fbo.coe.samlmapper;
import java.io.IOException;
import java.util.UUID;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
@fabian-bouche-liferay
fabian-bouche-liferay / DDMFormExamples.java
Created July 6, 2020 14:48
Examples d'usages des API DDM Form
// Une instance de formulaire (le formulaire qu'on remplit)
DDMFormInstance DDMFormInstance;
// Initialisation du service context
ServiceContext serviceContext = ServiceContextFactory.getInstance(
DDMFormInstanceRecord.class.getName(), resourceRequest);
serviceContext.setAttribute("status", WorkflowConstants.STATUS_DRAFT);
serviceContext.setAttribute("validateDDMFormValues", Boolean.FALSE);
serviceContext.setWorkflowAction(WorkflowConstants.ACTION_SAVE_DRAFT);