A Guide to setup and use Plantuml
- JRE: https://adoptopenjdk.net/
- GraphViz: https://graphviz.org/download/
- VSCode IDE: https://code.visualstudio.com/Download
- vs code Plugin: https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
# 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 method is used to Query the JCR and find results as per the Query.*/ | |
def buildQuery(parent) { | |
def queryManager = session.workspace.queryManager; | |
def statement = 'select * from [nt:file] as t where ISDESCENDANTNODE(['+parent+']) AND NAME() LIKE \'%.jpg\''; | |
queryManager.createQuery(statement, 'JCR-SQL2'); | |
} | |
final def query = buildQuery(<replace_parent_path_here>); | |
final def result = query.execute() |
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F | |
bundlefile=@"name of jar.jar" http://localhost:4505/system/console/bundles | |
Build a bundle | |
curl -u admin:admin -F bundleHome=/apps/centrica/bundles/name of bundle -F | |
descriptor=/apps/centrica/bundles/com.centrica.cq.wcm.core-bundle/name_of_bundle.bnd |
<?xml version="1.0" encoding="UTF-8"?> | |
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
jcr:primaryType="sling:OsgiConfig" | |
linkcheckertransformer.strictExtensionCheck="{Boolean}false" | |
linkcheckertransformer.rewriteElements="[a:href,area:href,form:action]" | |
linkcheckertransformer.disableRewriting="{Boolean}false" | |
linkcheckertransformer.disableChecking="{Boolean}false" | |
linkcheckertransformer.stripHtmltExtension="{Boolean}true" | |
linkcheckertransformer.mapCacheSize="{Long}5000"/> |
{ | |
"jcr:primaryType": "sling:Folder", | |
"weretail.com": { | |
"jcr:primaryType": "sling:Mapping", | |
"sling:internalRedirect": [ | |
"/content/we-retail/us/en" | |
], | |
"weretail_com_content": { | |
"jcr:primaryType": "sling:Mapping", |
@Model( | |
adaptables = Resource.class, | |
resourceType = "acme/components/sling-model" | |
) | |
@Exporter(name = "jackson", extensions = "json") | |
public class MyModel { | |
@Inject @Named("jcr:title") | |
private String title; |
<?xml version="1.0" encoding="UTF-8"?> | |
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
jcr:primaryType="sling:OsgiConfig" | |
resource.resolver.searchpath="[/apps,/libs,/apps/foundation/components/primary,/libs/foundation/components/primary]" | |
resource.resolver.manglenamespaces="{Boolean}true" | |
resource.resolver.allowDirect="{Boolean}true" | |
resource.resolver.required.providers="[org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory]" | |
resource.resolver.virtual="[/:/]" | |
resource.resolver.mapping="[/-/,/content/we-retail/us/en/-/]" | |
resource.resolver.map.location="/etc/map" |
package com.aem.project.core.servlets; | |
import com.adobe.cq.commerce.common.ValueMapDecorator; | |
import com.adobe.granite.ui.components.ds.DataSource; | |
import com.adobe.granite.ui.components.ds.SimpleDataSource; | |
import com.adobe.granite.ui.components.ds.ValueMapResource; | |
import com.day.crx.JcrConstants; | |
import org.apache.commons.collections4.iterators.TransformIterator; | |
import org.apache.sling.api.SlingHttpServletRequest; | |
import org.apache.sling.api.SlingHttpServletResponse; |
---Reactor pom (add dependencies) | |
<dependency> | |
<groupId>com.adobe.acs</groupId> | |
<artifactId>acs-aem-commons-content</artifactId> | |
<version>3.2.4</version> | |
<type>content-package</type> | |
<classifier>min</classifier> | |
</dependency> | |
<dependency> |
Plantuml