This file contains 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
@Field private registry | |
import groovy.transform.Field | |
import info.magnolia.objectfactory.Components | |
import info.magnolia.virtualuri.VirtualUriRegistry | |
import static java.util.stream.Collectors.joining | |
registry = Components.getComponent(VirtualUriRegistry.class) |
This file contains 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
/** | |
* Google Apps Script - List all files & folders in a Google Drive folder, & write into a speadsheet. | |
* - Main function 1: List all folders | |
* - Main function 2: List all files & folders | |
* | |
* Hint: Set your folder ID first! You may copy the folder ID from the browser's address field. | |
* The folder ID is everything after the 'folders/' portion of the URL. | |
* | |
* @version 1.0 | |
* @see https://github.com/mesgarpour |
This file contains 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 info.magnolia.repository.RepositoryConstants | |
import javax.jcr.Node | |
import info.magnolia.jcr.util.NodeUtil | |
import org.apache.commons.lang.StringUtils | |
import info.magnolia.cms.util.QueryUtil | |
website = ctx.getJCRSession("website") | |
listComponents(website.getNode("/some-path")) |
This file contains 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 static info.magnolia.jcr.util.NodeUtil.isNodeType; | |
import static org.apache.commons.lang3.StringUtils.substringBeforeLast; | |
exportPath = "/modules/ui-admincentral/commands" | |
filterJCR = true | |
filterMGNL = true | |
session = MgnlContext.getJCRSession('config') | |
node = session.getNode(exportPath); | |
zeroDepth = node.getDepth() |