├── .gitignore ├── README.md ├── all ├── pom.xml └── src │ └── main │ └── content │ └── META-INF │ └── vault │ ├── definition │ └── .content.xml │ └── filter.xml ├── core ├── pom.xml └── src │ └── main │ └── java │ └── org │ └── redquark │ └── aem │ └── tutorials │ └── core │ ├── components │ └── FetchTODO.java │ ├── configs │ ├── CardConfiguration.java │ └── WorkflowStatusConfiguration.java │ ├── constants │ └── AppConstants.java │ ├── events │ ├── handler │ │ ├── PageActivationEventHandler.java │ │ └── PageUpdatedEventHandler.java │ └── listener │ │ └── PropertyEventListener.java │ ├── jobs │ └── PageReplicationJob.java │ ├── models │ ├── Card.java │ ├── User.java │ ├── impl │ │ ├── CardImpl.java │ │ └── UserImpl.java │ └── package-info.java │ ├── schedulers │ └── WorkflowStatusScheduler.java │ ├── services │ ├── CardService.java │ ├── EmailService.java │ ├── ReferencedAssetService.java │ ├── ReplicationService.java │ ├── ResourceResolverService.java │ ├── SearchService.java │ ├── WriteTODOService.java │ └── impl │ │ ├── CardServiceImpl.java │ │ ├── EmailServiceImpl.java │ │ ├── ReferencedAssetServiceImpl.java │ │ ├── ReplicationServiceImpl.java │ │ ├── ResourceResolverServiceImpl.java │ │ ├── SearchServiceImpl.java │ │ └── WriteTODOServiceImpl.java │ ├── servlets │ ├── DynamicDataSourceServlet.java │ ├── ExecuteReviewContentServlet.java │ ├── FetchTODOServlet.java │ ├── ListNodesServlet.java │ └── SearchServlet.java │ ├── utils │ ├── DropdownData.java │ └── IDGenerator.java │ └── workflows │ ├── participant │ ├── ApprovePageContentStep.java │ └── ReviewChildrenPagesStep.java │ └── process │ ├── FetchChildrenPagesStep.java │ └── UpdateReferencedAssetsWorkflow.java ├── pom.xml ├── ui.apps.structure └── pom.xml ├── ui.apps ├── .gitignore ├── pom.xml └── src │ └── main │ └── content │ ├── META-INF │ └── vault │ │ └── filter.xml │ └── jcr_root │ └── apps │ ├── .content.xml │ └── aemtutorials │ ├── clientlibs │ ├── clientlib-base │ │ ├── .content.xml │ │ ├── css.txt │ │ └── js.txt │ ├── clientlib-dependencies │ │ ├── .content.xml │ │ ├── css.txt │ │ └── js.txt │ ├── clientlib-grid │ │ ├── .content.xml │ │ ├── css.txt │ │ └── less │ │ │ └── grid.less │ ├── clientlib-site │ │ ├── .content.xml │ │ ├── css.txt │ │ └── js.txt │ └── customClientlibs │ │ ├── .content.xml │ │ ├── css.txt │ │ ├── js.txt │ │ └── js │ │ ├── altTextValidation.js │ │ └── altTextValidation.js.dir │ │ └── .content.xml │ ├── components │ ├── content │ │ ├── card │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── card.html │ │ │ ├── card.html.dir │ │ │ │ └── .content.xml │ │ │ └── clientlib │ │ │ │ ├── .content.xml │ │ │ │ ├── css.txt │ │ │ │ └── css │ │ │ │ └── style.css │ │ ├── htl │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── htl.html │ │ │ ├── htl.html.dir │ │ │ │ └── .content.xml │ │ │ └── index.html │ │ ├── image │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── image.html │ │ │ └── image.html.dir │ │ │ │ └── .content.xml │ │ ├── preferences │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── preferences.html │ │ │ └── preferences.html.dir │ │ │ │ └── .content.xml │ │ ├── search │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── clientlibs │ │ │ │ ├── .content.xml │ │ │ │ ├── css.txt │ │ │ │ ├── css │ │ │ │ │ └── style.css │ │ │ │ ├── js.txt │ │ │ │ └── js │ │ │ │ │ └── script.js │ │ │ └── search.html │ │ ├── text │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ ├── text.html │ │ │ └── text.html.dir │ │ │ │ └── .content.xml │ │ ├── todo │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ │ └── .content.xml │ │ │ └── todo.html │ │ └── user │ │ │ ├── .content.xml │ │ │ ├── _cq_dialog │ │ │ └── .content.xml │ │ │ ├── user.html │ │ │ └── user.html.dir │ │ │ └── .content.xml │ ├── page │ │ ├── .content.xml │ │ ├── customfooterlibs.html │ │ └── customheaderlibs.html │ └── structure │ │ └── page │ │ └── .content.xml │ ├── config │ └── org.apache.sling.commons.log.LogManager.factory.config-aemtutorials.xml │ ├── i18n │ ├── .content.xml │ ├── fr.json │ └── fr.json.dir │ │ └── .content.xml │ ├── templates │ ├── page-content │ │ └── .content.xml │ └── page-home │ │ └── .content.xml │ └── tests │ ├── .content.xml │ ├── SampleTests.js │ └── js.txt ├── ui.content ├── pom.xml └── src │ └── main │ └── content │ ├── META-INF │ └── vault │ │ └── filter.xml │ └── jcr_root │ ├── conf │ └── aemtutorials │ │ ├── .content.xml │ │ └── settings │ │ ├── .content.xml │ │ └── wcm │ │ ├── .content.xml │ │ ├── policies │ │ ├── .content.xml │ │ └── _rep_policy.xml │ │ ├── segments │ │ ├── .content.xml │ │ ├── summer │ │ │ └── .content.xml │ │ └── winter │ │ │ └── .content.xml │ │ ├── template-types │ │ ├── .content.xml │ │ ├── _rep_policy.xml │ │ ├── base-page │ │ │ ├── .content.xml │ │ │ ├── initial │ │ │ │ └── .content.xml │ │ │ ├── policies │ │ │ │ └── .content.xml │ │ │ └── structure │ │ │ │ └── .content.xml │ │ ├── page │ │ │ ├── .content.xml │ │ │ ├── initial │ │ │ │ └── .content.xml │ │ │ ├── policies │ │ │ │ └── .content.xml │ │ │ ├── structure │ │ │ │ └── .content.xml │ │ │ ├── thumbnail.png │ │ │ └── thumbnail.png.dir │ │ │ │ ├── .content.xml │ │ │ │ └── _jcr_content │ │ │ │ └── _dam_thumbnails │ │ │ │ ├── _dam_thumbnail_300.png │ │ │ │ ├── _dam_thumbnail_319.png │ │ │ │ └── _dam_thumbnail_48.png │ │ └── xf │ │ │ ├── .content.xml │ │ │ ├── initial │ │ │ └── .content.xml │ │ │ ├── policies │ │ │ └── .content.xml │ │ │ ├── structure │ │ │ └── .content.xml │ │ │ └── thumbnail.png │ │ └── templates │ │ ├── .content.xml │ │ ├── _rep_policy.xml │ │ ├── base-template │ │ ├── .content.xml │ │ ├── initial │ │ │ └── .content.xml │ │ ├── policies │ │ │ └── .content.xml │ │ └── structure │ │ │ └── .content.xml │ │ ├── page-content │ │ ├── .content.xml │ │ ├── initial │ │ │ └── .content.xml │ │ ├── policies │ │ │ └── .content.xml │ │ ├── structure │ │ │ └── .content.xml │ │ ├── thumbnail.png │ │ └── thumbnail.png.dir │ │ │ ├── .content.xml │ │ │ └── _jcr_content │ │ │ └── _dam_thumbnails │ │ │ ├── _dam_thumbnail_300.png │ │ │ ├── _dam_thumbnail_319.png │ │ │ └── _dam_thumbnail_48.png │ │ ├── spa-app-template │ │ ├── .content.xml │ │ ├── initial │ │ │ └── .content.xml │ │ ├── policies │ │ │ └── .content.xml │ │ └── structure │ │ │ └── .content.xml │ │ ├── spa-page-template │ │ ├── .content.xml │ │ ├── initial │ │ │ └── .content.xml │ │ ├── policies │ │ │ └── .content.xml │ │ └── structure │ │ │ └── .content.xml │ │ └── xf-web-variation │ │ ├── .content.xml │ │ ├── initial │ │ └── .content.xml │ │ ├── policies │ │ └── .content.xml │ │ ├── structure │ │ └── .content.xml │ │ ├── thumbnail.png │ │ └── thumbnail.png.dir │ │ ├── .content.xml │ │ └── _jcr_content │ │ └── _dam_thumbnails │ │ ├── _dam_thumbnail_128.png │ │ └── _dam_thumbnail_319.png │ ├── content │ ├── aemtutorials │ │ ├── .content.xml │ │ ├── _jcr_content │ │ │ └── image │ │ │ │ ├── file │ │ │ │ └── file.dir │ │ │ │ ├── .content.xml │ │ │ │ └── _jcr_content │ │ │ │ └── _dam_thumbnails │ │ │ │ ├── _dam_thumbnail_48.png │ │ │ │ └── _dam_thumbnail_480.png │ │ └── us │ │ │ ├── .content.xml │ │ │ └── en │ │ │ ├── .content.xml │ │ │ ├── base-page │ │ │ └── .content.xml │ │ │ └── home │ │ │ └── .content.xml │ ├── dam │ │ ├── .content.xml │ │ └── aemtutorials │ │ │ ├── .content.xml │ │ │ ├── _jcr_content │ │ │ └── folderThumbnail │ │ │ ├── asset.jpg │ │ │ ├── .content.xml │ │ │ └── _jcr_content │ │ │ │ └── renditions │ │ │ │ ├── cq5dam.thumbnail.140.100.png │ │ │ │ ├── cq5dam.thumbnail.319.319.png │ │ │ │ ├── cq5dam.thumbnail.48.48.png │ │ │ │ ├── cq5dam.web.1280.1280.jpeg │ │ │ │ ├── original │ │ │ │ └── original.dir │ │ │ │ └── .content.xml │ │ │ ├── color.json │ │ │ ├── .content.xml │ │ │ └── _jcr_content │ │ │ │ └── renditions │ │ │ │ ├── original │ │ │ │ └── original.dir │ │ │ │ └── .content.xml │ │ │ ├── country.json │ │ │ ├── .content.xml │ │ │ └── _jcr_content │ │ │ │ └── renditions │ │ │ │ ├── original │ │ │ │ └── original.dir │ │ │ │ └── .content.xml │ │ │ └── font.json │ │ │ ├── .content.xml │ │ │ └── _jcr_content │ │ │ └── renditions │ │ │ ├── original │ │ │ └── original.dir │ │ │ └── .content.xml │ └── experience-fragments │ │ └── aemtutorials │ │ ├── .content.xml │ │ └── us │ │ ├── .content.xml │ │ └── en │ │ ├── .content.xml │ │ └── site │ │ ├── .content.xml │ │ ├── footer │ │ ├── .content.xml │ │ └── master │ │ │ └── .content.xml │ │ └── header │ │ ├── .content.xml │ │ └── master │ │ └── .content.xml │ └── var │ ├── .content.xml │ ├── _rep_policy.xml │ └── workflow │ ├── .content.xml │ ├── _rep_policy.xml │ └── models │ └── aemtutorials │ ├── .content.xml │ ├── approve_page_content.xml │ ├── review-content.xml │ └── update_referenced_assets.xml └── ui.frontend ├── .env ├── .env.development ├── README.md ├── assembly.xml ├── clientlib.config.js ├── package.json ├── pom.xml ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png └── manifest.json ├── src ├── App.js ├── App.test.js ├── components │ ├── Page │ │ ├── Page.css │ │ ├── Page.js │ │ └── Page.test.js │ ├── RouteHelper │ │ ├── RouteHelper.js │ │ └── RouteHelper.test.js │ ├── Text │ │ ├── Text.css │ │ ├── Text.js │ │ └── Text.test.js │ └── import-components.js ├── index.css ├── index.js ├── setupTests.js └── utils │ ├── extract-model-id.js │ └── extract-model-id.test.js └── utils └── entrypoints.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io/api/eclipse,java,maven 2 | 3 | ### Eclipse ### 4 | *.pydevproject 5 | .metadata 6 | .gradle 7 | bin/ 8 | tmp/ 9 | *.tmp 10 | *.bak 11 | *.swp 12 | *~.nib 13 | local.properties 14 | .settings/ 15 | .loadpath 16 | 17 | # Eclipse Core 18 | .project 19 | 20 | # External tool builders 21 | .externalToolBuilders/ 22 | 23 | # Locally stored "Eclipse launch configurations" 24 | *.launch 25 | 26 | # CDT-specific 27 | .cproject 28 | 29 | # JDT-specific (Eclipse Java Development Tools) 30 | .classpath 31 | 32 | # Java annotation processor (APT) 33 | .factorypath 34 | 35 | # PDT-specific 36 | .buildpath 37 | 38 | # sbteclipse plugin 39 | .target 40 | 41 | # TeXlipse plugin 42 | .texlipse 43 | 44 | 45 | ### Java ### 46 | *.class 47 | 48 | # Mobile Tools for Java (J2ME) 49 | .mtj.tmp/ 50 | 51 | # Package Files # 52 | *.jar 53 | *.war 54 | *.ear 55 | 56 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 57 | hs_err_pid* 58 | 59 | 60 | ### Maven ### 61 | target/ 62 | pom.xml.tag 63 | pom.xml.releaseBackup 64 | pom.xml.versionsBackup 65 | pom.xml.next 66 | release.properties 67 | dependency-reduced-pom.xml 68 | buildNumber.properties 69 | .mvn/timing.properties 70 | 71 | 72 | ### Vault ### 73 | .vlt 74 | 75 | 76 | ### IntelliJ ### 77 | .idea/ 78 | *.iml 79 | 80 | 81 | ### Node.js ### 82 | 83 | # Log files 84 | *.log 85 | 86 | # NPM 87 | node_modules/ 88 | package-lock.json 89 | yarn.lock 90 | 91 | # Webpack 92 | build/ 93 | dist/ 94 | 95 | # Frontend Maven Plugin 96 | node/ 97 | 98 | # Tests 99 | coverage/ 100 | -------------------------------------------------------------------------------- /all/src/main/content/META-INF/vault/definition/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /all/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/configs/CardConfiguration.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.configs; 2 | 3 | import org.osgi.service.metatype.annotations.AttributeDefinition; 4 | import org.osgi.service.metatype.annotations.ObjectClassDefinition; 5 | 6 | @ObjectClassDefinition( 7 | name = "AEM Tutorials Card Configuration", 8 | description = "This configuration captures the card details" 9 | ) 10 | public @interface CardConfiguration { 11 | 12 | @AttributeDefinition( 13 | name = "Organization Name", 14 | description = "Name of the organization you wish to display on the card" 15 | ) 16 | String getOrganizationName(); 17 | 18 | @AttributeDefinition( 19 | name = "Homepage URL", 20 | description = "URL of the website's homepage" 21 | ) 22 | String getHomepageURL(); 23 | } 24 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/configs/WorkflowStatusConfiguration.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.configs; 2 | 3 | import org.osgi.service.metatype.annotations.AttributeDefinition; 4 | import org.osgi.service.metatype.annotations.AttributeType; 5 | import org.osgi.service.metatype.annotations.ObjectClassDefinition; 6 | 7 | import static org.redquark.aem.tutorials.core.configs.WorkflowStatusConfiguration.CONFIGURATION_DESCRIPTION; 8 | import static org.redquark.aem.tutorials.core.configs.WorkflowStatusConfiguration.CONFIGURATION_NAME; 9 | 10 | @ObjectClassDefinition( 11 | name = CONFIGURATION_NAME, 12 | description = CONFIGURATION_DESCRIPTION 13 | ) 14 | public @interface WorkflowStatusConfiguration { 15 | 16 | String CONFIGURATION_NAME = "Workflow Status Configuration"; 17 | String CONFIGURATION_DESCRIPTION = "This configuration captures the details for getting workflow status and sending email"; 18 | String DEFAULT_EMAIL_ADDRESS = "anirudh03sharma@gmail.com"; 19 | 20 | @AttributeDefinition( 21 | name = "Scheduler Name", 22 | description = "Enter a unique identifier that represents name of the scheduler", 23 | type = AttributeType.STRING 24 | ) 25 | String schedulerName() default CONFIGURATION_NAME; 26 | 27 | @AttributeDefinition( 28 | name = "Enabled", 29 | description = "Check the box to enable the scheduler", 30 | type = AttributeType.BOOLEAN 31 | ) 32 | boolean enabled() default false; 33 | 34 | @AttributeDefinition( 35 | name = "Cron Expression", 36 | description = "Cron expression which will decide how the scheduler will run", 37 | type = AttributeType.STRING 38 | ) 39 | String cronExpression() default "0 * * * * ?"; 40 | 41 | @AttributeDefinition( 42 | name = "To Email", 43 | description = "Enter the email address of recipient in TO field", 44 | type = AttributeType.STRING 45 | ) 46 | String toEmail() default DEFAULT_EMAIL_ADDRESS; 47 | 48 | @AttributeDefinition( 49 | name = "Cc Email", 50 | description = "Enter the email address of recipient in CC field", 51 | type = AttributeType.STRING 52 | ) 53 | String ccEmail() default DEFAULT_EMAIL_ADDRESS; 54 | 55 | @AttributeDefinition( 56 | name = "From Email", 57 | description = "Enter the email addresses of the sender", 58 | type = AttributeType.STRING 59 | ) 60 | String fromEmail() default DEFAULT_EMAIL_ADDRESS; 61 | 62 | @AttributeDefinition( 63 | name = "Subject", 64 | description = "Enter the subject of the email", 65 | type = AttributeType.STRING 66 | ) 67 | String subject() default CONFIGURATION_NAME; 68 | } 69 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/constants/AppConstants.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.constants; 2 | 3 | /** 4 | * @author Anirudh Sharma 5 | *

