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
# Adding include/exclude rules to CQ/AEM package filters through cURL. | |
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands. | |
# However, I haven't seen an example of adding rules to package filters. The | |
# JSON "rules" key takes an array value. You can leave the array empty if you | |
# don't need to include any rules. The array is of JSON objects with a | |
# "modifier" key and value of "include" or "exclude", and a "pattern" key with | |
# your path or regular expression as the value. | |
# create package |
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.nateyolles.aem; | |
import org.apache.felix.scr.annotations.Reference; | |
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.SlingSafeMethodsServlet; | |
import org.apache.sling.engine.SlingRequestProcessor; |
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.nateyolles.sling; | |
import org.apache.felix.scr.annotations.Reference; | |
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.SlingSafeMethodsServlet; | |
import org.apache.sling.engine.SlingRequestProcessor; |
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.nateyolles.sling.publick.services.impl; | |
import java.io.IOException; | |
import java.util.Dictionary; | |
import java.util.Hashtable; | |
import java.util.Map; | |
import org.apache.commons.lang.StringUtils; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Reference; |
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.nateyolles.sling.publick.services.impl; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.apache.felix.scr.annotations.Component; | |
import org.apache.felix.scr.annotations.Reference; | |
import org.apache.felix.scr.annotations.Service; | |
import org.apache.felix.scr.annotations.Properties; | |
import org.apache.felix.scr.annotations.Property; |
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.nateyolles.aem; | |
import org.osgi.framework.InvalidSyntaxException; | |
import org.osgi.service.cm.Configuration; | |
import org.apache.felix.scr.annotations.Reference; | |
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; |
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
# Simulated checked checkbox. The value is saved as a Boolean type with the value of true. | |
curl http://localhost:4502/test -u admin:admin -Fcheck="true" -Fcheck@TypeHint="Boolean" | |
# Simulated unchecked checkbox. No value for "check" is submitted and the JCR property value remains unchanged. | |
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" | |
# Simulated unchecked checkbox with Delete suffix. The JCR property is removed. | |
curl http://localhost:4502/test -u admin:admin -Fcheck@TypeHint="Boolean" -Fcheck@Delete="true" | |
# Simulated unchecked checkbox with TypeHint, DefaultValue and UseDefaultWhenMissing suffixes. |
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
<!-- Checked checkbox will result in a String property of "true" --> | |
<myCheckbox | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/checkbox" | |
text="My Checkbox" | |
name="./myCheckbox" | |
value="true"/> | |
<!-- Checked checkbox will result in a Boolean property of true--> | |
<myBooleanCheckbox |
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
<!-- Checked checkbox will result in a String property of "true" --> | |
<myCheckbox | |
jcr:primaryType="cq:Widget" | |
fieldLabel="My Checkbox" | |
name="./myCheckbox" | |
type="checkbox" | |
xtype="selection"/> | |
<!-- Checked checkbox will result in a Boolean property of true--> | |
<myBooleanCheckbox |
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
<!-- Checked checkbox will result in a String property of "on" --> | |
<myCheckbox | |
jcr:primaryType="cq:Widget" | |
fieldLabel="My Checkbox" | |
name="./myCheckbox" | |
xtype="checkbox"/> | |
<!-- Checked checkbox will result in a Boolean property of true --> | |
<myBooleanCheckbox | |
jcr:primaryType="cq:Widget" |
OlderNewer