@Reference
private SlingRepository repository;
@SuppressWarnings("deprecation")@Reference
private JcrResourceResolverFactory resolverFactory;
private ResourceResolver resolver;
private Session session;
session = repository.loginAdministrative(null);
resolver = this.resolverFactory.getResourceResolver(session);
From here you will get the root node whichever you wants---
rootNodePath="/content/dam";
Node rootNode = session.getNode(rootNodePath);
From this rootNode you can trace all the sub nodes...
Hope it helps :)
SonyCharan
No comments:
Post a Comment