Java API Reference

You are reading the CRX 2.3 version of Java API Reference.
This documentation is also available for the following versions: CRX 2.2  CRX 2.1  CRX 2.0 (for CQ 5.3) 
This section provides information about the Javadoc documentation for APIs supported by CRX. CRX provides a few Java APIs, which can be used by applications using the content repository. The following table summarizes the APIs and provides information on where the corresponding Javadoc API documentation can be found.
API Javadoc API Location Comments
JCR 2.0 (JSR-283) jcr.javax Javadocs The standard Java Content Repository API provided by repository
Jackrabbit 2.0 API org.apache.jackrabbit Javadocs The Jackrabbit extensions API of JCR reference implementation
CRX API com.day.crx Javadocs
The CRX extensions API

Note

Note: <crx-install> in the previous table refers to the directory in which CRX is installed.

API Deprecation and Backwards Compatibility

CRX 2.0

CRX 2.0 is a major product release, supporting the new release of JCR API version 2.0. As such, it gives a good opportunity to clean up the code base from very old and inefficient modules to give a clean slate for strategic product development.

A lot of functionalities have also been implemented in the reference implementation of the JCR standard, Apache Jackrabbit, which is used by CRX as the repository core. Some of the modules (e.g., repository filesystems) are now available directly in Jackrabbit, and they should be used in product configurations instead of the older CRX-side modules.


Deprecated in CRX 2.0:

  • com.day.crx.i18n.CRXTranslationProvider and LanguageManager are not instantiated any more, and are obsolete. Use Sling for i18n support in applications.
  • NativePersistenceManager is marked as obsolete and will be removed in future versions

Removed in 2.0:

  • CQFileSystem was replaced by bundle persistence and TarPM. In case you are using this in any configuration, or have bundle/item persistence with blobFSBlockSize or itemFSBlockSize greater than zero, please migrate the configuration to use the newer features
  • Removed obsolete persistence managers. Please use TarPM or BundleDB persistence managers with the supported databases (Oracle, MS SQL, DB2, MySQL):
    • JDBMPersistenceManager
    • persistence managers based on SimpleDbPersitenceManager
    • persistence managersbased on DbPersistenceManager
    • some of the Bundle persistence managers not recommended for Day products - BundleFsPersistenceManager, DerbyPersistenceManager, H2PersistenceManager
  • Database filesytem (com.day.crx.core.fs.db package) has been removed; please use the corresponding classes from Apache Jackrabbit in your configurations instead (org.apache.jackrabbit.core.fs.db.*). Note that most of the CRX-side classes were just exending the corresponding Jackrabbit class.
    • If you use EmbeddedHSQLDbFileSystem, please contact Day for advice.
  • Deprecated crx nodetype classes
  • Security APIs have been standardized in JCR 2.0 and / or provided to a large extend in the reference JCR implementation, Apache Jackrabbit 2.0. The old, proprietary security module in CRX has been therefore removed and CQ5.3 and CRX 2.0 products adapted to the standards-based implementation (see below).

CRX 2.0 - Standardization of Security Module

With the introduction of JCR 2.0 standard, and the release of Jackrabbit 2.0 implementing this standard, the following important improvements have been introduced in the area of security (permission and principal management):

This set of JCR- and community-standardized security services for the content repository allowed for their adoption in Day Products (CQ WCM, DAM, Social Collaboration) and replacement for the previous, Day proprietary solution. The following changes have been introduced:

  • CQ and CRX security / user management related user interfaces have been adapted to use the new APIs
  • Security-related modules (like LDAP integration) has been adapted to use the new APIs
  • The older CRX security module has been removed
  • The security content (user/group/ACLs) in pre-2.0 repositories is automatically migrated while upgrading to CRX 2.0
  • The crx.system workspace has been removed (user/group information is no longer stored there)
  • The user/group information is managed under /home node for each workspace

See the respective security APIs and CQ 5.3 upgrade documentation for more details.

CRX 1.4

As of version 1.4, CRX supports three client-level API interfaces: the standard JCR 1.0 API, the Jackrabbit extensions in jackrabbit-api, and the CRX extensions in crx-api. Full compatibility with Jackrabbit has been added in this release (see section Jackrabbit Compatibility), and Jackrabbit APIs can be used with CRX directly.

The implementation of all these interfaces is fully backwards compatible with two changes in the CRX API described below.

1. The following methods have been removed from the crx-api extension interfaces:

  • Package com.day.crx: CRXSession.getNamespaceResolver()
  • Package com.day.crx.nodetype: NodeTypeRegistry.getRegisteredNodeTypes()

2. Any clients using the previous methods must be updated as follows:

  • Use new SessionNamespaceResolver(session) instead of session.getNamespaceResolver()
  • Use registry.getRegisteredNodeTypeQNames()instead of registry.getRegisteredNodeTypes()

Note

Note: The two methods have been removed from the interfaces to enable the full compatibility of CRX with Jackrabbit.


Your comments are welcome!
Did you notice a way we could improve the documentation on this page? Is something unclear or insufficiently explained? Please leave your comments below and we will make the appropriate changes. Comments that have been addressed, by improving the documentation accordingly, will then be removed.

COMMENTS

  • By vikramjeets - 12:56 PM on Aug 20, 2010   Reply
    Hi, I want to have crx API's that I can use in C#. Please provide the solution to this?
    • By aheimoz - 6:47 AM on Sep 22, 2010   Reply
      You can integrate using the Sling RESTful interface (working with a HTTP client, which C# has). Also our <a href="http://dev.day.com/">dev.day.com</a> blog has several examples of using the repository content from various non-Java technologies.

      If you need full access to the JCR API, than using some sort of C#-to-Java bridge technology would be a solution, there is a lot of information generally available (<a href="http://www.google.ch/#hl=de&source=hp&q=calling+java+API+from+C%23&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=6b119209cfcdee12">here are some example links</a>).

      Hope this helps, please let us know how you get on.

    ADD A COMMENT

     

    In order to post a comment, you need to sign-in.

    Note: Customers with DayCare user accounts need to create a new account for use on day.com.

    ***