Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to programmatically access the AEM JCR | AEM Community Blog Seeding

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,127 likes

Total Posts

6,121 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

19-04-2021

BlogImage.jpg

How to programmatically access the AEM JCR by Adobe Docs

Abstract

You can programmatically modify nodes and properties located within the Adobe CQ repository, which is part of the Adobe Marketing Cloud. To access the CQ repository, you use the Java Content Repository (JCR) API. You can use the Java JCR API to perform create, replace, update, and delete (CRUD) operations on content located within the Adobe CQ repository. For more information about the Java JCR API, see https://jackrabbit.apache.org/jcr/jcr-api.html.

Create a Repository instance
Although there are different ways to connect to a repository and establish a connection, this development article uses a static method that belongs to the org.apache.jackrabbit.commons.JcrUtils class. The name of the method is getRepository. This method takes a string parameter that represents the URL of the Adobe CQ server. For example http://localhost:4503/crx/server.

The getRepositorymethod returns a Repositoryinstance, as shown in the following code example.

//Create a connection to the AEM JCR repository running on local host
Repository repository = JcrUtils.getRepository("http://localhost:4503/crx/server");

Read Full Blog

How to programmatically access the AEM JCR

Q&A

Please use this thread to ask the related questions.

AEM AEMIBlogSeeding Experience Manager