Registry / other / org-apache-sling-jcr-api

org-apache-sling-jcr-api

JSON →
library2.4.2javamavenunverified

This OSGi bundle provides the JCR packages as well as a helper service interface for repository providers in Apache Sling.

<dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.jcr.api</artifactId> <version>2.4.2</version> </dependency>
INSTALL
IMPORT
SIG · ORG-APACHE-SLING-J
O
org-apache-sling-jcr-api
otherjavav2.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SlingRepository
✓ org.apache.sling.jcr.api.SlingRepository

Obtains a JCR session from a SlingRepository instance.

import org.apache.sling.jcr.api.SlingRepository; import javax.jcr.Session; public class Main { public void example(SlingRepository repository) throws Exception { Session session = repository.loginAdministrative(null); System.out.println("Workspace: " + session.getWorkspace().getName()); session.logout(); } }
Debug
Known issues
breakingloginAdministrative is deprecated in newer JCR versions; use repository.login() instead.
fix
Replace loginAdministrative with repository.login(new SimpleCredentials("admin", "admin".toCharArray())).
affects: >=2.4.0
Upgrade
Version history
2.4.2latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
org-apache-sling-jcr-api — mvn dependency:get org-apache-sling-jcr-api · libregistry