Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
How search works in AEM 6.0 with (Apache Jackrabbit) Oak has been a mystery to a lot of people. Blog entries by people like Thomas Joseph has helped.
Adobe has finally addressed this concern with a Gems (Connect webinar) session by Oak engineers Chetan Mehrotra and Alex Parvulescu. Adobe DayCare engineer Sham Hassan Chikkegowda also has published a cheatsheet that helps.
Plus there’s Oak documentation which keeps improving with time.
JQOM (Java Query Object Model) is the new Query language that has been support by AEM from its latest version 6.x for its latest repository Jackrabbit Oak. This post aims at introducing to the JQOM…
Sling Models is framework that will let us map Sling objects to POJOs. The idea is to create model objects to represent resources.
This approach uses entirely annotations to build its structure, and has support to work with both classes and interfaces.
On this post I will explain how to incorporate sling models into your project to map resources into POJOs.
SLING MODEL Bundles
AEM 6 has Sling Models support OOTB, to make it work with CQ5.6 some extra steps will have to be followed. In my case, I am using AEM 6 SP2.
To find out if your AEM/CQ installation is Sling Model ready you can visit the web console and check if the OSGI bundle for Sling Model exists and verify that it is active.
To do that you can visit the /system/console/bundles URL in your local instance and look for the Sling Model bundles.
Note: Take a close look at the bundles version.
Project Setup
Once your AEM instance is ready you can begin the project setup:
First you will have to create a Java project that later will be deployed into OSGI as a bundle. This bundle will have the Sling Model packages.
The POM of this project needs to have the maven-bundle-plugin declaration like in the following screenshot.
The <Sling-Model-Packages>section is very important. This will let OSGI know that the package path described there contains Sling Models classes/interfaces, and it will scan through it looking for the annotations. PLEASE don’t skip these plugin lines otherwise your models might not be mapped correctly.
SLING Model Interface or Class
Now you are ready to create models either using classes or interfaces. There are several annotations that will help you on this setup. The most common annotations are:
@Model Used to specify that the class represents a Sling Model.
@Inject Used to specify that a property represents a resource property.
Note: There are several others annotations and variations for Sling Models that might suite for different needs.
On my test case I've declared a UserInfo interface with two properties. The properties will be injected using the getter declarations.
Now that we have our Sling Model ready, we just need to test it, for this I've created a simple servlet that pulls the resource and adapts it to our Sling Model.
The test Servlet will pull the resource by using the resource resolver:
Then you can just print the different properties using the userInfo object.
Same thing you can do in an AEM component JSP, you just need to adapt the resource to the Sling Model.
As I said earlier, using Sling Models is a great approach to handle different scenarios, including coding unit tests. Also this is just a simple test case, there is a bunch of different scenarios where extended approaches can be implemented.
On a dev server where I have an AEM6 project running I noticed a weird message on the logs and the author instance wasn't starting up correctly.
After doing some system health check I noticed the hard drive space was close to be full. This was weird since the only active project on the server was the AEM6 project.
I started checking where the HD space was being dragged and noticed that the size of the segmentstore folder (../crx-quickstart/repository/segmentstore/) was huge.
After some research I found an Adobe link on how to reduce/compact the size of the segment store which, off course, shouldn't be that big.
I followed the manual offline compaction process using the 'oak-run-1.0.8.jar' to reduce the size. The size went down from 60GB to 4GB.
After doing additional research, I found out that to prevent this strange issue with the /segmentstore/, AEM6 SP1 should be installed (SP2 has also been released, its release notes say that SP1 is included on SP2).
This said, after SP1 was installed I've monitored my AEM6 instance for a month now, and its growth in size is back to normal.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
✓ Live Streaming✓ Interactive Chat✓ Private Shows✓ HD Quality
Anya is LIVE right now
FREE
Free to watch • No registration required • HD streaming
The idea of this blog is to provide some useful posts to the CQ / AEM community. I'll try to write posts from my AEM experiences. Here you will find from basic to advanced topics, in general the idea is to give the audience important information for their AEM education.
Creating drop targets in Adobe's AEM6 using sightly
So with the introduction of Sightly html templating in Adobe's AEM6 CMS you've got a much easier way of creating your cq:dropTargets in .html rather than the longer winded .jsp
You do your cq:dropTargets in the same manner as you would normally do in CQ5.5/6 (so in our case we'll call ours video).
<div data-sly-test="${wcmmode.edit}" class="cq-dd-video">Drop video here</div>
There are 2 important parts to this:
The data-sly-test attribute, this is testing to see if we're in edit mode, if so then display the div else it will remove it.
The class cq-dd-xxxx. xxxx is the name of the what you've called your cq:dropTarget in our instance we've called it video so our class is cq-dd-video. If you was to call your drop target pdf then your class would be called cq-dd-pdf.