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
public static void visitRecursively(Node node, Session currentSession) { | |
try{ | |
NodeIterator list = node.getNodes(); | |
while(list.hasNext()) { | |
Node childNode = list.nextNode(); | |
// Verify child node for cqPage type | |
if((childNode.hasProperty("jcr:primaryType")) && (childNode.getProperty("jcr:primaryType").getValue().getString()).equals("cq:Page") ){ | |
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
package apps.clientlib_async.sightly.templates; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.io.StringWriter; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.ArrayList; | |
import javax.script.Bindings; |
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
<sly data-sly-use.component="template.html" | |
data-sly-call="${component.template @ properties=properties}" /> |
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
<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}"> | |
<!--/* for css+js */--> | |
<meta data-sly-call="${clientLib.all @ categories='your.clientlib'}" data-sly-unwrap></meta> | |
<!--/* only js */--> | |
<meta data-sly-call="${clientLib.js @ categories='your.clientlib'}" data-sly-unwrap></meta> | |
<!--/* only css */--> | |
<meta data-sly-call="${clientLib.css @ categories='your.clientlib'}" data-sly-unwrap></meta> |
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
package com.sixdimensions.wcm.cq.it; | |
import java.io.IOException; | |
import org.apache.sling.testing.tools.http.RequestExecutor; | |
import org.apache.sling.testing.tools.sling.SlingClient; | |
import org.apache.sling.testing.tools.sling.SlingTestBase; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
package com.adobe.aem.guides.wknd.core.components.impl; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertFalse; | |
import static org.junit.Assert.assertNull; | |
import static org.junit.Assert.assertTrue; | |
import static org.mockito.Mockito.mock; | |
import static org.mockito.Mockito.when; | |
import static org.mockito.Mockito.doReturn; | |
import static org.mockito.ArgumentMatchers.*; |
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
<%@include file="/libs/foundation/global.jsp"%><% | |
%><%@page session="false" contentType="text/html; charset=utf-8" | |
pageEncoding="UTF-8" | |
import="org.apache.sling.api.resource.*, | |
com.day.commons.datasource.poolservice.DataSourcePool, | |
javax.sql.*, | |
java.sql.*, | |
java.util.*, | |
javax.jcr.*, |
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 java.text.DateFormat; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
import javax.jcr.Item; | |
import javax.jcr.Node; | |
import javax.jcr.NodeIterator; | |
import javax.jcr.PathNotFoundException; |
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
<plugin> | |
<groupId>com.day.jcr.vault</groupId> | |
<artifactId>content-package-maven-plugin</artifactId> | |
<!--Your other properties and build definition --> | |
<configuration> | |
<!-- All CQ package you want to install as part of your build --> | |
<subPackages> | |
<subPackage> | |
<groupId>YOUR SHARED GROUPID</groupId> | |
<artifactId>YOUR SHARED ARTIFACT</artifactId> |
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 java.util.Comparator; | |
import javax.jcr.query.Row; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.sling.api.resource.ValueMap; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import com.day.cq.search.Predicate; | |
import com.day.cq.search.eval.AbstractPredicateEvaluator; | |
import com.day.cq.search.eval.EvaluationContext; |