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.wemblog.cq.core.servlet; | |
import com.day.cq.dam.api.Asset; | |
import com.day.cq.dam.commons.util.DamUtil; | |
import com.wemblog.utility.RunModeUtil; | |
import java.io.IOException; | |
import java.util.Dictionary; | |
import javax.servlet.RequestDispatcher; | |
import javax.servlet.ServletException; | |
import org.apache.commons.lang3.StringUtils; |
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.test; | |
import java.util.HashMap; | |
import java.util.Map; | |
import com.adobe.cq.sightly.WCMUse; | |
public class WcmUseSample extends WCMUse { | |
private Map<String, String> myHashMap; | |
public void activate() throws Exception { |
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 | |
import org.osgi.framework.ServiceRegistration; | |
import org.apache.sling.auth.core.spi.AuthenticationHandler; | |
import org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler; | |
//Your Custom Auth handler class | |
public class CustomAuthHandler extends DefaultAuthenticationFeedbackHandler implements AuthenticationHandler { | |
//All Your Logic | |
private ServiceRegistration loginModule; | |
//All Your Logic |
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.security.Principal; | |
import java.util.Hashtable; | |
import java.util.Map; | |
import java.util.Set; | |
import javax.jcr.Credentials; | |
import javax.jcr.RepositoryException; | |
import javax.jcr.Session; | |
import javax.security.auth.callback.CallbackHandler; |
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 org.apache.sling.auth.core.spi.AuthenticationFeedbackHandler; | |
import org.apache.sling.auth.core.spi.AuthenticationHandler; | |
import org.apache.sling.auth.core.spi.DefaultAuthenticationFeedbackHandler; | |
@Component(metatype = true, immediate = true, label = "My Custom Authentication Handelr", | |
description="Authenticates User Against Citrix One Web Service") | |
@Service | |
@Properties({ | |
@Property(name = AuthenticationHandler.PATH_PROPERTY, value = "/"), | |
@Property(name = Constants.SERVICE_DESCRIPTION, value = "My Custom Authentication Handler") }) |
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; |
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 javax.jcr.Node; | |
import javax.jcr.RepositoryException; | |
import org.apache.sling.api.resource.LoginException; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.api.resource.ResourceResolver; | |
import org.apache.sling.api.resource.ResourceResolverFactory; | |
import org.apache.sling.api.resource.ValueMap; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
NewerOlder