6 | * This class keeps all the app level constants 7 | */ 8 | public final class AppConstants { 9 | 10 | public static final String FORWARD_SLASH = "/"; 11 | public static final String EQUALS = "="; 12 | public static final String NEW_LINE = "\n"; 13 | 14 | // TO-DO related constants 15 | public static final String TODO_ENDPOINT = "https://jsonplaceholder.typicode.com/todos/"; 16 | public static final long TODO_THREAD_SLEEP_TIME = 14400000; 17 | 18 | // Resource Resolver Factory sub-service 19 | public static final String SUB_SERVICE = "tutorialSubService"; 20 | 21 | // Workflow Process Label 22 | public static final String PROCESS_LABEL = "process.label"; 23 | // Workflow Chooser Label 24 | public static final String CHOOSER_LABEL = "chooser.label"; 25 | // Child page count 26 | public static final String CHILD_PAGE_COUNT = "childPageCount"; 27 | 28 | // User groups 29 | public static final String ADMINISTRATORS = "administrators"; 30 | public static final String CONTENT_AUTHORS = "content-authors"; 31 | 32 | // Dynamic datasource 33 | public static final String DATASOURCE = "datasource"; 34 | public static final String DROPDOWN_SELECTOR = "dropdownSelector"; 35 | public static final String COUNTRY_LIST = "countryList"; 36 | public static final String COUNTRY_LIST_PATH = "/content/dam/aemtutorials/country.json"; 37 | public static final String COLOR_LIST = "colorList"; 38 | public static final String COLOR_LIST_PATH = "/content/dam/aemtutorials/color.json"; 39 | public static final String FONT_LIST = "fontList"; 40 | public static final String FONT_LIST_PATH = "/content/dam/aemtutorials/font.json"; 41 | 42 | public static final String PAGE_REPLICATION_TOPIC = "aemtutorials/replication/job"; 43 | } 44 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/events/handler/PageUpdatedEventHandler.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.events.handler; 2 | 3 | import com.day.cq.wcm.api.PageEvent; 4 | import org.apache.sling.event.jobs.JobManager; 5 | import org.osgi.framework.Constants; 6 | import org.osgi.service.component.annotations.Component; 7 | import org.osgi.service.component.annotations.Reference; 8 | import org.osgi.service.event.Event; 9 | import org.osgi.service.event.EventConstants; 10 | import org.osgi.service.event.EventHandler; 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | 14 | import java.util.HashMap; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 19 | import static org.redquark.aem.tutorials.core.constants.AppConstants.PAGE_REPLICATION_TOPIC; 20 | 21 | @Component( 22 | immediate = true, 23 | service = EventHandler.class, 24 | property = { 25 | Constants.SERVICE_DESCRIPTION + "= This event handler listens to the events on page modification", 26 | EventConstants.EVENT_TOPIC + EQUALS + PageEvent.EVENT_TOPIC 27 | } 28 | ) 29 | public class PageUpdatedEventHandler implements EventHandler { 30 | 31 | private static final String TAG = PageUpdatedEventHandler.class.getSimpleName(); 32 | private static final Logger LOGGER = LoggerFactory.getLogger(PageUpdatedEventHandler.class); 33 | 34 | @Reference 35 | JobManager jobManager; 36 | 37 | @Override 38 | @SuppressWarnings("unchecked") 39 | public void handleEvent(Event event) { 40 | LOGGER.debug("{}: event occurred for topic: {}", TAG, event.getTopic()); 41 | try { 42 | // Get the payload path from the event 43 | List> modifications = (List>) event.getProperty("modifications"); 44 | // Payload path 45 | String payload = (String) modifications.get(0).get("path"); 46 | // Add stuff for the job 47 | Map jobProperties = new HashMap<>(); 48 | jobProperties.put("payload", payload); 49 | // Add this job to the job manager 50 | jobManager.addJob(PAGE_REPLICATION_TOPIC, jobProperties); 51 | LOGGER.info("{}: job is completed successfully", TAG); 52 | } catch (Exception e) { 53 | LOGGER.error("{}: exception occurred: {}", TAG, e.getMessage()); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/events/listener/PropertyEventListener.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.events.listener; 2 | 3 | import org.apache.sling.api.resource.ResourceResolver; 4 | import org.osgi.service.component.annotations.Activate; 5 | import org.osgi.service.component.annotations.Component; 6 | import org.osgi.service.component.annotations.Reference; 7 | import org.redquark.aem.tutorials.core.services.ResourceResolverService; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | 11 | import javax.jcr.RepositoryException; 12 | import javax.jcr.Session; 13 | import javax.jcr.observation.Event; 14 | import javax.jcr.observation.EventIterator; 15 | import javax.jcr.observation.EventListener; 16 | import java.util.Objects; 17 | 18 | @Component(service = EventListener.class, immediate = true) 19 | public class PropertyEventListener implements EventListener { 20 | 21 | private static final String TAG = PropertyEventListener.class.getSimpleName(); 22 | private static final Logger LOGGER = LoggerFactory.getLogger(PropertyEventListener.class); 23 | 24 | @Reference 25 | ResourceResolverService resourceResolverService; 26 | 27 | @Activate 28 | protected void activate() { 29 | try { 30 | // Getting the resource resolver 31 | ResourceResolver resourceResolver = resourceResolverService.getResourceResolver(); 32 | // Adapting the Resource Resolver to Session 33 | Session session = resourceResolver.adaptTo(Session.class); 34 | // Adding the event listener 35 | Objects.requireNonNull(session). 36 | getWorkspace(). 37 | getObservationManager(). 38 | addEventListener( 39 | this, Event.PROPERTY_ADDED | Event.NODE_ADDED, 40 | "/aemtutorials/data/todo", true, null, 41 | null, false 42 | ); 43 | } catch (RepositoryException e) { 44 | LOGGER.error("{}: exception occurred: {}", TAG, e.getMessage()); 45 | } 46 | } 47 | 48 | @Override 49 | public void onEvent(EventIterator events) { 50 | try { 51 | // Loop through all the events 52 | while (events.hasNext()) { 53 | // Get the current event 54 | Event event = events.nextEvent(); 55 | LOGGER.info("{}: Event was added by: {} at path: {}", TAG, event.getUserID(), event.getPath()); 56 | } 57 | } catch (RepositoryException e) { 58 | LOGGER.error("{}: exception occurred: {}: ", TAG, e.getMessage()); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/jobs/PageReplicationJob.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.jobs; 2 | 3 | import org.apache.sling.event.jobs.Job; 4 | import org.apache.sling.event.jobs.consumer.JobConsumer; 5 | import org.osgi.service.component.annotations.Component; 6 | import org.osgi.service.component.annotations.Reference; 7 | import org.redquark.aem.tutorials.core.services.ReplicationService; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | 11 | import static org.apache.sling.event.jobs.consumer.JobConsumer.PROPERTY_TOPICS; 12 | import static org.osgi.framework.Constants.SERVICE_DESCRIPTION; 13 | import static org.osgi.service.event.EventConstants.SERVICE_ID; 14 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 15 | import static org.redquark.aem.tutorials.core.constants.AppConstants.PAGE_REPLICATION_TOPIC; 16 | import static org.redquark.aem.tutorials.core.jobs.PageReplicationJob.SERVICE_NAME; 17 | 18 | @Component( 19 | immediate = true, 20 | service = JobConsumer.class, 21 | property = { 22 | SERVICE_ID + EQUALS + SERVICE_NAME, 23 | SERVICE_DESCRIPTION + EQUALS + "This job replicates the given payload", 24 | PROPERTY_TOPICS + EQUALS + PAGE_REPLICATION_TOPIC 25 | } 26 | ) 27 | public class PageReplicationJob implements JobConsumer { 28 | 29 | protected static final String SERVICE_NAME = "Page Replication Job"; 30 | private static final String TAG = PageReplicationJob.class.getSimpleName(); 31 | private static final Logger LOGGER = LoggerFactory.getLogger(PageReplicationJob.class); 32 | 33 | @Reference 34 | ReplicationService replicationService; 35 | 36 | @Override 37 | public JobResult process(Job job) { 38 | LOGGER.debug("{}: trying to execute job: {}", TAG, job.getTopic()); 39 | try { 40 | // Get the payload path from the job properties 41 | String payloadPath = (String) job.getProperty("payload"); 42 | // Call the replication service 43 | replicationService.replicateContent(payloadPath); 44 | return JobResult.OK; 45 | } catch (Exception e) { 46 | LOGGER.error("{}: job failed due to: {}", TAG, e.getMessage()); 47 | return JobResult.FAILED; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/models/Card.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.models; 2 | 3 | public interface Card { 4 | 5 | /** 6 | * @return the title of the card 7 | */ 8 | String getCardTitle(); 9 | 10 | /** 11 | * @return the text on the button 12 | */ 13 | String getButtonText(); 14 | 15 | /** 16 | * @return organization name from the osgi config 17 | */ 18 | String getOrganizationName(); 19 | 20 | /** 21 | * @return homepage url from the osgi config 22 | */ 23 | String getHomepageURL(); 24 | } 25 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/models/User.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.models; 2 | 3 | /** 4 | * @author Anirudh Sharma 5 | *

6 | * Represents the "User" component 7 | */ 8 | public interface User { 9 | 10 | /** 11 | * @return unique id of the user 12 | */ 13 | String getId(); 14 | 15 | /** 16 | * @return String to represent the name of the user 17 | */ 18 | String getName(); 19 | 20 | /** 21 | * @return String to represent the gender of the user 22 | */ 23 | String getGender(); 24 | 25 | /** 26 | * @return String to represent the address of the user 27 | */ 28 | String getAddress(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/models/impl/CardImpl.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.models.impl; 2 | 3 | import org.apache.sling.api.resource.Resource; 4 | import org.apache.sling.models.annotations.DefaultInjectionStrategy; 5 | import org.apache.sling.models.annotations.Model; 6 | import org.apache.sling.models.annotations.injectorspecific.OSGiService; 7 | import org.redquark.aem.tutorials.core.models.Card; 8 | import org.redquark.aem.tutorials.core.services.CardService; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | import javax.annotation.PostConstruct; 13 | import javax.inject.Inject; 14 | 15 | @Model( 16 | adaptables = {Resource.class}, 17 | adapters = {Card.class}, 18 | resourceType = {CardImpl.RESOURCE_TYPE}, 19 | defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL 20 | ) 21 | public class CardImpl implements Card { 22 | 23 | protected static final String RESOURCE_TYPE = "aemtutorials/components/content/card"; 24 | private static final Logger LOGGER = LoggerFactory.getLogger(CardImpl.class); 25 | private static final String TAG = CardImpl.class.getSimpleName(); 26 | 27 | @Inject 28 | String cardTitle; 29 | 30 | @Inject 31 | String buttonText; 32 | 33 | @OSGiService 34 | CardService cardService; 35 | 36 | private String organizationName; 37 | 38 | private String homepageURL; 39 | 40 | @PostConstruct 41 | protected void init() { 42 | organizationName = cardService.getOrganizationName(); 43 | homepageURL = cardService.getHomepageURL(); 44 | LOGGER.info("{}: organization name: {}", TAG, organizationName); 45 | LOGGER.info("{}: homepage url: {}", TAG, homepageURL); 46 | } 47 | 48 | @Override 49 | public String getCardTitle() { 50 | return cardTitle; 51 | } 52 | 53 | @Override 54 | public String getButtonText() { 55 | return buttonText; 56 | } 57 | 58 | public String getOrganizationName() { 59 | return organizationName; 60 | } 61 | 62 | public String getHomepageURL() { 63 | return homepageURL; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/models/package-info.java: -------------------------------------------------------------------------------- 1 | @Version("1.0") 2 | package org.redquark.aem.tutorials.core.models; 3 | 4 | import org.osgi.annotation.versioning.Version; -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/CardService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | public interface CardService { 4 | 5 | /** 6 | * @return name of the organization 7 | */ 8 | String getOrganizationName(); 9 | 10 | /** 11 | * @return URL of the home page 12 | */ 13 | String getHomepageURL(); 14 | } 15 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/EmailService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | public interface EmailService { 4 | 5 | void sendEmail( 6 | String toEmail, 7 | String ccEmail, 8 | String fromEmail, 9 | String subject, 10 | String content 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/ReferencedAssetService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | import com.day.cq.dam.api.Asset; 4 | 5 | import java.util.Map; 6 | 7 | public interface ReferencedAssetService { 8 | 9 | Map getReferencedAssets(String pagePath); 10 | } 11 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/ReplicationService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | public interface ReplicationService { 4 | 5 | void replicateContent(String payload); 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/ResourceResolverService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | import org.apache.sling.api.resource.ResourceResolver; 4 | 5 | /** 6 | * @author Anirudh Sharma 7 | *

8 | * This service gives instance of the resource resolver using service user approach 9 | */ 10 | public interface ResourceResolverService { 11 | 12 | /** 13 | * This method returns the instance of resource resolver 14 | * 15 | * @return @{@link ResourceResolver} 16 | */ 17 | ResourceResolver getResourceResolver(); 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/SearchService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | import java.util.List; 4 | 5 | public interface SearchService { 6 | 7 | List searchByKeyword(String keyword); 8 | } 9 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/WriteTODOService.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services; 2 | 3 | /** 4 | * @author Anirudh Sharma 5 | *

6 | * This interface represents the service which writes to-do data in the repository 7 | */ 8 | public interface WriteTODOService { 9 | 10 | void writeData(String todoData); 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/impl/CardServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services.impl; 2 | 3 | import org.osgi.framework.Constants; 4 | import org.osgi.service.component.annotations.Activate; 5 | import org.osgi.service.component.annotations.Component; 6 | import org.osgi.service.metatype.annotations.Designate; 7 | import org.redquark.aem.tutorials.core.configs.CardConfiguration; 8 | import org.redquark.aem.tutorials.core.services.CardService; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | @Component( 13 | service = CardService.class, 14 | immediate = true, 15 | property = { 16 | Constants.SERVICE_ID + "=Card Service", 17 | Constants.SERVICE_DESCRIPTION + "=This service reads values from Card Configuration" 18 | }) 19 | @Designate(ocd = CardConfiguration.class) 20 | public class CardServiceImpl implements CardService { 21 | 22 | private static final String TAG = CardServiceImpl.class.getSimpleName(); 23 | private static final Logger LOGGER = LoggerFactory.getLogger(CardServiceImpl.class); 24 | 25 | private CardConfiguration configuration; 26 | 27 | @Activate 28 | protected void activate(CardConfiguration configuration) { 29 | this.configuration = configuration; 30 | } 31 | 32 | @Override 33 | public String getOrganizationName() { 34 | LOGGER.info("{}: reading organization name", TAG); 35 | return configuration.getOrganizationName(); 36 | } 37 | 38 | @Override 39 | public String getHomepageURL() { 40 | LOGGER.info("{}: reading homepage url", TAG); 41 | return configuration.getHomepageURL(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/impl/EmailServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services.impl; 2 | 3 | import com.day.cq.mailer.MessageGateway; 4 | import com.day.cq.mailer.MessageGatewayService; 5 | import org.apache.commons.mail.Email; 6 | import org.apache.commons.mail.EmailException; 7 | import org.apache.commons.mail.SimpleEmail; 8 | import org.osgi.framework.Constants; 9 | import org.osgi.service.component.annotations.Component; 10 | import org.osgi.service.component.annotations.Reference; 11 | import org.redquark.aem.tutorials.core.services.EmailService; 12 | import org.slf4j.Logger; 13 | import org.slf4j.LoggerFactory; 14 | 15 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 16 | import static org.redquark.aem.tutorials.core.services.impl.EmailServiceImpl.SERVICE_NAME; 17 | 18 | @Component( 19 | service = EmailService.class, 20 | property = { 21 | Constants.SERVICE_ID + EQUALS + SERVICE_NAME 22 | } 23 | ) 24 | public class EmailServiceImpl implements EmailService { 25 | 26 | protected static final String SERVICE_NAME = "Email Service"; 27 | private static final String TAG = EmailServiceImpl.class.getSimpleName(); 28 | private static final Logger LOGGER = LoggerFactory.getLogger(EmailServiceImpl.class); 29 | 30 | @Reference 31 | MessageGatewayService messageGatewayService; 32 | 33 | @Override 34 | public void sendEmail(String toEmail, String ccEmail, String fromEmail, String subject, String content) { 35 | try { 36 | // Setting up the email message 37 | Email email = new SimpleEmail(); 38 | // Get the details to send email 39 | email.setSubject(subject); 40 | email.setMsg(content); 41 | email.addTo(toEmail); 42 | email.addCc(ccEmail); 43 | email.setFrom(fromEmail); 44 | // Inject the message gateway service and send email 45 | MessageGateway messageGateway = messageGatewayService.getGateway(Email.class); 46 | // Send the email 47 | messageGateway.send(email); 48 | } catch (EmailException e) { 49 | LOGGER.error("{}: exception occurred: {}", TAG, e.getMessage()); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/impl/ReferencedAssetServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services.impl; 2 | 3 | import com.day.cq.dam.api.Asset; 4 | import com.day.cq.dam.api.DamConstants; 5 | import com.day.cq.dam.commons.util.AssetReferenceSearch; 6 | import org.apache.sling.api.resource.Resource; 7 | import org.apache.sling.api.resource.ResourceResolver; 8 | import org.osgi.framework.Constants; 9 | import org.osgi.service.component.annotations.Component; 10 | import org.osgi.service.component.annotations.Reference; 11 | import org.redquark.aem.tutorials.core.services.ReferencedAssetService; 12 | import org.redquark.aem.tutorials.core.services.ResourceResolverService; 13 | import org.slf4j.Logger; 14 | import org.slf4j.LoggerFactory; 15 | 16 | import javax.jcr.Node; 17 | import java.util.Map; 18 | import java.util.Objects; 19 | 20 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 21 | 22 | @Component( 23 | service = ReferencedAssetService.class, 24 | property = { 25 | Constants.SERVICE_ID + EQUALS + "Referenced Asset Service", 26 | Constants.SERVICE_DESCRIPTION + EQUALS + "Returns all the assets referenced" 27 | } 28 | ) 29 | public class ReferencedAssetServiceImpl implements ReferencedAssetService { 30 | 31 | private static final String TAG = ReferencedAssetService.class.getSimpleName(); 32 | private static final Logger LOGGER = LoggerFactory.getLogger(ReferencedAssetService.class); 33 | 34 | @Reference 35 | ResourceResolverService resourceResolverService; 36 | 37 | @Override 38 | public Map getReferencedAssets(String pagePath) { 39 | LOGGER.debug("{}: Searching assets referenced on page path: {}", TAG, pagePath); 40 | // Get the resource resolver 41 | ResourceResolver resourceResolver = resourceResolverService.getResourceResolver(); 42 | // Get the resource instance representing the path 43 | Resource resource = resourceResolver.getResource(pagePath); 44 | // Adapt this resource to the Node 45 | Node node = Objects.requireNonNull(resource).adaptTo(Node.class); 46 | // Create an instance of AssetReferenceSearch API 47 | AssetReferenceSearch assetReferenceSearch = new AssetReferenceSearch(node, DamConstants.MOUNTPOINT_ASSETS, resourceResolver); 48 | // Getting all the assets referenced 49 | Map referencedAssets = assetReferenceSearch.search(); 50 | LOGGER.debug("{}: number of assets found on page: {} are {}", TAG, pagePath, referencedAssets.size()); 51 | 52 | return referencedAssets; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/services/impl/ResourceResolverServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.services.impl; 2 | 3 | import org.apache.sling.api.resource.LoginException; 4 | import org.apache.sling.api.resource.ResourceResolver; 5 | import org.apache.sling.api.resource.ResourceResolverFactory; 6 | import org.osgi.framework.Constants; 7 | import org.osgi.service.component.annotations.Activate; 8 | import org.osgi.service.component.annotations.Component; 9 | import org.osgi.service.component.annotations.Reference; 10 | import org.redquark.aem.tutorials.core.services.ResourceResolverService; 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | 14 | import java.util.HashMap; 15 | import java.util.Map; 16 | 17 | import static org.redquark.aem.tutorials.core.constants.AppConstants.SUB_SERVICE; 18 | 19 | /** 20 | * @author Anirudh Sharma 21 | *

22 | * This service is responsible for returning an instance of ResourceResolver 23 | */ 24 | @Component( 25 | service = ResourceResolverService.class, 26 | property = { 27 | Constants.SERVICE_ID + "= AEM Tutorial Resource Resolver Service", 28 | Constants.SERVICE_DESCRIPTION + "= This service is responsible for returning an instance of ResourceResolver" 29 | }) 30 | public class ResourceResolverServiceImpl implements ResourceResolverService { 31 | 32 | private static final String TAG = ResourceResolverServiceImpl.class.getSimpleName(); 33 | private static final Logger LOGGER = LoggerFactory.getLogger(ResourceResolverServiceImpl.class); 34 | 35 | @Reference 36 | ResourceResolverFactory resourceResolverFactory; 37 | 38 | private ResourceResolver resourceResolver; 39 | 40 | @Activate 41 | protected void activate() { 42 | try { 43 | // Service User map 44 | Map serviceUserMap = new HashMap<>(); 45 | // Putting sub-service name in the map 46 | serviceUserMap.put(ResourceResolverFactory.SUBSERVICE, SUB_SERVICE); 47 | // Get the instance of Service Resource Resolver 48 | resourceResolver = resourceResolverFactory.getServiceResourceResolver(serviceUserMap); 49 | } catch (LoginException e) { 50 | LOGGER.error("{}: Exception occurred while getting resource resolver: {}", TAG, e.getMessage()); 51 | } 52 | } 53 | 54 | @Override 55 | public ResourceResolver getResourceResolver() { 56 | return resourceResolver; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/servlets/SearchServlet.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.servlets; 2 | 3 | import org.apache.sling.api.SlingHttpServletRequest; 4 | import org.apache.sling.api.SlingHttpServletResponse; 5 | import org.apache.sling.api.servlets.HttpConstants; 6 | import org.apache.sling.api.servlets.SlingAllMethodsServlet; 7 | import org.osgi.framework.Constants; 8 | import org.osgi.service.component.annotations.Component; 9 | import org.osgi.service.component.annotations.Reference; 10 | import org.redquark.aem.tutorials.core.services.SearchService; 11 | import org.slf4j.Logger; 12 | import org.slf4j.LoggerFactory; 13 | 14 | import javax.servlet.Servlet; 15 | import java.io.IOException; 16 | import java.util.List; 17 | 18 | import static org.apache.sling.api.servlets.ServletResolverConstants.SLING_SERVLET_METHODS; 19 | import static org.apache.sling.api.servlets.ServletResolverConstants.SLING_SERVLET_PATHS; 20 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 21 | import static org.redquark.aem.tutorials.core.constants.AppConstants.NEW_LINE; 22 | import static org.redquark.aem.tutorials.core.servlets.SearchServlet.PATH; 23 | import static org.redquark.aem.tutorials.core.servlets.SearchServlet.SERVICE_NAME; 24 | 25 | @Component( 26 | service = Servlet.class, 27 | property = { 28 | Constants.SERVICE_ID + EQUALS + SERVICE_NAME, 29 | SLING_SERVLET_PATHS + EQUALS + PATH, 30 | SLING_SERVLET_METHODS + EQUALS + HttpConstants.METHOD_POST 31 | } 32 | ) 33 | public class SearchServlet extends SlingAllMethodsServlet { 34 | 35 | protected static final String PATH = "/bin/aemtutorials/search"; 36 | protected static final String SERVICE_NAME = "Search Servlet"; 37 | 38 | private static final String TAG = SearchServlet.class.getSimpleName(); 39 | private static final Logger LOGGER = LoggerFactory.getLogger(SearchServlet.class); 40 | 41 | @Reference 42 | SearchService searchService; 43 | 44 | @Override 45 | protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) { 46 | try { 47 | String keyword = request.getParameter("keyword"); 48 | LOGGER.info("{}: searching for keyword: {}", TAG, keyword); 49 | // Getting the result from search service 50 | List resultList = searchService.searchByKeyword(keyword); 51 | // Format the results 52 | StringBuilder formattedResult = new StringBuilder(); 53 | for (String s : resultList) { 54 | formattedResult.append(s).append(NEW_LINE); 55 | } 56 | // Print the results on the screen 57 | response.getWriter().println(formattedResult.toString()); 58 | } catch (IOException e) { 59 | LOGGER.error("{}: cannot search due to: {}", TAG, e.getMessage()); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/utils/DropdownData.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.utils; 2 | 3 | public class DropdownData { 4 | 5 | private final String text; 6 | private final String value; 7 | 8 | public DropdownData(final String text, final String value) { 9 | this.text = text; 10 | this.value = value; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/utils/IDGenerator.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.utils; 2 | 3 | import java.nio.charset.StandardCharsets; 4 | import java.util.Random; 5 | 6 | public class IDGenerator { 7 | 8 | /** 9 | * @return Unique id 10 | */ 11 | public static String generateUniqueID(int n) { 12 | // Length is bounded by 256 Character 13 | byte[] array = new byte[256]; 14 | new Random().nextBytes(array); 15 | 16 | String randomString = new String(array, StandardCharsets.UTF_8); 17 | // Create a StringBuffer to store the result 18 | StringBuilder r = new StringBuilder(); 19 | 20 | // Append first 20 alphanumeric characters 21 | // from the generated random String into the result 22 | for (int k = 0; k < randomString.length(); k++) { 23 | char ch = randomString.charAt(k); 24 | if (((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')) && (n > 0)) { 25 | r.append(ch); 26 | n--; 27 | } 28 | } 29 | // return the resultant string 30 | return r.toString(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/workflows/participant/ApprovePageContentStep.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.workflows.participant; 2 | 3 | import com.adobe.granite.workflow.WorkflowSession; 4 | import com.adobe.granite.workflow.exec.ParticipantStepChooser; 5 | import com.adobe.granite.workflow.exec.WorkItem; 6 | import com.adobe.granite.workflow.metadata.MetaDataMap; 7 | import org.apache.commons.lang3.StringUtils; 8 | import org.osgi.service.component.annotations.Component; 9 | import org.slf4j.Logger; 10 | import org.slf4j.LoggerFactory; 11 | 12 | import static org.redquark.aem.tutorials.core.constants.AppConstants.ADMINISTRATORS; 13 | import static org.redquark.aem.tutorials.core.constants.AppConstants.CHOOSER_LABEL; 14 | import static org.redquark.aem.tutorials.core.constants.AppConstants.CONTENT_AUTHORS; 15 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 16 | import static org.redquark.aem.tutorials.core.workflows.participant.ApprovePageContentStep.CHOOSER_LABEL_VALUE; 17 | 18 | @Component( 19 | service = ParticipantStepChooser.class, 20 | property = { 21 | CHOOSER_LABEL + EQUALS + CHOOSER_LABEL_VALUE 22 | } 23 | ) 24 | public class ApprovePageContentStep implements ParticipantStepChooser { 25 | 26 | protected static final String CHOOSER_LABEL_VALUE = "Approve Page Content"; 27 | private static final String TAG = ApprovePageContentStep.class.getSimpleName(); 28 | private static final Logger LOGGER = LoggerFactory.getLogger(ApprovePageContentStep.class); 29 | private static final String CONTENT_PATH = "/content/aemtutorials"; 30 | 31 | @Override 32 | public String getParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) { 33 | // Getting payload from Workflow - workItem -> workflowData -> payload 34 | String payloadType = workItem.getWorkflowData().getPayloadType(); 35 | LOGGER.debug("{}: Payload type: {}", TAG, payloadType); 36 | // Check type of payload; there are two - JCR_PATH and JCR_UUID 37 | if (StringUtils.equals(payloadType, "JCR_PATH")) { 38 | // Get the JCR path from the payload 39 | String path = workItem.getWorkflowData().getPayload().toString(); 40 | LOGGER.debug("{}: Payload path: {}", TAG, path); 41 | // Get process arguments which will contain the properties to update 42 | if (path.startsWith(CONTENT_PATH)) { 43 | LOGGER.debug("{}: selected user/group: {}", TAG, CONTENT_AUTHORS); 44 | return CONTENT_AUTHORS; 45 | } 46 | } 47 | return ADMINISTRATORS; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /core/src/main/java/org/redquark/aem/tutorials/core/workflows/participant/ReviewChildrenPagesStep.java: -------------------------------------------------------------------------------- 1 | package org.redquark.aem.tutorials.core.workflows.participant; 2 | 3 | import com.adobe.granite.workflow.WorkflowSession; 4 | import com.adobe.granite.workflow.exec.ParticipantStepChooser; 5 | import com.adobe.granite.workflow.exec.WorkItem; 6 | import com.adobe.granite.workflow.metadata.MetaDataMap; 7 | import org.osgi.service.component.annotations.Component; 8 | import org.slf4j.Logger; 9 | import org.slf4j.LoggerFactory; 10 | 11 | import static org.redquark.aem.tutorials.core.constants.AppConstants.ADMINISTRATORS; 12 | import static org.redquark.aem.tutorials.core.constants.AppConstants.CHILD_PAGE_COUNT; 13 | import static org.redquark.aem.tutorials.core.constants.AppConstants.CHOOSER_LABEL; 14 | import static org.redquark.aem.tutorials.core.constants.AppConstants.CONTENT_AUTHORS; 15 | import static org.redquark.aem.tutorials.core.constants.AppConstants.EQUALS; 16 | import static org.redquark.aem.tutorials.core.workflows.participant.ReviewChildrenPagesStep.CHOOSER_LABEL_VALUE; 17 | 18 | @Component( 19 | service = ParticipantStepChooser.class, 20 | property = { 21 | CHOOSER_LABEL + EQUALS + CHOOSER_LABEL_VALUE 22 | } 23 | ) 24 | public class ReviewChildrenPagesStep implements ParticipantStepChooser { 25 | 26 | protected static final String CHOOSER_LABEL_VALUE = "Review Children Pages"; 27 | private static final String TAG = ReviewChildrenPagesStep.class.getSimpleName(); 28 | private static final Logger LOGGER = LoggerFactory.getLogger(ReviewChildrenPagesStep.class); 29 | 30 | @Override 31 | public String getParticipant(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaDataMap) { 32 | // Get the count of the children pages in the workflow 33 | int childPagesCount = workItem.getWorkflow().getMetaDataMap().get(CHILD_PAGE_COUNT, 0); 34 | LOGGER.debug("{}: child pages count: {}", TAG, childPagesCount); 35 | // Return the user group based on the number of child pages 36 | return childPagesCount > 0 ? ADMINISTRATORS : CONTENT_AUTHORS; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ui.apps.structure/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | 6 | 7 | 8 | 9 | org.redquark.aem.tutorials 10 | AEM-Tutorials 11 | 1.0-SNAPSHOT 12 | ../pom.xml 13 | 14 | 15 | 16 | 17 | 18 | AEM-Tutorials.ui.apps.structure 19 | content-package 20 | AEM Tutorials - Repository Structure Package 21 | 22 | Empty package that defines the structure of the Adobe Experience Manager repository the Code packages in this project deploy into. 23 | Any roots in the Code packages of this project should have their parent enumerated in the Filters list below. 24 | 25 | 26 | 27 | 28 | 29 | org.apache.jackrabbit 30 | filevault-package-maven-plugin 31 | true 32 | 33 | 34 | none 35 | 36 | 37 | 38 | 39 | /apps 40 | 41 | 42 | /apps/sling 43 | /apps/cq 44 | /apps/dam 45 | /apps/wcm 46 | /apps/msm 47 | 48 | 49 | /apps/settings 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /ui.apps/.gitignore: -------------------------------------------------------------------------------- 1 | src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-react 2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-base/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-base/css.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2017 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-base/js.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2017 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-dependencies/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-dependencies/css.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2017 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### 16 | 17 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-dependencies/js.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2017 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### 16 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-grid/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-grid/css.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2018 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### 16 | 17 | less/grid.less -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-grid/less/grid.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2018 Adobe Systems Incorporated 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | @import (once) "/libs/wcm/foundation/clientlibs/grid/grid_base.less"; 18 | 19 | /* maximum amount of grid cells to be provided */ 20 | @max_col: 12; 21 | 22 | /* default breakpoint */ 23 | .aem-Grid { 24 | .generate-grid(default, @max_col); 25 | } 26 | 27 | /* phone breakpoint */ 28 | @media (max-width: 650px) { 29 | .aem-Grid { 30 | .generate-grid(phone, @max_col); 31 | } 32 | } 33 | 34 | /* tablet breakpoint */ 35 | @media (min-width: 651px) and (max-width: 1200px) { 36 | .aem-Grid { 37 | .generate-grid(tablet, @max_col); 38 | } 39 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-site/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-site/css.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2018 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/clientlib-site/js.txt: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright 2018 Adobe Systems Incorporated 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ############################################################################### -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/customClientlibs/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/customClientlibs/css.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/customClientlibs/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | altTextValidation.js 3 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/customClientlibs/js/altTextValidation.js: -------------------------------------------------------------------------------- 1 | $(window).adaptTo("foundation-registry") 2 | .register( 3 | "foundation.validation.validator", { 4 | selector : "#alt-special", // validates the specific alt field 5 | validate : function(el) { 6 | var $el = $(el); 7 | var $form = $el.closest('form'); // get the form 8 | var $upload = $form.find("coral-fileupload[name$=image]"); // find the file upload widget 9 | if ($upload.hasClass('is-filled') && !$el.val()) { // if class exists, return the validation message 10 | return "Enter Alt Text"; 11 | } else { 12 | return; 13 | } 14 | } 15 | }); 16 | 17 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/clientlibs/customClientlibs/js/altTextValidation.js.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/_cq_dialog/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 14 | 15 | 19 | 22 | 23 | 26 | 27 | 35 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/card.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |

9 |
10 |

${card.organizationName}

11 |

${card.cardTitle}

12 | ${card.buttonText} 13 |
14 |
15 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/card.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/clientlib/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/clientlib/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | style.css 3 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/card/clientlib/css/style.css: -------------------------------------------------------------------------------- 1 | *{margin:0px;padding:0px;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;font-family: 'Roboto';} 2 | 3 | /* --- card ---- */ 4 | 5 | .card{ 6 | position: relative; 7 | display: inline-block; 8 | width: 300px; 9 | height: 300px; 10 | margin: 1em; 11 | background-size: cover; 12 | border-radius: 10px; 13 | box-shadow: 0px 25px 50px rgba(0, 0, 0, 0.5); 14 | overflow: hidden; 15 | -moz-transition: 0.5s;-o-transition: 0.5s;-webkit-transition: 0.5s;transition: 0.5s; 16 | } 17 | .card.ph1{background: url('//cs622627.vk.me/v622627615/26cdb/sBCCzAw79Cw.jpg') center no-repeat ;background-size: cover;} 18 | .card.ph2{background: url('//cs622627.vk.me/v622627615/26ce5/L2xeil9_uqg.jpg') center no-repeat;background-size: cover;} 19 | 20 | .card .overlay{ 21 | width: 100%; 22 | height: 100%; 23 | position: absolute; 24 | padding: 1em; 25 | top: 0; 26 | z-index: 10; 27 | color: #fff; 28 | -moz-transition: 0.5s;-o-transition: 0.5s;-webkit-transition: 0.5s;transition: 0.5s; 29 | } 30 | 31 | .card .overlay h2{ 32 | position: relative; 33 | margin: 2em 0px; 34 | top: -200px; 35 | -moz-transition: 0.5s;-o-transition: 0.5s;-webkit-transition: 0.5s;transition: 0.5s; 36 | } 37 | 38 | .card .overlay a{ 39 | position: relative; 40 | width: 60%; 41 | top: 200px; 42 | padding: 0.5em 2em; 43 | border: 2px solid #fff; 44 | text-decoration: none; 45 | color:#FFFFFF; 46 | border-radius: 3px; 47 | -moz-transition: 0.5s;-o-transition: 0.5s;-webkit-transition: 0.5s;transition: 0.5s; 48 | } 49 | .card a:hover{background: #fff;color:#5c5c5c;} 50 | 51 | .card:hover .overlay{background: rgba(92, 92, 92, 0.8);} 52 | .card:hover h2{top: 0px;} 53 | .card:hover a{top: 0px;} 54 | 55 | @media screen and (max-width: 700px){ 56 | 57 | .card{ 58 | position: relative; 59 | display:block; 60 | width: 100%; 61 | height: 300px; 62 | margin: 3em 0em; 63 | border-radius: 0px; 64 | box-shadow: 0px 25px 50px rgba(0, 0, 0, 0.5); 65 | overflow: hidden; 66 | transition: all .4s ease; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/htl/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/htl/_cq_dialog/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/htl/htl.html: -------------------------------------------------------------------------------- 1 |

HTL Code Snippets

2 | 3 | 4 |

Example 1:

5 |

Title of the page is: ${currentPage.title}

6 | 7 | 8 |

Example 2:

9 |

Sling Resource Type property of the component node: ${properties.sling:resourceType}

10 | 11 | 12 |

Example 3:

13 |

Array join: ${['Batman', 'Superman', 'Flash'] @ join='-'}

14 | 15 | 16 |

Example 4:

17 | 18 |

We are in the edit mode

19 |
20 | 21 |

We are in the preview mode

22 |
23 | 24 | 25 |

Example 5:

26 | 27 |
    28 |
  • 29 |

    ${item.title}

    30 |
  • 31 |
32 |
33 | 34 | 35 |

Example 6:

36 |

This text will be replaced.

37 | 38 | 39 |

Example 7:

40 |

Attributes are set for this element

41 | 42 | 43 |

Example 8:

44 |

${item.name}

45 | 46 | 47 |

Example 9:

48 |
49 | 50 | 51 |

Example 10:

52 | 53 | 54 | 55 |

Example 11:

56 | 57 | This can be called by using 'call' 58 | 59 |

-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/htl/htl.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/htl/index.html: -------------------------------------------------------------------------------- 1 | 7 | 8 |

9 | This file will be included in the component. 10 |

-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/image/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/image/image.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ${properties.altText} 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/image/image.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/preferences/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/preferences/preferences.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Name: ${properties.name}

6 |

Country: ${properties.country}

7 |

Favourite color: ${properties.color}

8 |

Favourite font: ${properties.font}

9 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/preferences/preferences.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/_cq_dialog/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/clientlibs/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/clientlibs/css.txt: -------------------------------------------------------------------------------- 1 | #base=css 2 | style.css 3 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/clientlibs/css/style.css: -------------------------------------------------------------------------------- 1 | form { 2 | outline: 0; 3 | float: left; 4 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 5 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); 6 | -webkit-border-radius: 4px; 7 | border-radius: 4px; 8 | } 9 | 10 | form>.textbox { 11 | outline: 0; 12 | height: 42px; 13 | width: 244px; 14 | line-height: 42px; 15 | padding: 0 16px; 16 | background-color: rgba(255, 255, 255, 0.8); 17 | color: #212121; 18 | float: left; 19 | -webkit-border-radius: 4px 0 0 4px; 20 | border-radius: 4px 0 0 4px; 21 | } 22 | 23 | form>.textbox:focus { 24 | outline: 0; 25 | background-color: #FFF; 26 | } 27 | 28 | form>.button { 29 | outline: 0; 30 | background: none; 31 | background-color: rgba(38, 50, 56, 0.8); 32 | float: left; 33 | height: 42px; 34 | width: 75px; 35 | text-align: center; 36 | line-height: 42px; 37 | border: 0; 38 | color: #FFF; 39 | font: normal normal normal 14px/1 FontAwesome; 40 | font-size: 16px; 41 | text-rendering: auto; 42 | text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); 43 | -webkit-transition: background-color .4s ease; 44 | transition: background-color .4s ease; 45 | -webkit-border-radius: 0 4px 4px 0; 46 | border-radius: 0 4px 4px 0; 47 | } 48 | 49 | form>.button:hover { 50 | background-color: rgba(0, 150, 136, 0.8); 51 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/clientlibs/js.txt: -------------------------------------------------------------------------------- 1 | #base=js 2 | script.js 3 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/clientlibs/js/script.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $('#fulltext-search').submit(function (event) { 3 | event.preventDefault(); 4 | 5 | var formEl = $(this); 6 | var submitButton = $('input[type=submit]', formEl); 7 | 8 | $.ajax({ 9 | type: 'POST', 10 | url: formEl.prop('action'), 11 | accept: { 12 | javascript: 'application/javascript' 13 | }, 14 | data: { 15 | 'keyword': $('#keyword').val() 16 | }, 17 | beforeSend: function () { 18 | submitButton.prop('disabled', 'disabled'); 19 | } 20 | }).done(function (data) { 21 | submitButton.prop('disabled', false); 22 | }); 23 | }); 24 | }); -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/search/search.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/text/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/text/_cq_dialog/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | 15 | 19 | 20 | 23 | 24 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/text/text.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Text entered by the user is: ${properties.text}

6 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/text/text.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/todo/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/todo/_cq_dialog/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/todo/todo.html: -------------------------------------------------------------------------------- 1 |

TODO List:

2 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/user/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/user/user.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |

ID: ${user.id}

7 |

Name: ${user.name}

8 |

Gender: ${user.gender}

9 |

Address: ${user.address}

10 |
-------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/content/user/user.html.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 8 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/page/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/page/customfooterlibs.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 18 | 19 | 22 | 26 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/page/customheaderlibs.html: -------------------------------------------------------------------------------- 1 | 16 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 36 | 40 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/components/structure/page/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/config/org.apache.sling.commons.log.LogManager.factory.config-aemtutorials.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/i18n/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/i18n/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "&copy; {0} AEM Tutorials Site. All rights reserved." : "&copy; {0} AEM Tutorials Site. Tous droits réservés." 3 | } -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/i18n/fr.json.dir/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/templates/page-content/.content.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 15 | 18 | <topnav 19 | jcr:primaryType="nt:unstructured" 20 | sling:resourceType="aemtutorials/components/topnav"/> 21 | <par 22 | jcr:primaryType="nt:unstructured" 23 | sling:resourceType="wcm/foundation/components/parsys"> 24 | <text 25 | jcr:primaryType="nt:unstructured" 26 | sling:resourceType="aemtutorials/components/text" 27 | text="<p>This is a content page</p>" 28 | textIsRich="true"/> 29 | </par> 30 | </jcr:content> 31 | </jcr:root> 32 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/templates/page-home/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:description="Template for initial or main page of the site." 5 | jcr:primaryType="cq:Template" 6 | jcr:title="AEM Tutorials Home Page" 7 | allowedPaths="[/content/aemtutorials]" 8 | ranking="{Long}100"> 9 | <jcr:content 10 | jcr:primaryType="cq:PageContent" 11 | sling:resourceType="aemtutorials/components/page"> 12 | <logo 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="aemtutorials/components/logo"/> 15 | <title 16 | jcr:primaryType="nt:unstructured" 17 | sling:resourceType="aemtutorials/components/title"/> 18 | <topnav 19 | jcr:primaryType="nt:unstructured" 20 | sling:resourceType="aemtutorials/components/topnav"/> 21 | <par 22 | jcr:primaryType="nt:unstructured" 23 | sling:resourceType="wcm/foundation/components/parsys"> 24 | <text 25 | jcr:primaryType="nt:unstructured" 26 | sling:resourceType="aemtutorials/components/text" 27 | text="<p>This is a home page</p>" 28 | textIsRich="true"/> 29 | </par> 30 | </jcr:content> 31 | </jcr:root> 32 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/tests/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:ClientLibraryFolder" 4 | categories="[cq.authoring.editor.hook.tests]" 5 | dependencies="[cq.authoring.editor]"/> 6 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/tests/SampleTests.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 Adobe Systems Incorporated 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | new hobs.TestSuite("AEM Tutorials Tests", {path:"/apps/aemtutorials/tests/SampleTests.js", register: true}) 17 | 18 | .addTestCase(new hobs.TestCase("Hello World component on english page") 19 | .navigateTo("/content/aemtutorials/en.html") 20 | .asserts.location("/content/aemtutorials/en.html", true) 21 | .asserts.visible(".helloworld", true) 22 | ) 23 | 24 | .addTestCase(new hobs.TestCase("Hello World component on french page") 25 | .navigateTo("/content/aemtutorials/fr.html") 26 | .asserts.location("/content/aemtutorials/fr.html", true) 27 | .asserts.visible(".helloworld", true) 28 | ); 29 | -------------------------------------------------------------------------------- /ui.apps/src/main/content/jcr_root/apps/aemtutorials/tests/js.txt: -------------------------------------------------------------------------------- 1 | SampleTests.js -------------------------------------------------------------------------------- /ui.content/src/main/content/META-INF/vault/filter.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <workspaceFilter version="1.0"> 3 | <filter root="/conf/aemtutorials" mode="merge"/> 4 | <filter root="/content/aemtutorials" mode="merge"/> 5 | <filter root="/content/dam/aemtutorials" mode="merge"/> 6 | <filter root="/content/experience-fragments/aemtutorials" mode="merge"/> 7 | <filter root="/var/workflow/models/aemtutorials" mode="merge"/> 8 | </workspaceFilter> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 3 | jcr:primaryType="sling:Folder" 4 | jcr:title="AEM Tutorials"/> 5 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 3 | jcr:primaryType="sling:Folder"/> 4 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Page"> 4 | <templates/> 5 | <policies/> 6 | <segments/> 7 | <template-types/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:rep="internal" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:mixinTypes="[rep:AccessControllable]" 5 | jcr:primaryType="cq:Page"> 6 | <rep:policy/> 7 | <wcm jcr:primaryType="nt:unstructured"> 8 | <foundation jcr:primaryType="nt:unstructured"> 9 | <components jcr:primaryType="nt:unstructured"> 10 | <responsivegrid jcr:primaryType="nt:unstructured"> 11 | <policy_1593977909476 12 | jcr:lastModified="{Date}2020-07-06T01:09:11.945+05:30" 13 | jcr:lastModifiedBy="admin" 14 | jcr:primaryType="nt:unstructured" 15 | jcr:title="Base Page Ploicy" 16 | sling:resourceType="wcm/core/components/policy/policy" 17 | components="group:AEM Tutorials"> 18 | <jcr:content jcr:primaryType="nt:unstructured"/> 19 | </policy_1593977909476> 20 | </responsivegrid> 21 | </components> 22 | </foundation> 23 | </wcm> 24 | </jcr:root> 25 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/policies/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:crx="http://www.day.com/crx/1.0" xmlns:rep="internal" 3 | jcr:primaryType="rep:ACL"> 4 | <allow 5 | jcr:primaryType="rep:GrantACE" 6 | rep:principalName="everyone" 7 | rep:privileges="{Name}[jcr:read]"/> 8 | <allow1 9 | jcr:primaryType="rep:GrantACE" 10 | rep:principalName="content-authors" 11 | rep:privileges="{Name}[crx:replicate]"/> 12 | <allow2 13 | jcr:primaryType="rep:GrantACE" 14 | rep:principalName="template-authors" 15 | rep:privileges="{Name}[jcr:versionManagement,crx:replicate,rep:write,jcr:lockManagement]"/> 16 | <allow3 17 | jcr:primaryType="rep:GrantACE" 18 | rep:principalName="version-manager-service" 19 | rep:privileges="{Name}[jcr:versionManagement,rep:write]"/> 20 | </jcr:root> 21 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/segments/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | jcr:primaryType="cq:PageContent" 7 | sling:resourceType="cq/contexthub/components/segments-listing-page"/> 8 | <winter/> 9 | <summer/> 10 | </jcr:root> 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:mixinTypes="[rep:AccessControllable]" 4 | jcr:primaryType="cq:Page"> 5 | <xf/> 6 | <rep:policy/> 7 | <page/> 8 | <base-page/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" 3 | jcr:primaryType="rep:ACL"> 4 | <allow 5 | jcr:primaryType="rep:GrantACE" 6 | rep:principalName="template-authors" 7 | rep:privileges="{Name}[jcr:read]"/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/base-page/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" 4 | jcr:mixinTypes="[mix:lockable]" 5 | jcr:primaryType="cq:Template" 6 | ranking="{Long}1"> 7 | <jcr:content 8 | jcr:description="Base template for creating pages" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Base Template Type"/> 11 | </jcr:root> 12 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/base-page/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | jcr:primaryType="cq:PageContent" 7 | sling:resourceType="aemtutorials/components/structure/page"/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/base-page/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | jcr:primaryType="nt:unstructured" 7 | sling:resourceType="wcm/core/components/policies/mappings"> 8 | <root 9 | jcr:primaryType="nt:unstructured" 10 | sling:resourceType="wcm/core/components/policies/mapping"/> 11 | </jcr:content> 12 | </jcr:root> 13 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/base-page/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | jcr:primaryType="cq:PageContent" 8 | sling:resourceType="aemtutorials/components/structure/page"> 9 | <root 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="wcm/foundation/components/responsivegrid"/> 12 | <cq:responsive jcr:primaryType="nt:unstructured"> 13 | <breakpoints jcr:primaryType="nt:unstructured"> 14 | <phone 15 | jcr:primaryType="nt:unstructured" 16 | title="Smaller Screen" 17 | width="{Long}650"/> 18 | <tablet 19 | jcr:primaryType="nt:unstructured" 20 | title="Tablet" 21 | width="{Long}1200"/> 22 | </breakpoints> 23 | </cq:responsive> 24 | </jcr:content> 25 | </jcr:root> 26 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | jcr:description="Generic template for empty pages of My Site" 6 | jcr:primaryType="cq:PageContent" 7 | jcr:title="Page"/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/page-content" 7 | jcr:primaryType="cq:PageContent" 8 | sling:resourceType="aemtutorials/components/page"> 9 | <root 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="aemtutorials/components/container"> 12 | <container 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="aemtutorials/components/container" 15 | layout="responsiveGrid"/> 16 | </root> 17 | </jcr:content> 18 | </jcr:root> 19 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:policy="aemtutorials/components/page/policy" 7 | jcr:primaryType="nt:unstructured" 8 | sling:resourceType="wcm/core/components/policies/mappings"> 9 | <root 10 | cq:policy="aemtutorials/components/container/policy_1574694950110" 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="wcm/core/components/policies/mapping"> 13 | <container 14 | cq:policy="aemtutorials/components/container/policy_1574695586800" 15 | jcr:primaryType="nt:unstructured" 16 | sling:resourceType="wcm/core/components/policies/mapping"/> 17 | </root> 18 | </jcr:content> 19 | </jcr:root> 20 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[/etc/mobile/groups/responsive]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/page-content" 8 | jcr:primaryType="cq:PageContent" 9 | sling:resourceType="aemtutorials/components/page"> 10 | <root 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="aemtutorials/components/container"> 13 | <container 14 | jcr:primaryType="nt:unstructured" 15 | sling:resourceType="aemtutorials/components/container" 16 | editable="{Boolean}true" 17 | layout="responsiveGrid"/> 18 | </root> 19 | <cq:responsive jcr:primaryType="nt:unstructured"> 20 | <breakpoints jcr:primaryType="nt:unstructured"> 21 | <phone 22 | jcr:primaryType="nt:unstructured" 23 | title="Smaller Screen" 24 | width="{Long}768"/> 25 | <tablet 26 | jcr:primaryType="nt:unstructured" 27 | title="Tablet" 28 | width="{Long}1200"/> 29 | </breakpoints> 30 | </cq:responsive> 31 | </jcr:content> 32 | </jcr:root> 33 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mixinTypes="[dam:Thumbnails]" 8 | jcr:primaryType="nt:resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/page/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" 4 | jcr:mixinTypes="[mix:lockable]" 5 | jcr:primaryType="cq:Template"> 6 | <jcr:content 7 | jcr:description="Generic template for empty experience fragments variations of My Site" 8 | jcr:primaryType="cq:PageContent" 9 | jcr:title="Experience Fragment"/> 10 | </jcr:root> 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:tags="[experience-fragments:variation/web]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/empty-experience-fragment" 8 | cq:xfVariantType="web" 9 | jcr:primaryType="cq:PageContent" 10 | sling:resourceType="aemtutorials/components/xfpage"> 11 | <root 12 | jcr:primaryType="nt:unstructured" 13 | sling:resourceType="aemtutorials/components/container" 14 | layout="responsiveGrid"/> 15 | </jcr:content> 16 | </jcr:root> 17 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | jcr:primaryType="nt:unstructured" 7 | sling:resourceType="wcm/core/components/policies/mappings"> 8 | <root 9 | cq:policy="aemtutorials/components/container/policy_1575040440977" 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="wcm/core/components/policies/mapping"/> 12 | </jcr:content> 13 | </jcr:root> 14 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/empty-experience-fragment" 8 | jcr:primaryType="cq:PageContent" 9 | sling:resourceType="aemtutorials/components/page"> 10 | <root 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="aemtutorials/components/container" 13 | editable="{Boolean}true" 14 | layout="responsiveGrid"/> 15 | <cq:responsive jcr:primaryType="nt:unstructured"> 16 | <breakpoints jcr:primaryType="nt:unstructured"> 17 | <phone 18 | jcr:primaryType="nt:unstructured" 19 | title="Smaller Screen" 20 | width="{Long}768"/> 21 | <tablet 22 | jcr:primaryType="nt:unstructured" 23 | title="Tablet" 24 | width="{Long}1200"/> 25 | </breakpoints> 26 | </cq:responsive> 27 | </jcr:content> 28 | </jcr:root> 29 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/template-types/xf/thumbnail.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:mixinTypes="[rep:AccessControllable]" 4 | jcr:primaryType="cq:Page"> 5 | <page-content/> 6 | <xf-web-variation/> 7 | <spa-app-template/> 8 | <spa-page-template/> 9 | <rep:policy/> 10 | <base-template/> 11 | </jcr:root> 12 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:crx="http://www.day.com/crx/1.0" xmlns:rep="internal" 3 | jcr:primaryType="rep:ACL"> 4 | <allow 5 | jcr:primaryType="rep:GrantACE" 6 | rep:principalName="everyone" 7 | rep:privileges="{Name}[jcr:read]"/> 8 | <allow1 9 | jcr:primaryType="rep:GrantACE" 10 | rep:principalName="content-authors" 11 | rep:privileges="{Name}[crx:replicate]"/> 12 | <allow2 13 | jcr:primaryType="rep:GrantACE" 14 | rep:principalName="template-authors" 15 | rep:privileges="{Name}[jcr:versionManagement,crx:replicate,rep:write,jcr:lockManagement]"/> 16 | <allow3 17 | jcr:primaryType="rep:GrantACE" 18 | rep:principalName="version-manager-service" 19 | rep:privileges="{Name}[jcr:versionManagement,rep:write]"/> 20 | </jcr:root> 21 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/base-template/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | cq:lastModified="{Date}2020-07-06T01:09:11.947+05:30" 6 | cq:lastModifiedBy="admin" 7 | cq:templateType="/conf/aemtutorials/settings/wcm/template-types/base-page" 8 | jcr:description="This is the base template for the AEM Tutorials website" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Base Template" 11 | status="enabled"/> 12 | </jcr:root> 13 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/base-template/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:lastModified="{Date}2020-07-06T01:01:48.102+05:30" 7 | cq:lastModifiedBy="admin" 8 | cq:template="/conf/aemtutorials/settings/wcm/templates/base-template" 9 | jcr:primaryType="cq:PageContent" 10 | sling:resourceType="aemtutorials/components/structure/page"> 11 | <root 12 | jcr:lastModified="{Date}2020-07-06T00:00:22.773+05:30" 13 | jcr:lastModifiedBy="admin" 14 | jcr:primaryType="nt:unstructured" 15 | sling:resourceType="wcm/foundation/components/responsivegrid"/> 16 | </jcr:content> 17 | </jcr:root> 18 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/base-template/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:lastModified="{Date}2020-07-06T01:09:11.947+05:30" 7 | cq:lastModifiedBy="admin" 8 | jcr:primaryType="nt:unstructured" 9 | sling:resourceType="wcm/core/components/policies/mappings"> 10 | <root 11 | cq:policy="wcm/foundation/components/responsivegrid/policy_1593977909476" 12 | jcr:primaryType="nt:unstructured" 13 | sling:resourceType="wcm/core/components/policies/mapping"/> 14 | </jcr:content> 15 | </jcr:root> 16 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/base-template/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | cq:lastModified="{Date}2020-07-05T23:48:47.275+05:30" 8 | cq:lastModifiedBy="admin" 9 | cq:template="/conf/aemtutorials/settings/wcm/templates/base-template" 10 | jcr:primaryType="cq:PageContent" 11 | sling:resourceType="aemtutorials/components/structure/page"> 12 | <root 13 | jcr:lastModified="{Date}2020-07-05T23:56:27.849+05:30" 14 | jcr:lastModifiedBy="admin" 15 | jcr:primaryType="nt:unstructured" 16 | sling:resourceType="wcm/foundation/components/responsivegrid" 17 | editable="{Boolean}true"/> 18 | <cq:responsive jcr:primaryType="nt:unstructured"> 19 | <breakpoints jcr:primaryType="nt:unstructured"> 20 | <phone 21 | jcr:primaryType="nt:unstructured" 22 | title="Smaller Screen" 23 | width="{Long}650"/> 24 | <tablet 25 | jcr:primaryType="nt:unstructured" 26 | title="Tablet" 27 | width="{Long}1200"/> 28 | </breakpoints> 29 | </cq:responsive> 30 | </jcr:content> 31 | </jcr:root> 32 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | cq:lastModified="{Date}2019-12-02T17:37:24.544+01:00" 6 | cq:lastModifiedBy="admin" 7 | cq:templateType="/conf/aemtutorials/settings/wcm/template-types/page" 8 | jcr:description="My Site Page Template" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Content Page" 11 | status="enabled"/> 12 | </jcr:root> 13 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/page-content" 7 | jcr:primaryType="cq:PageContent" 8 | sling:resourceType="aemtutorials/components/page"> 9 | <root 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="aemtutorials/components/container"> 12 | <container 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="aemtutorials/components/container"> 15 | <title 16 | jcr:primaryType="nt:unstructured" 17 | sling:resourceType="aemtutorials/components/title"/> 18 | <container 19 | jcr:primaryType="nt:unstructured" 20 | sling:resourceType="aemtutorials/components/container" 21 | layout="responsiveGrid"/> 22 | </container> 23 | </root> 24 | </jcr:content> 25 | </jcr:root> 26 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[/etc/mobile/groups/responsive]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/page-content" 8 | jcr:primaryType="cq:PageContent" 9 | sling:resourceType="aemtutorials/components/page"> 10 | <root 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="aemtutorials/components/container" 13 | layout="simple"> 14 | <experiencefragment-header 15 | jcr:primaryType="nt:unstructured" 16 | sling:resourceType="aemtutorials/components/experiencefragment" 17 | fragmentVariationPath="/content/experience-fragments/aemtutorials/us/en/site/header/master"/> 18 | <container 19 | jcr:primaryType="nt:unstructured" 20 | sling:resourceType="aemtutorials/components/container" 21 | layout="responsiveGrid"> 22 | <title 23 | jcr:primaryType="nt:unstructured" 24 | sling:resourceType="aemtutorials/components/title" 25 | editable="{Boolean}true"/> 26 | <container 27 | jcr:primaryType="nt:unstructured" 28 | sling:resourceType="aemtutorials/components/container" 29 | editable="{Boolean}true"/> 30 | </container> 31 | <experiencefragment-footer 32 | jcr:primaryType="nt:unstructured" 33 | sling:resourceType="aemtutorials/components/experiencefragment" 34 | fragmentVariationPath="/content/experience-fragments/aemtutorials/us/en/site/footer/master"/> 35 | </root> 36 | <cq:responsive jcr:primaryType="nt:unstructured"> 37 | <breakpoints jcr:primaryType="nt:unstructured"> 38 | <phone 39 | jcr:primaryType="nt:unstructured" 40 | title="Smaller Screen" 41 | width="{Long}768"/> 42 | <tablet 43 | jcr:primaryType="nt:unstructured" 44 | title="Tablet" 45 | width="{Long}1200"/> 46 | </breakpoints> 47 | </cq:responsive> 48 | </jcr:content> 49 | </jcr:root> 50 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mixinTypes="[dam:Thumbnails]" 8 | jcr:primaryType="nt:resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_300.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/page-content/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-app-template/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | cq:lastModified="{Date}2017-12-07T17:08:28.689+05:30" 6 | cq:lastModifiedBy="admin" 7 | jcr:primaryType="cq:PageContent" 8 | jcr:title="AEM Tutorials Root" 9 | status="enabled"/> 10 | </jcr:root> 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-app-template/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/spa-app-template" 7 | jcr:primaryType="cq:PageContent" 8 | sling:resourceType="aemtutorials/components/spa"> 9 | <root 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="wcm/foundation/components/responsivegrid"> 12 | <responsivegrid 13 | jcr:created="{Date}2018-10-22T16:48:57.968+05:30" 14 | jcr:createdBy="admin" 15 | jcr:lastModified="{Date}2018-10-22T16:49:29.168+05:30" 16 | jcr:lastModifiedBy="admin" 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="wcm/foundation/components/responsivegrid"/> 19 | </root> 20 | </jcr:content> 21 | </jcr:root> 22 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-app-template/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:lastModified="{Date}2017-12-07T17:06:46.349+05:30" 7 | cq:lastModifiedBy="admin" 8 | cq:policy="aemtutorials/components/spa/default" 9 | jcr:primaryType="nt:unstructured" 10 | sling:resourceType="wcm/core/components/policies/mappings"> 11 | <root 12 | cq:policy="wcm/foundation/components/responsivegrid/default" 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="wcm/core/components/policies/mapping"> 15 | <responsivegrid 16 | cq:policy="wcm/foundation/components/responsivegrid/default" 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="wcm/core/components/policies/mapping"/> 19 | </root> 20 | </jcr:content> 21 | </jcr:root> 22 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-app-template/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | cq:lastModified="{Date}2017-12-07T16:50:03.215+05:30" 8 | cq:lastModifiedBy="admin" 9 | cq:template="/conf/aemtutorials/settings/wcm/templates/spa-app-template" 10 | jcr:primaryType="cq:PageContent" 11 | sling:resourceType="aemtutorials/components/spa"> 12 | <root 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="wcm/foundation/components/responsivegrid"/> 15 | <cq:responsive jcr:primaryType="nt:unstructured"/> 16 | </jcr:content> 17 | </jcr:root> 18 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-page-template/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | cq:created="{Date}2018-10-22T17:08:28.689+05:30" 6 | cq:createdBy="admin" 7 | cq:templateType="/libs/settings/wcm/template-types/html5page" 8 | jcr:primaryType="cq:PageContent" 9 | jcr:title="AEM Tutorials Page Template" 10 | status="enabled"/> 11 | </jcr:root> 12 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-page-template/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/spa-page-template" 7 | jcr:primaryType="cq:PageContent" 8 | sling:resourceType="aemtutorials/components/page"> 9 | <root 10 | jcr:primaryType="nt:unstructured" 11 | sling:resourceType="wcm/foundation/components/responsivegrid"> 12 | <responsivegrid 13 | jcr:created="{Date}2018-10-22T16:48:57.968+05:30" 14 | jcr:createdBy="admin" 15 | jcr:lastModified="{Date}2018-10-22T16:49:29.168+05:30" 16 | jcr:lastModifiedBy="admin" 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="wcm/foundation/components/responsivegrid"/> 19 | </root> 20 | </jcr:content> 21 | </jcr:root> 22 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-page-template/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:policy="aemtutorials/components/page/policy_spa" 7 | jcr:primaryType="nt:unstructured" 8 | sling:resourceType="wcm/core/components/policies/mappings"> 9 | <root 10 | cq:policy="wcm/foundation/components/responsivegrid/default" 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="wcm/core/components/policies/mapping"> 13 | <responsivegrid 14 | cq:policy="wcm/foundation/components/responsivegrid/default" 15 | jcr:primaryType="nt:unstructured" 16 | sling:resourceType="wcm/core/components/policies/mapping"/> 17 | </root> 18 | </jcr:content> 19 | </jcr:root> 20 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/spa-page-template/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/spa-page-template" 8 | jcr:primaryType="cq:PageContent" 9 | sling:resourceType="aemtutorials/components/page"> 10 | <root 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="wcm/foundation/components/responsivegrid"> 13 | <responsivegrid 14 | jcr:primaryType="nt:unstructured" 15 | sling:resourceType="wcm/foundation/components/responsivegrid" 16 | editable="{Boolean}true"> 17 | <cq:responsive jcr:primaryType="nt:unstructured"/> 18 | </responsivegrid> 19 | </root> 20 | <cq:responsive jcr:primaryType="nt:unstructured"> 21 | <breakpoints jcr:primaryType="nt:unstructured"> 22 | <phone 23 | jcr:primaryType="nt:unstructured" 24 | title="Smaller Screen" 25 | width="{Long}650"/> 26 | <tablet 27 | jcr:primaryType="nt:unstructured" 28 | title="Tablet" 29 | width="{Long}1200"/> 30 | </breakpoints> 31 | </cq:responsive> 32 | </jcr:content> 33 | </jcr:root> 34 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | jcr:primaryType="cq:Template"> 4 | <jcr:content 5 | cq:templateType="/conf/aemtutorials/settings/wcm/template-types/xf" 6 | jcr:description="My Site Experience Fragment Template" 7 | jcr:primaryType="cq:PageContent" 8 | jcr:title="Web Variation" 9 | status="enabled"/> 10 | </jcr:root> 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/initial/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:tags="[experience-fragments:variation/web]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/xf-web-variation" 8 | cq:xfVariantType="web" 9 | jcr:primaryType="cq:PageContent" 10 | sling:resourceType="aemtutorials/components/xfpage"> 11 | <root 12 | jcr:primaryType="nt:unstructured" 13 | sling:resourceType="aemtutorials/components/container" 14 | layout="responsiveGrid"/> 15 | </jcr:content> 16 | </jcr:root> 17 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/policies/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:policy="aemtutorials/components/page/policy" 7 | jcr:primaryType="nt:unstructured" 8 | sling:resourceType="wcm/core/components/policies/mappings"> 9 | <root 10 | cq:policy="aemtutorials/components/container/policy_1575040440977" 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="wcm/core/components/policies/mapping"> 13 | <mysite jcr:primaryType="nt:unstructured"> 14 | <components jcr:primaryType="nt:unstructured"> 15 | <title 16 | cq:policy="aemtutorials/components/title/policy_641528232375303" 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="wcm/core/components/policies/mapping"/> 19 | <text 20 | cq:policy="aemtutorials/components/text/policy_641562756958017" 21 | jcr:primaryType="nt:unstructured" 22 | sling:resourceType="wcm/core/components/policies/mapping"/> 23 | <teaser 24 | cq:policy="aemtutorials/components/teaser/policy_1575031387650" 25 | jcr:primaryType="nt:unstructured" 26 | sling:resourceType="wcm/core/components/policies/mapping"/> 27 | <download 28 | cq:policy="aemtutorials/components/download/policy_1575032193319" 29 | jcr:primaryType="nt:unstructured" 30 | sling:resourceType="wcm/core/components/policies/mapping"/> 31 | <image 32 | cq:policy="aemtutorials/components/image/policy_651483963895698" 33 | jcr:primaryType="nt:unstructured" 34 | sling:resourceType="wcm/core/components/policies/mapping"/> 35 | </components> 36 | </mysite> 37 | </root> 38 | </jcr:content> 39 | </jcr:root> 40 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/structure/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:deviceGroups="[mobile/groups/responsive]" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/xf-web-variation" 8 | jcr:primaryType="cq:PageContent" 9 | sling:resourceType="aemtutorials/components/page"> 10 | <root 11 | jcr:primaryType="nt:unstructured" 12 | sling:resourceType="aemtutorials/components/container" 13 | editable="{Boolean}true"/> 14 | <cq:responsive jcr:primaryType="nt:unstructured"> 15 | <breakpoints jcr:primaryType="nt:unstructured"> 16 | <phone 17 | jcr:primaryType="nt:unstructured" 18 | title="Smaller Screen" 19 | width="{Long}768"/> 20 | <tablet 21 | jcr:primaryType="nt:unstructured" 22 | title="Tablet" 23 | width="{Long}1200"/> 24 | </breakpoints> 25 | </cq:responsive> 26 | </jcr:content> 27 | </jcr:root> 28 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mixinTypes="[dam:Thumbnails]" 8 | jcr:primaryType="nt:resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_128.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/conf/aemtutorials/settings/wcm/templates/xf-web-variation/thumbnail.png.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_319.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:allowedTemplates="[/conf/aemtutorials/settings/wcm/templates/(?!xf-).*]" 7 | cq:conf="/conf/aemtutorials" 8 | cq:deviceGroups="[/etc/mobile/groups/responsive]" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="AEM Tutorials" 11 | sling:redirect="{Boolean}true" 12 | sling:redirectStatus="{Long}302" 13 | sling:resourceType="foundation/components/redirect" 14 | redirectTarget="/content/aemtutorials/us/en"> 15 | <image jcr:primaryType="nt:unstructured"> 16 | <file/> 17 | </image> 18 | </jcr:content> 19 | <us/> 20 | </jcr:root> 21 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | ��� 4 | IHDR��������� 5 | �{���7IDATx����j�`��a��.rT���5��G� !l'F��b_��sn���K~���|>������{=���"���@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@�G=�n�~��,�Rϸk�0l�i�g��`x�wx�y��<�eY�����u���$�!��j�ߋ������� �9 �ܩ]���$��`�0�� ����@@� ��`�0��!|���K=��v�z�� <==�n��t�'��q 6 | ����@@� ���4��p8�>�v��'��`X��x�'\���s=�#h�0�� ����@@� ��`�0�� ����@@� ���a%~/���� 7 | ��m=�3�� ��`�0������O��{O[����<p9���ǫ���g���_���eA@@� ��`�0�� ���J��d����~�jVP�����~��"G��`�0�� �OA�N�S=x ���� �q 8 | ����@@���0 ���廅? 0���i3�c=��㸙���7G��aDxE�8���wx 9 | ��}�6 �fY�x�}���/�ŷ�����_�#h�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� ��`�0�� ����@@� � 10 | �e��]�����IEND�B`� -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mimeType="image/png" 8 | jcr:mixinTypes="[dam:Thumbnails]" 9 | jcr:primaryType="nt:resource"/> 10 | </jcr:root> 11 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_48.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_480.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/aemtutorials/_jcr_content/image/file.dir/_jcr_content/_dam_thumbnails/_dam_thumbnail_480.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/us/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:redirectTarget="/content/aemtutorials/us/en" 7 | cq:template="/conf/aemtutorials/settings/wcm/templates/page-content" 8 | jcr:primaryType="cq:PageContent" 9 | jcr:title="us" 10 | sling:resourceType="foundation/components/redirect"/> 11 | <en/> 12 | </jcr:root> 13 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/us/en/base-page/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:lastModified="{Date}2020-07-06T01:19:52.162+05:30" 7 | cq:lastModifiedBy="admin" 8 | cq:template="/conf/aemtutorials/settings/wcm/templates/base-template" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Base Page" 11 | sling:resourceType="aemtutorials/components/structure/page"> 12 | <root 13 | jcr:lastModified="{Date}2020-07-06T00:00:22.773+05:30" 14 | jcr:lastModifiedBy="admin" 15 | jcr:primaryType="nt:unstructured" 16 | sling:resourceType="wcm/foundation/components/responsivegrid"> 17 | <text 18 | jcr:created="{Date}2020-07-06T01:13:26.605+05:30" 19 | jcr:createdBy="admin" 20 | jcr:lastModified="{Date}2020-07-06T01:19:52.161+05:30" 21 | jcr:lastModifiedBy="admin" 22 | jcr:primaryType="nt:unstructured" 23 | sling:resourceType="aemtutorials/components/content/text" 24 | text="My name is Anirudh Sharma"/> 25 | </root> 26 | </jcr:content> 27 | </jcr:root> 28 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/aemtutorials/us/en/home/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:primaryType="cq:Page"> 5 | <jcr:content 6 | cq:lastModified="{Date}2018-10-04T09:50:29.650+02:00" 7 | cq:lastModifiedBy="admin" 8 | cq:template="/conf/aemtutorials/settings/wcm/templates/spa-page-template" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="AEM Tutorials Home Page" 11 | sling:resourceType="aemtutorials/components/page"> 12 | <root 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="wcm/foundation/components/responsivegrid"> 15 | <responsivegrid 16 | jcr:primaryType="nt:unstructured" 17 | sling:resourceType="wcm/foundation/components/responsivegrid"> 18 | <text 19 | jcr:primaryType="nt:unstructured" 20 | sling:resourceType="aemtutorials/components/text" 21 | text="<p>Hello World!</p>" 22 | textIsRich="true"> 23 | <cq:responsive jcr:primaryType="nt:unstructured"/> 24 | </text> 25 | </responsivegrid> 26 | </root> 27 | </jcr:content> 28 | </jcr:root> 29 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:rep="internal" 3 | jcr:mixinTypes="[mix:lockable,rep:AccessControllable]" 4 | jcr:primaryType="sling:OrderedFolder"> 5 | <rep:policy/> 6 | <aemtutorials/> 7 | </jcr:root> 8 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 4 | jcr:primaryType="sling:OrderedFolder"> 5 | <jcr:content 6 | cq:conf="/conf/aemtutorials" 7 | jcr:primaryType="nt:unstructured" 8 | jcr:title="AEM Tutorials"> 9 | <folderThumbnail/> 10 | </jcr:content> 11 | <asset.jpg/> 12 | <color.json/> 13 | <country.json/> 14 | <font.json/> 15 | </jcr:root> 16 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/_jcr_content/folderThumbnail: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/_jcr_content/folderThumbnail -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.140.100.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.319.319.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.thumbnail.48.48.png -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/cq5dam.web.1280.1280.jpeg -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/original: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/original -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/asset.jpg/_jcr_content/renditions/original.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | jcr:primaryType="nt:file"> 4 | <jcr:content 5 | jcr:lastModifiedBy="admin" 6 | jcr:mimeType="image/jpeg" 7 | jcr:primaryType="nt:resource"/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/color.json/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 4 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 5 | jcr:mixinTypes="[mix:referenceable]" 6 | jcr:primaryType="dam:Asset" 7 | jcr:uuid="0dd9d6e6-a52f-45e0-8c59-a623452a0cb5"> 8 | <jcr:content 9 | dam:assetState="processed" 10 | jcr:lastModified="{Date}2020-09-07T21:30:54.093+05:30" 11 | jcr:lastModifiedBy="admin" 12 | jcr:primaryType="dam:AssetContent"> 13 | <metadata 14 | dam:extracted="{Date}2020-09-07T21:30:52.899+05:30" 15 | dam:sha1="5bd7135819fde04acaedf96482f63862181f9694" 16 | dam:size="{Long}210" 17 | dc:format="application/json" 18 | jcr:mixinTypes="[cq:Taggable]" 19 | jcr:primaryType="nt:unstructured"/> 20 | <related jcr:primaryType="nt:unstructured"/> 21 | </jcr:content> 22 | </jcr:root> 23 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/color.json/_jcr_content/renditions/original: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text" : "Red", 4 | "value": "#FF0000" 5 | }, 6 | { 7 | "text" : "Blue", 8 | "value": "#0000FF" 9 | }, 10 | { 11 | "text" : "Green", 12 | "value": "#008000" 13 | } 14 | ] -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/color.json/_jcr_content/renditions/original.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mimeType="application/json" 8 | jcr:primaryType="oak:Resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/country.json/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 4 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 5 | jcr:mixinTypes="[mix:referenceable]" 6 | jcr:primaryType="dam:Asset" 7 | jcr:uuid="9859325e-f867-4485-aa35-0b372ee91c35"> 8 | <jcr:content 9 | dam:assetState="processed" 10 | jcr:lastModified="{Date}2020-09-07T21:30:54.091+05:30" 11 | jcr:lastModifiedBy="admin" 12 | jcr:primaryType="dam:AssetContent"> 13 | <metadata 14 | dam:extracted="{Date}2020-09-07T21:30:52.899+05:30" 15 | dam:sha1="24c1ed8c282ccca9b0321052961bc5c308308297" 16 | dam:size="{Long}340" 17 | dc:format="application/json" 18 | jcr:mixinTypes="[cq:Taggable]" 19 | jcr:primaryType="nt:unstructured"/> 20 | <related jcr:primaryType="nt:unstructured"/> 21 | </jcr:content> 22 | </jcr:root> 23 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/country.json/_jcr_content/renditions/original: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "India", 4 | "value": "india" 5 | }, 6 | { 7 | "text": "USA", 8 | "value": "usa" 9 | }, 10 | { 11 | "text": "Israel", 12 | "value": "israel" 13 | }, 14 | { 15 | "text": "Canada", 16 | "value": "canada" 17 | }, 18 | { 19 | "text": "Russia", 20 | "value": "russia" 21 | } 22 | ] -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/country.json/_jcr_content/renditions/original.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mimeType="application/json" 8 | jcr:primaryType="oak:Resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/font.json/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:dam="http://www.day.com/dam/1.0" 3 | xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" 4 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" 5 | jcr:mixinTypes="[mix:referenceable]" 6 | jcr:primaryType="dam:Asset" 7 | jcr:uuid="f0a6f18a-cb64-4fa9-a62b-41a1516f0d81"> 8 | <jcr:content 9 | dam:assetState="processed" 10 | jcr:lastModified="{Date}2020-09-07T21:30:54.091+05:30" 11 | jcr:lastModifiedBy="admin" 12 | jcr:primaryType="dam:AssetContent"> 13 | <metadata 14 | dam:extracted="{Date}2020-09-07T21:30:52.899+05:30" 15 | dam:sha1="556e38864352e17ab1a0075d34694f9df613c44d" 16 | dam:size="{Long}277" 17 | dc:format="application/json" 18 | jcr:mixinTypes="[cq:Taggable]" 19 | jcr:primaryType="nt:unstructured"/> 20 | <related jcr:primaryType="nt:unstructured"/> 21 | </jcr:content> 22 | </jcr:root> 23 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/font.json/_jcr_content/renditions/original: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "text": "8 Pixel", 4 | "value": "8px" 5 | }, 6 | { 7 | "text": "16 Pixel", 8 | "value": "16px" 9 | }, 10 | { 11 | "text": "24 Pixel", 12 | "value": "24px" 13 | }, 14 | { 15 | "text": "32 Pixel", 16 | "value": "32px" 17 | } 18 | ] -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/dam/aemtutorials/font.json/_jcr_content/renditions/original.dir/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:oak="http://jackrabbit.apache.org/oak/ns/1.0" 4 | jcr:primaryType="nt:file"> 5 | <jcr:content 6 | jcr:lastModifiedBy="admin" 7 | jcr:mimeType="application/json" 8 | jcr:primaryType="oak:Resource"/> 9 | </jcr:root> 10 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | cq:adobeTargetExportFormat="html" 4 | cq:allowedTemplates="[/conf/aemtutorials/settings/wcm/templates/(?!page-).*]" 5 | jcr:primaryType="sling:OrderedFolder" 6 | jcr:title="AEM Tutorials Fragments"> 7 | <us/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | cq:adobeTargetExportFormat="html" 4 | jcr:primaryType="sling:OrderedFolder" 5 | jcr:title="us"> 6 | <en/> 7 | </jcr:root> 8 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | cq:adobeTargetExportFormat="html" 4 | jcr:primaryType="sling:OrderedFolder" 5 | jcr:title="en"> 6 | <site/> 7 | </jcr:root> 8 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/site/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | cq:adobeTargetExportFormat="html" 4 | jcr:primaryType="sling:OrderedFolder" 5 | jcr:title="Site"> 6 | <header/> 7 | <footer/> 8 | </jcr:root> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/site/footer/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | jcr:primaryType="cq:Page"> 4 | <jcr:content 5 | cq:tags="[]" 6 | cq:template="/libs/cq/experience-fragments/components/experiencefragment/template" 7 | jcr:primaryType="cq:PageContent" 8 | jcr:title="Footer" 9 | sling:resourceType="cq/experience-fragments/components/experiencefragment"/> 10 | <master/> 11 | </jcr:root> 12 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/site/footer/master/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | jcr:primaryType="cq:Page"> 4 | <jcr:content 5 | cq:tags="[]" 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/xf-web-variation" 7 | cq:xfMasterVariation="{Boolean}true" 8 | cq:xfVariantType="web" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Footer" 11 | sling:resourceType="aemtutorials/components/xfpage"> 12 | <root 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="aemtutorials/components/container" 15 | layout="responsiveGrid"> 16 | <separator 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="aemtutorials/components/separator"/> 19 | <text 20 | jcr:primaryType="nt:unstructured" 21 | sling:resourceType="aemtutorials/components/text" 22 | text="<p>Copyright 2020, AEM Tutorials.&nbsp;All rights reserved.</p> <p>345 Park Avenue,&nbsp;San Jose, CA 95110-2704, USA</p> " 23 | textIsRich="true"/> 24 | </root> 25 | </jcr:content> 26 | </jcr:root> 27 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/site/header/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" 3 | jcr:primaryType="cq:Page"> 4 | <jcr:content 5 | cq:tags="[]" 6 | cq:template="/libs/cq/experience-fragments/components/experiencefragment/template" 7 | jcr:primaryType="cq:PageContent" 8 | jcr:title="Header" 9 | sling:resourceType="cq/experience-fragments/components/experiencefragment"/> 10 | <master/> 11 | </jcr:root> 12 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/content/experience-fragments/aemtutorials/us/en/site/header/master/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | jcr:primaryType="cq:Page"> 4 | <jcr:content 5 | cq:tags="[]" 6 | cq:template="/conf/aemtutorials/settings/wcm/templates/xf-web-variation" 7 | cq:xfMasterVariation="{Boolean}true" 8 | cq:xfVariantType="web" 9 | jcr:primaryType="cq:PageContent" 10 | jcr:title="Header" 11 | sling:resourceType="aemtutorials/components/xfpage"> 12 | <root 13 | jcr:primaryType="nt:unstructured" 14 | sling:resourceType="aemtutorials/components/container" 15 | layout="simple"> 16 | <navigation 17 | jcr:primaryType="nt:unstructured" 18 | sling:resourceType="aemtutorials/components/navigation" 19 | collectAllPages="false" 20 | navigationRoot="/content/aemtutorials/us/en" 21 | skipNavigationRoot="false" 22 | structureDepth="1"/> 23 | <languagenavigation 24 | jcr:primaryType="nt:unstructured" 25 | sling:resourceType="aemtutorials/components/languagenavigation" 26 | navigationRoot="/content/aemtutorials/us" 27 | structureDepth="2"/> 28 | <search 29 | jcr:primaryType="nt:unstructured" 30 | sling:resourceType="aemtutorials/components/search" 31 | searchRoot="/content/aemtutorials/us"/> 32 | </root> 33 | </jcr:content> 34 | </jcr:root> 35 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:mixinTypes="[rep:AccessControllable]" 5 | jcr:primaryType="sling:Folder"/> 6 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:crx="http://www.day.com/crx/1.0" xmlns:rep="internal" 3 | jcr:primaryType="rep:ACL"> 4 | <deny 5 | jcr:primaryType="rep:DenyACE" 6 | rep:principalName="everyone" 7 | rep:privileges="{Name}[jcr:all]"/> 8 | <allow1 9 | jcr:primaryType="rep:GrantACE" 10 | rep:principalName="workflow-process-service" 11 | rep:privileges="{Name}[jcr:versionManagement,jcr:read,crx:replicate,rep:write,jcr:lockManagement]"/> 12 | <allow2 13 | jcr:primaryType="rep:GrantACE" 14 | rep:principalName="undo-service" 15 | rep:privileges="{Name}[jcr:write,jcr:read]"> 16 | <rep:restrictions 17 | jcr:primaryType="rep:Restrictions" 18 | rep:glob="/undo"/> 19 | </allow2> 20 | <allow3 21 | jcr:primaryType="rep:GrantACE" 22 | rep:principalName="communities-user-admin" 23 | rep:privileges="{Name}[jcr:read]"/> 24 | </jcr:root> 25 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:mixinTypes="[rep:AccessControllable,sling:Redirect]" 5 | jcr:primaryType="sling:Folder" 6 | jcr:title="Workflow" 7 | sling:resourceType="cq/workflow/components/engine" 8 | sling:target="/aem/workflow"/> 9 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/_rep_policy.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:rep="internal" 3 | jcr:primaryType="rep:ACL"> 4 | <allow 5 | jcr:primaryType="rep:GrantACE" 6 | rep:principalName="workflow-users" 7 | rep:privileges="{Name}[jcr:versionManagement,jcr:read,rep:write,jcr:lockManagement]"/> 8 | <allow1 9 | jcr:primaryType="rep:GrantACE" 10 | rep:principalName="workflow-service" 11 | rep:privileges="{Name}[jcr:all]"/> 12 | <allow2 13 | jcr:primaryType="rep:GrantACE" 14 | rep:principalName="translation-job-service" 15 | rep:privileges="{Name}[jcr:versionManagement,jcr:read,rep:write,jcr:lockManagement]"/> 16 | </jcr:root> 17 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/models/aemtutorials/.content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 3 | jcr:primaryType="sling:Folder"/> 4 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/models/aemtutorials/approve_page_content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" 4 | jcr:isCheckedOut="{Boolean}false" 5 | jcr:primaryType="cq:WorkflowModel" 6 | jcr:uuid="079b12ae-6d7a-4bda-808a-4760b74733cc" 7 | sling:resourceType="cq/workflow/components/model" 8 | description="No Description" 9 | title="Approve Page Content"> 10 | <metaData 11 | cq:generatingPage="/conf/global/settings/workflow/models/approve_page_content/jcr:content" 12 | cq:lastModified="{Long}1597557484243" 13 | cq:lastModifiedBy="admin" 14 | jcr:primaryType="nt:unstructured"/> 15 | <nodes jcr:primaryType="nt:unstructured"> 16 | <node0 17 | jcr:primaryType="cq:WorkflowNode" 18 | title="Start" 19 | type="START"> 20 | <metaData jcr:primaryType="nt:unstructured"/> 21 | </node0> 22 | <node1 23 | jcr:primaryType="cq:WorkflowNode" 24 | description="This step approves the page content passed as the payload" 25 | title="Approve Page Content Step" 26 | type="DYNAMIC_PARTICIPANT"> 27 | <metaData 28 | jcr:primaryType="nt:unstructured" 29 | DYNAMIC_PARTICIPANT="org.redquark.aem.tutorials.core.workflows.participant.ApprovePageContentStep"/> 30 | </node1> 31 | <node2 32 | jcr:primaryType="cq:WorkflowNode" 33 | title="End" 34 | type="END"> 35 | <metaData jcr:primaryType="nt:unstructured"/> 36 | </node2> 37 | </nodes> 38 | <transitions jcr:primaryType="nt:unstructured"> 39 | <node0_x0023_node1 40 | jcr:primaryType="cq:WorkflowTransition" 41 | from="node0" 42 | rule="" 43 | to="node1"> 44 | <metaData jcr:primaryType="nt:unstructured"/> 45 | </node0_x0023_node1> 46 | <node1_x0023_node2 47 | jcr:primaryType="cq:WorkflowTransition" 48 | from="node1" 49 | to="node2"> 50 | <metaData jcr:primaryType="nt:unstructured"/> 51 | </node1_x0023_node2> 52 | </transitions> 53 | </jcr:root> 54 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/models/aemtutorials/review-content.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:isCheckedOut="{Boolean}true" 5 | jcr:primaryType="cq:WorkflowModel" 6 | jcr:uuid="30186572-923a-4f86-890a-e6214423c92f" 7 | sling:resourceType="cq/workflow/components/model" 8 | description="No Description" 9 | title="Review Content"> 10 | <metaData 11 | cq:generatingPage="/conf/global/settings/workflow/models/review-content/jcr:content" 12 | cq:lastModified="{Long}1598200156161" 13 | cq:lastModifiedBy="admin" 14 | jcr:primaryType="nt:unstructured"/> 15 | <nodes jcr:primaryType="nt:unstructured"> 16 | <node0 17 | jcr:primaryType="cq:WorkflowNode" 18 | title="Start" 19 | type="START"> 20 | <metaData jcr:primaryType="nt:unstructured"/> 21 | </node0> 22 | <node1 23 | jcr:primaryType="cq:WorkflowNode" 24 | description="This step fetches the count of children pages of the payload" 25 | title="Fetch Children Pages" 26 | type="PROCESS"> 27 | <metaData 28 | jcr:primaryType="nt:unstructured" 29 | PROCESS="org.redquark.aem.tutorials.core.workflows.process.FetchChildrenPagesStep" 30 | PROCESS_AUTO_ADVANCE="true"/> 31 | </node1> 32 | <node2 33 | jcr:primaryType="cq:WorkflowNode" 34 | description="This step chooses the user/group to review content based on the count of the children pages of the payload" 35 | title="Review Children Pages" 36 | type="DYNAMIC_PARTICIPANT"> 37 | <metaData 38 | jcr:primaryType="nt:unstructured" 39 | DYNAMIC_PARTICIPANT="org.redquark.aem.tutorials.core.workflows.participant.ReviewChildrenPagesStep"/> 40 | </node2> 41 | <node3 42 | jcr:primaryType="cq:WorkflowNode" 43 | title="End" 44 | type="END"> 45 | <metaData jcr:primaryType="nt:unstructured"/> 46 | </node3> 47 | </nodes> 48 | <transitions jcr:primaryType="nt:unstructured"> 49 | <node0_x0023_node1 50 | jcr:primaryType="cq:WorkflowTransition" 51 | from="node0" 52 | rule="" 53 | to="node1"> 54 | <metaData jcr:primaryType="nt:unstructured"/> 55 | </node0_x0023_node1> 56 | <node1_x0023_node2 57 | jcr:primaryType="cq:WorkflowTransition" 58 | from="node1" 59 | rule="" 60 | to="node2"> 61 | <metaData jcr:primaryType="nt:unstructured"/> 62 | </node1_x0023_node2> 63 | <node2_x0023_node3 64 | jcr:primaryType="cq:WorkflowTransition" 65 | from="node2" 66 | to="node3"> 67 | <metaData jcr:primaryType="nt:unstructured"/> 68 | </node2_x0023_node3> 69 | </transitions> 70 | </jcr:root> 71 | -------------------------------------------------------------------------------- /ui.content/src/main/content/jcr_root/var/workflow/models/aemtutorials/update_referenced_assets.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" 3 | xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0" 4 | jcr:isCheckedOut="{Boolean}false" 5 | jcr:primaryType="cq:WorkflowModel" 6 | jcr:uuid="660b47a8-c5c6-455c-9ed7-148332537718" 7 | sling:resourceType="cq/workflow/components/model" 8 | description="No Description" 9 | title="Update Referenced Assets"> 10 | <metaData 11 | cq:generatingPage="/conf/global/settings/workflow/models/update_referenced_assets/jcr:content" 12 | cq:lastModified="{Long}1597551816842" 13 | cq:lastModifiedBy="admin" 14 | jcr:primaryType="nt:unstructured"/> 15 | <nodes jcr:primaryType="nt:unstructured"> 16 | <node0 17 | jcr:primaryType="cq:WorkflowNode" 18 | title="Start" 19 | type="START"> 20 | <metaData jcr:primaryType="nt:unstructured"/> 21 | </node0> 22 | <node1 23 | jcr:primaryType="cq:WorkflowNode" 24 | description="This step will update the assets which are referenced in the page represented by the payload." 25 | title="Update Referenced Assets Step" 26 | type="PROCESS"> 27 | <metaData 28 | jcr:primaryType="nt:unstructured" 29 | PROCESS="org.redquark.aem.tutorials.core.workflows.process.UpdateReferencedAssetsWorkflow" 30 | PROCESS_ARGS="referencedUpdate=done" 31 | PROCESS_AUTO_ADVANCE="true"/> 32 | </node1> 33 | <node2 34 | jcr:primaryType="cq:WorkflowNode" 35 | title="End" 36 | type="END"> 37 | <metaData jcr:primaryType="nt:unstructured"/> 38 | </node2> 39 | </nodes> 40 | <transitions jcr:primaryType="nt:unstructured"> 41 | <node0_x0023_node1 42 | jcr:primaryType="cq:WorkflowTransition" 43 | from="node0" 44 | rule="" 45 | to="node1"> 46 | <metaData jcr:primaryType="nt:unstructured"/> 47 | </node0_x0023_node1> 48 | <node1_x0023_node2 49 | jcr:primaryType="cq:WorkflowTransition" 50 | from="node1" 51 | to="node2"> 52 | <metaData jcr:primaryType="nt:unstructured"/> 53 | </node1_x0023_node2> 54 | </transitions> 55 | </jcr:root> 56 | -------------------------------------------------------------------------------- /ui.frontend/.env: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | # Path to the `public` directory when the web app is deployed. In the case of 18 | # AEM, that's the path to the `resources` ClientLib directory. Specifying this 19 | # path is required for features like code splitting to work (because it will be 20 | # prepended to paths in the `asset-manifest.json` file) 21 | PUBLIC_URL=/etc.clientlibs/aemtutorials/clientlibs/clientlib-react/resources 22 | 23 | REACT_APP_PAGE_MODEL_PATH= 24 | REACT_APP_API_HOST= 25 | REACT_APP_AEM_AUTHORIZATION_HEADER= 26 | REACT_APP_ROOT= 27 | -------------------------------------------------------------------------------- /ui.frontend/.env.development: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | # Path to the `public` directory when the web app is deployed. In the case of 18 | # AEM, that's the path to the `resources` ClientLib directory. Specifying this 19 | # path is required for features like code splitting to work (because it will be 20 | # prepended to paths in the `asset-manifest.json` file) 21 | PUBLIC_URL=/etc.clientlibs/aemtutorials/clientlibs/clientlib-react/resources 22 | 23 | REACT_APP_PAGE_MODEL_PATH=/content/aemtutorials/en.model.json 24 | REACT_APP_API_HOST=http://localhost:4502 25 | REACT_APP_AEM_AUTHORIZATION_HEADER='Basic YWRtaW46YWRtaW4=' 26 | REACT_APP_ROOT=/content/aemtutorials/us/en/home.html 27 | -------------------------------------------------------------------------------- /ui.frontend/assembly.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd"> 2 | <id>distribution</id> 3 | <formats> 4 | <format>zip</format> 5 | </formats> 6 | <includeBaseDirectory>false</includeBaseDirectory> 7 | <fileSets> 8 | <fileSet> 9 | <directory>${basedir}/build/</directory> 10 | <includes> 11 | <include>**/*</include> 12 | </includes> 13 | <outputDirectory></outputDirectory> 14 | </fileSet> 15 | </fileSets> 16 | </assembly> 17 | -------------------------------------------------------------------------------- /ui.frontend/clientlib.config.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | const path = require('path'); 18 | const getEntrypoints = require('./utils/entrypoints'); 19 | 20 | const BUILD_DIR = path.join(__dirname, 'build'); 21 | const CLIENTLIB_DIR = path.join( 22 | __dirname, 23 | '..', 24 | 'ui.apps', 25 | 'src', 26 | 'main', 27 | 'content', 28 | 'jcr_root', 29 | 'apps', 30 | 'aemtutorials', 31 | 'clientlibs' 32 | ); 33 | const ASSET_MANIFEST_PATH = path.join(BUILD_DIR, 'asset-manifest.json'); 34 | 35 | const entrypoints = getEntrypoints(ASSET_MANIFEST_PATH); 36 | 37 | // Config for `aem-clientlib-generator` 38 | module.exports = { 39 | context: BUILD_DIR, 40 | clientLibRoot: CLIENTLIB_DIR, 41 | libs: { 42 | name: 'clientlib-react', 43 | allowProxy: true, 44 | categories: ['aemtutorials.react'], 45 | serializationFormat: 'xml', 46 | cssProcessor: ['default:none', 'min:none'], 47 | jsProcessor: ['default:none', 'min:none'], 48 | assets: { 49 | // Copy entrypoint scripts and stylesheets into the respective ClientLib 50 | // directories (in the order they are in the entrypoints arrays). They 51 | // will be bundled by AEM and requested from the HTML. The remaining 52 | // chunks (placed in `resources`) will be loaded dynamically 53 | js: entrypoints.filter(fileName => fileName.endsWith('.js')), 54 | css: entrypoints.filter(fileName => fileName.endsWith('.css')), 55 | 56 | // Copy all other files into the `resources` ClientLib directory 57 | resources: { 58 | cwd: '.', 59 | files: ['**/*.*'], 60 | flatten: false, 61 | ignore: entrypoints 62 | } 63 | } 64 | } 65 | }; 66 | -------------------------------------------------------------------------------- /ui.frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aemtutorials", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "react-scripts start", 7 | "build": "react-scripts build && clientlib", 8 | "test": "react-scripts test", 9 | "eject": "react-scripts eject", 10 | "sync": "aemsync -d -w ../ui.apps/src/main/content" 11 | }, 12 | "dependencies": { 13 | "@adobe/cq-react-editable-components": "^1.2.0", 14 | "@adobe/cq-spa-component-mapping": "^1.0.3", 15 | "@adobe/cq-spa-page-model-manager": "^1.1.0", 16 | "custom-event-polyfill": "^1.0.7", 17 | "dompurify": "^2.0.7", 18 | "history": "^4.10.1", 19 | "react": "^16.12.0", 20 | "react-app-polyfill": "^1.0.5", 21 | "react-dom": "^16.12.0", 22 | "react-router-dom": "^5.1.2" 23 | }, 24 | "devDependencies": { 25 | "@testing-library/jest-dom": "^4.2.4", 26 | "@testing-library/react": "^9.3.2", 27 | "@testing-library/user-event": "^7.1.2", 28 | "aem-clientlib-generator": "^1.5.0", 29 | "aemsync": "^4.0.0", 30 | "enzyme": "^3.10.0", 31 | "enzyme-adapter-react-16": "^1.15.1", 32 | "react-scripts": "~3.3.0", 33 | "sinon": "^7.5.0" 34 | }, 35 | "proxy": "http://localhost:4502", 36 | "browserslist": [ 37 | "defaults" 38 | ], 39 | "eslintConfig": { 40 | "extends": "react-app" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ui.frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.frontend/public/favicon.ico -------------------------------------------------------------------------------- /ui.frontend/public/index.html: -------------------------------------------------------------------------------- 1 | <!-- This file is only used during development --> 2 | 3 | <!DOCTYPE html> 4 | <html lang="en"> 5 | <head> 6 | <meta charset="utf-8" /> 7 | <meta name="viewport" content="width=device-width, initial-scale=1" /> 8 | <meta name="theme-color" content="#000000" /> 9 | <meta name="description" content="AEM Tutorials" /> 10 | <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> 11 | <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> 12 | <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> 13 | <title>AEM Tutorials 14 | 15 | 16 | 20 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 |
34 | 35 | 36 | -------------------------------------------------------------------------------- /ui.frontend/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.frontend/public/logo192.png -------------------------------------------------------------------------------- /ui.frontend/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ani03sha/AEM-Tutorials/75a2d6f3b4a9f62f13d119813932be1a3dd60b0b/ui.frontend/public/logo512.png -------------------------------------------------------------------------------- /ui.frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "AEM Tutorials", 3 | "name": "AEM Tutorials", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": "/content/aemtutorials/us/en/home.html", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /ui.frontend/src/App.js: -------------------------------------------------------------------------------- 1 | import { Page, withModel } from '@adobe/cq-react-editable-components'; 2 | import React from 'react'; 3 | 4 | // This component is the application entry point 5 | class App extends Page { 6 | render() { 7 | return ( 8 |
9 | {this.childComponents} 10 | {this.childPages} 11 |
12 | ); 13 | } 14 | } 15 | 16 | export default withModel(App); 17 | -------------------------------------------------------------------------------- /ui.frontend/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | }); 9 | -------------------------------------------------------------------------------- /ui.frontend/src/components/Page/Page.css: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | .page { 18 | max-width: 1024px; 19 | margin: 0 auto; 20 | padding: 12px; 21 | } 22 | -------------------------------------------------------------------------------- /ui.frontend/src/components/Page/Page.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | import { 18 | MapTo, 19 | Page, 20 | withComponentMappingContext 21 | } from '@adobe/cq-react-editable-components'; 22 | import { withRoute } from '../RouteHelper/RouteHelper'; 23 | 24 | require('./Page.css'); 25 | 26 | // This component is a variant of a Page component mapped to the 27 | // "aemtutorials/components/page" resource type. For now, the rendering is 28 | // the same as the RootPage; this is more for illustration purposes 29 | class AppPage extends Page { 30 | get containerProps() { 31 | let attrs = super.containerProps; 32 | attrs.className = 33 | (attrs.className || '') + ' page ' + (this.props.cssClassNames || ''); 34 | return attrs; 35 | } 36 | } 37 | 38 | export default MapTo('aemtutorials/components/page')( 39 | withComponentMappingContext(withRoute(AppPage)) 40 | ); 41 | -------------------------------------------------------------------------------- /ui.frontend/src/components/Page/Page.test.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | import { ModelManager } from '@adobe/cq-spa-page-model-manager'; 18 | import React from 'react'; 19 | import ReactDOM from 'react-dom'; 20 | import sinon from 'sinon'; 21 | import Page from './Page'; 22 | 23 | describe('Page ->', () => { 24 | const ROOT_NODE_CLASS_NAME = 'route-node'; 25 | const PAGE_CLASS_NAME = 'page'; 26 | 27 | let rootNode; 28 | 29 | let sandbox = sinon.createSandbox(); 30 | 31 | beforeEach(() => { 32 | rootNode = document.createElement('div'); 33 | rootNode.className = ROOT_NODE_CLASS_NAME; 34 | document.body.appendChild(rootNode); 35 | 36 | ModelManager.initialize(); 37 | 38 | expect(document.querySelector('.' + ROOT_NODE_CLASS_NAME)).not.toBeNull(); 39 | }); 40 | 41 | afterEach(() => { 42 | window.location.hash = ''; 43 | 44 | if (rootNode) { 45 | document.body.removeChild(rootNode); 46 | } 47 | 48 | sandbox.restore(); 49 | }); 50 | 51 | it('should render the page component with no parameter', () => { 52 | expect(rootNode.childElementCount).toEqual(0); 53 | ReactDOM.render(, rootNode); 54 | 55 | expect(rootNode.childElementCount).toEqual(1); 56 | 57 | expect(rootNode.querySelector('.' + PAGE_CLASS_NAME)).not.toBeNull(); 58 | }); 59 | 60 | it('should render the page component with no parameter', () => { 61 | const EXTRA_CLASS_NAMES = 'test-class-names'; 62 | 63 | expect(rootNode.childElementCount).toEqual(0); 64 | 65 | ReactDOM.render(, rootNode); 66 | 67 | expect(rootNode.childElementCount).toEqual(1); 68 | 69 | expect(rootNode.querySelector('.' + EXTRA_CLASS_NAMES)).not.toBeNull(); 70 | }); 71 | }); 72 | -------------------------------------------------------------------------------- /ui.frontend/src/components/RouteHelper/RouteHelper.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | import React, { Component } from 'react'; 18 | import { Route } from 'react-router-dom'; 19 | 20 | /** 21 | * Helper that facilitate the use of the {@link Route} component 22 | */ 23 | 24 | /** 25 | * Returns a composite component where a {@link Route} component wraps the provided component 26 | * 27 | * @param {React.Component} WrappedComponent - React component to be wrapped 28 | * @param {string} [extension=html] - extension used to identify a route amongst the tree of resource URLs 29 | * @returns {CompositeRoute} 30 | */ 31 | export const withRoute = (WrappedComponent, extension) => { 32 | return class CompositeRoute extends Component { 33 | render() { 34 | let routePath = this.props.cqPath; 35 | if (!routePath) { 36 | return ; 37 | } 38 | 39 | extension = extension || 'html'; 40 | 41 | // Context path + route path + extension 42 | return ( 43 | { 48 | return ; 49 | }} 50 | /> 51 | ); 52 | } 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /ui.frontend/src/components/Text/Text.css: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | h1, 18 | h2, 19 | h3, 20 | h4, 21 | h5, 22 | h6, 23 | p { 24 | border: 0; 25 | font-size: 100%; 26 | margin: 0; 27 | padding: 0; 28 | vertical-align: baseline; 29 | } 30 | 31 | h1, 32 | h2, 33 | h3, 34 | h4, 35 | h5, 36 | h6 { 37 | color: rgba(0, 0, 0, 0.8); 38 | text-transform: uppercase; 39 | } 40 | 41 | p { 42 | color: rgba(0, 0, 0, 0.8); 43 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 44 | font-size: 18px; 45 | font-weight: 200; 46 | line-height: 32px; 47 | } 48 | 49 | h1 { 50 | font-size: 48px; 51 | letter-spacing: 0.8em; 52 | } 53 | 54 | h2 { 55 | font-size: 48px; 56 | font-weight: 700; 57 | letter-spacing: 0.02em; 58 | } 59 | 60 | h3 { 61 | font-size: 18px; 62 | font-weight: 700; 63 | letter-spacing: 0.02em; 64 | padding: 4px 0; 65 | } 66 | 67 | h5 { 68 | color: rgba(0, 0, 0, 0.8); 69 | font-size: 18px; 70 | text-align: center; 71 | } 72 | 73 | @media (min-width: 651px) and (max-width: 1200px) { 74 | h1 { 75 | font-size: 30px; 76 | } 77 | 78 | h2 { 79 | font-size: 30px; 80 | } 81 | 82 | h3 { 83 | font-weight: 400; 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /ui.frontend/src/components/Text/Text.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | import { MapTo } from '@adobe/cq-react-editable-components'; 18 | import DOMPurify from 'dompurify'; 19 | import React, { Component } from 'react'; 20 | import extractModelId from '../../utils/extract-model-id'; 21 | 22 | require('./Text.css'); 23 | 24 | /** 25 | * Default Edit configuration for the Text component that interact with the Core Text component and sub-types 26 | * 27 | * @type EditConfig 28 | */ 29 | const TextEditConfig = { 30 | emptyLabel: 'Text', 31 | 32 | isEmpty: function(props) { 33 | return !props || !props.text || props.text.trim().length < 1; 34 | } 35 | }; 36 | 37 | /** 38 | * Text React component 39 | */ 40 | class Text extends Component { 41 | get richTextContent() { 42 | return ( 43 |
50 | ); 51 | } 52 | 53 | get textContent() { 54 | return
{this.props.text}
; 55 | } 56 | 57 | render() { 58 | return this.props.richText ? this.richTextContent : this.textContent; 59 | } 60 | } 61 | 62 | export default MapTo('aemtutorials/components/text')( 63 | Text, 64 | TextEditConfig 65 | ); 66 | -------------------------------------------------------------------------------- /ui.frontend/src/components/import-components.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | import './Page/Page'; 18 | import './Text/Text'; 19 | -------------------------------------------------------------------------------- /ui.frontend/src/index.css: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | /* Global styles */ 18 | 19 | html, 20 | body { 21 | border: 0; 22 | font: inherit; 23 | font-size: 100%; 24 | margin: 0; 25 | padding: 0; 26 | vertical-align: baseline; 27 | } 28 | 29 | body { 30 | background-color: #ffffff; 31 | } 32 | 33 | h1, 34 | h2, 35 | h3, 36 | h4, 37 | h5, 38 | p, 39 | .nav-container, 40 | .rw-box { 41 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; 42 | color: #000000; 43 | } 44 | -------------------------------------------------------------------------------- /ui.frontend/src/index.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | // Use polyfills for modern language features 18 | // The imports and dependencies can be removed if only modern browsers should be 19 | // supported 20 | import 'react-app-polyfill/stable'; 21 | import 'react-app-polyfill/ie9'; 22 | import 'custom-event-polyfill'; 23 | 24 | import { Constants, ModelManager } from '@adobe/cq-spa-page-model-manager'; 25 | import { createBrowserHistory } from 'history'; 26 | import React from 'react'; 27 | import { render } from 'react-dom'; 28 | import { Router } from 'react-router-dom'; 29 | import App from './App'; 30 | import './components/import-components'; 31 | import './index.css'; 32 | 33 | document.addEventListener('DOMContentLoaded', () => { 34 | ModelManager.initialize().then(pageModel => { 35 | const history = createBrowserHistory(); 36 | render( 37 | 38 | 46 | , 47 | document.getElementById('spa-root') 48 | ); 49 | }); 50 | }); 51 | -------------------------------------------------------------------------------- /ui.frontend/src/setupTests.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 18 | // allows you to do things like: 19 | // expect(element).toHaveTextContent(/react/i) 20 | // learn more: https://github.com/testing-library/jest-dom 21 | import '@testing-library/jest-dom/extend-expect'; 22 | -------------------------------------------------------------------------------- /ui.frontend/src/utils/extract-model-id.js: -------------------------------------------------------------------------------- 1 | /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | ~ Copyright 2020 Adobe Systems Incorporated 3 | ~ 4 | ~ Licensed under the Apache License, Version 2.0 (the "License"); 5 | ~ you may not use this file except in compliance with the License. 6 | ~ You may obtain a copy of the License at 7 | ~ 8 | ~ http://www.apache.org/licenses/LICENSE-2.0 9 | ~ 10 | ~ Unless required by applicable law or agreed to in writing, software 11 | ~ distributed under the License is distributed on an "AS IS" BASIS, 12 | ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | ~ See the License for the specific language governing permissions and 14 | ~ limitations under the License. 15 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ 16 | 17 | /** 18 | * Extract an id from the cqModel field of given properties 19 | * 20 | * @param path - Path to be converted into an id 21 | * @returns {string|undefined} 22 | */ 23 | export default function extractModelId(path) { 24 | return path && path.replace(/\/|:/g, '_'); 25 | } 26 | -------------------------------------------------------------------------------- /ui.frontend/src/utils/extract-model-id.test.js: -------------------------------------------------------------------------------- 1 | import extractModelId from './extract-model-id'; 2 | 3 | describe('Utils ->', () => { 4 | const CONTENT_PATH = '/content/test/cq/jcr:content/path'; 5 | const CONTENT_PATH_CONVERTED = '_content_test_cq_jcr_content_path'; 6 | 7 | describe('extractModelId ->', () => { 8 | it('should convert not fail', () => { 9 | expect(extractModelId()).toBeUndefined(); 10 | }); 11 | 12 | it('should convert the given path into an id', () => { 13 | expect(extractModelId(CONTENT_PATH)).toBe(CONTENT_PATH_CONVERTED); 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /ui.frontend/utils/entrypoints.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | /** 4 | * Returns all entrypoint chunks (JS and CSS) of the React app. These chunks 5 | * will not need to be precached because they're already requested from the HTML 6 | * file) 7 | * 8 | * @param {string} assetManifestPath: Path to the asset manifest file from which 9 | * the entrypoint files can be read 10 | */ 11 | function getEntrypoints(assetManifestPath) { 12 | if (!fs.existsSync(assetManifestPath)) { 13 | throw Error( 14 | `Cannot determine entrypoints: No asset manifest found at path ${assetManifestPath}` 15 | ); 16 | } 17 | const manifest = fs.readFileSync(assetManifestPath, { encoding: 'utf8' }); 18 | const manifestContent = JSON.parse(manifest); 19 | if (!('entrypoints' in manifestContent)) { 20 | throw Error( 21 | `Cannot determine entrypoints: Missing "entrypoints" key in ${assetManifestPath}` 22 | ); 23 | } 24 | return manifestContent.entrypoints; 25 | } 26 | 27 | module.exports = getEntrypoints; 28 | --------------------------------------------------------------------------------