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 Iterator<Page> getChildren() { | |
ResourceResolver resourceResolver = resource.getResourceResolver(); | |
String query = "SELECT * FROM [nt:unstructured] AS s " | |
+ "WHERE [title] IS NOT NULL " | |
+ "ORDER BY [created] DESC"; | |
Iterator<Resource> children = resourceResolver.findResources(query, Query.JCR_SQL2); | |
return ResourceUtil.adaptTo(children,Page.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
<form method="POST" id="registerForm"> | |
<input name="email" value="emily.andrews@mailinator.com" id="email"/> | |
<input type="submit" name="submit" id="submit"/> | |
</form> | |
<script type="text/javascript"> | |
"use strict"; | |
// Get our registration form | |
var registerForm = document.querySelector("#registerForm"); |
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 org.millr.core.servlets; | |
import java.io.IOException; | |
import java.rmi.ServerException; | |
import org.apache.felix.scr.annotations.sling.SlingServlet; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; | |
import org.apache.sling.api.servlets.SlingAllMethodsServlet; | |
import org.apache.sling.commons.json.JSONObject; |
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 org.millr.slick.auth; | |
import org.apache.felix.scr.annotations.Activate; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Deactivate; | |
import org.apache.felix.scr.annotations.Properties; | |
import org.apache.felix.scr.annotations.Property; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.sling.api.resource.ResourceResolverFactory; |
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
<dropdown | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/select" | |
fieldLabel="Dropdown" | |
name="./dropdown" | |
rootPath="/content"> | |
<!-- Params: value, text, path --> | |
<datasource | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="myapp/components/utilities/datasource" |
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
<%@page session="false" import=" | |
org.apache.sling.api.resource.Resource, | |
org.apache.sling.api.resource.ResourceUtil, | |
org.apache.sling.api.resource.ValueMap, | |
org.apache.sling.api.resource.ResourceResolver, | |
org.apache.sling.api.resource.ResourceMetadata, | |
org.apache.sling.api.wrappers.ValueMapDecorator, | |
java.util.List, | |
java.util.ArrayList, | |
java.util.HashMap, |
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 org.millr.slick.utils; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.resource.Resource; | |
import org.apache.sling.models.annotations.Model; | |
@Model(adaptables=SlingHttpServletRequest.class) | |
public class Externalizer { | |
private SlingHttpServletRequest request; |
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
#!/bin/bash | |
now="$(date +'%d-%m-%Y')" | |
logfile="compact-$now.log" | |
installfolder="/data/aem" | |
aemfolder="$installfolder/crx-quickstart" | |
oakrun="$installfolder/help/oak-run-1.0.18.jar" | |
## Shutdown AEM | |
printf "Shutting down AEM.\n" | |
$aemfolder/bin/stop |
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
// Get our current resolver. | |
ResourceResolver resolver = request.getResourceResolver(); | |
// Adapt to an anonymous session and get the repo as anonymous. | |
JackrabbitSession session = (JackrabbitSession) resolver.adaptTo(Session.class); | |
Repository repository = session.getRepository(); | |
// Create a new session by logging into using the default admin username and password. | |
Session adminSession = repository.login(new SimpleCredentials("admin", "admin".toCharArray())); |
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
Verifying that +millar is my blockchain ID. https://onename.com/millar |